curl --request PUT \
--url https://api.gcore.com/cdn/origin_groups/{origin_group_id} \
--header 'Authorization: <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
}
curl --request PUT \
--url https://api.gcore.com/cdn/origin_groups/{origin_group_id} \
--header 'Authorization: <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
}
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
Origin group ID.
Successful.
The response is of type object
.
Was this page helpful?