PUT
/
cdn
/
origin_groups
/
{origin_group_id}
curl --request PUT \
  --url https://api.gcore.com/cdn/origin_groups/{origin_group_id} \
  --header 'APIKey: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "YourOriginGroup",
  "use_next": true,
  "proxy_next_upstream": [
    "error",
    "timeout",
    "invalid_header",
    "http_500",
    "http_502",
    "http_503",
    "http_504"
  ],
  "auth_type": "none",
  "sources": [
    {
      "backup": false,
      "enabled": true,
      "source": "yourwebsite.com"
    },
    {
      "backup": true,
      "enabled": true,
      "source": "1.2.3.4:5500"
    }
  ],
  "path": ""
}'
{
  "id": 1,
  "name": "YourOriginGroup",
  "use_next": true,
  "proxy_next_upstream": [
    "error",
    "timeout",
    "invalid_header",
    "http_500",
    "http_502",
    "http_503",
    "http_504"
  ],
  "auth_type": "none",
  "sources": [
    {
      "backup": false,
      "enabled": true,
      "source": "yourwebsite.com"
    },
    {
      "backup": true,
      "enabled": true,
      "source": "1.2.3.4:5500"
    }
  ],
  "path": "",
  "has_related_resources": true
}

Authorizations

APIKey
string
header
required

API key for authentication.

Path Parameters

origin_group_id
integer
required

Origin group ID.

Body

application/json

Response

200
application/json

Successful.

The response is of type object.