Skip to main content
GET
/
cdn
/
presets
Get presets list
curl --request GET \
  --url https://api.gcore.com/cdn/presets \
  --header 'Authorization: <api-key>'
[
  {
    "id": 42,
    "name": "Static content acceleration",
    "service": "cdn",
    "object_type": "CDNResource",
    "preset_settings": {
      "options": {
        "gzipOn": {
          "enabled": true,
          "value": true
        }
      }
    }
  }
]

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Query Parameters

limit
integer

Maximum number of items to return in the response. Cannot exceed 1000.

Required range: 1 <= x <= 1000
offset
integer

Number of items to skip from the beginning of the list.

Required range: x >= 0

Response

200 - application/json

Successful.

id
integer
read-only

Preset ID.

Example:

42

name
string

Preset name.

Example:

"Static content acceleration"

service
enum<string>

Service the preset belongs to.

Available options:
cdn
Example:

"cdn"

object_type
enum<string>

Type of object the preset can be applied to.

Possible values:

  • CDNResource - Preset is applied to a CDN resource.
  • Rule - Preset is applied to a rule.
Available options:
CDNResource,
Rule
Example:

"CDNResource"

preset_settings
object

CDN resource or rule settings that the preset applies to the target object, including the options object.

The available keys match the writable fields of the object type the preset targets (object_type). Options included in the preset cannot be edited on the object while the preset is applied.

Example:
{
"options": {
"browser_cache_settings": { "enabled": true, "value": "3600s" },
"gzipOn": { "enabled": true, "value": true }
}
}