curl --request POST \
--url https://api.gcore.com/cdn/origin_groups \
--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"
}
]
}'
{
"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
}
Create an origin group with one or more origin sources.
curl --request POST \
--url https://api.gcore.com/cdn/origin_groups \
--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"
}
]
}'
{
"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
Successful.
The response is of type object
.
Was this page helpful?