Managing CDN resources: creating resources, retrieving CDN servers information, prefetching and purging resource's CDN caches, and more
Returns information about a specific project.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
{- "project": {
- "id": "33251cee-9ff9-44fc-bda6-d549841236ca",
- "is_blocked": false,
- "resources": [
- {
- "id": "16431130-22a5-4da9-9244-9bfd93a1ccbf",
- "internal_fqdn": "16431130-22a5-4da9-9244-9bfd93a1ccbf.fake.co",
- "name": "My CDN Resource",
- "origin_type": "custom",
- "read_only": true,
- "status": "active"
}
], - "selectel_uid": 12345
}
}
Returns the limits for a project.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
{- "current_values": [
- {
- "limit_type": "resources_quantity_limit",
- "provider_type": "string",
- "value": 0
}
], - "project_limits": [
- {
- "limit_type": "resources_quantity_limit",
- "provider_type": "string",
- "value": 0
}
]
}
Managing resources, prefetching and purging resource's CDN caches, enabling Let's Encrypt® certificates.
Returns a list of CDN resources.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
{- "resources": [
- {
- "config": {
- "client_hostnames": [
- "somehostname.co"
], - "default_client_hostname": "33251cee-9ff9-44fc-bda6-d549841236ca.fake.co",
- "options": {
- "brotli_compression": {
- "enabled": true,
- "value": [
- "text/html"
]
}, - "client_location": "INDIA",
- "content_characteristics": {
- "catalogue_size": "LARGE",
- "content_type": "GAME",
- "object_size": "TEN_MB_TO_100_MB",
- "popularity_distribution": "LONG_TAIL"
}, - "custom_host_header": "someHeader",
- "custom_origin_headers": {
- "{header1": "value1",
- "header2": "value2}"
}, - "edge_server_cache_expire": 86400,
- "forward_host_header": true,
- "gzip_compression": true,
- "ignore_cookie": true,
- "ignore_query_string": true,
- "image_stack": {
- "avif_enabled": true,
- "enabled": true,
- "png_lossless": true,
- "quality": 90,
- "webp_enabled": true
}, - "large_file_optimisation": true,
- "origin_compression": true,
- "origin_location": "GERMANY",
- "security_options": {
- "cors": {
- "access_control_allow_origin": [
- "host1.com",
- "host2.org"
], - "always": false
}, - "country_acl": {
- "list": [
- "RU",
- "SW"
]
}, - "ip_acl": {
- "list": [
- "string"
]
}, - "redirect_http_to_https": true,
- "referrer_acl": {
- "list": [
- "string"
]
}, - "secure_key": {
- "include_ip": true,
- "value": "15315f61c4bc9044b8"
}, - "user_agent": {
- "list": [
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
]
}
}, - "serve_stale": [
- "http_429",
- "http_500"
], - "set_custom_cache_headers": 86400,
- "shielding": false
}, - "origin_hostnames": [
- "someoriginhostname.co"
], - "origin_ips": [
- "127.0.0.1:443",
- "[eb59:10b8:32db:ca57:7d49:a56e:445:ec20]:8080"
], - "origin_protocol": "HTTPS"
}, - "id": "33251cee-9ff9-44fc-bda6-d549841236ca",
- "internal_fqdn": "33251cee-9ff9-44fc-bda6-d549841236ca.selcdn.ru",
- "last_update_error": "string",
- "le_certificate_status": "active",
- "name": "Some name",
- "origin_type": "custom",
- "provider": "Selectel",
- "read_only": true,
- "status": "active"
}
]
}
Creates a new CDN resource.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
Payload
required | object |
name required | string Name of the resource. |
origin_type required | string Origin type of the resource. |
{- "config": {
- "certificate": {
- "certificate": "string",
- "name": "string",
- "private_key": "string",
- "provider_cert_id": 0
}, - "options": {
- "brotli_compression": {
- "enabled": true,
- "value": [
- "text/html"
]
}, - "custom_host_header": "samplehost.com",
- "edge_server_cache_expire": 86400,
- "forward_host_header": true,
- "gzip_compression": true,
- "ignore_cookie": true,
- "ignore_query_string": true,
- "image_stack": {
- "avif_enabled": true,
- "enabled": true,
- "png_lossless": true,
- "quality": 90,
- "webp_enabled": true
}, - "large_file_optimisation": true,
- "origin_compression": true,
- "security_options": {
- "cors": {
- "access_control_allow_origin": [
- "host1.com",
- "host2.org"
], - "always": false
}, - "country_acl": {
- "list": [
- "RU",
- "SW"
]
}, - "ip_acl": {
- "list": [
- "string"
]
}, - "redirect_http_to_https": true,
- "referrer_acl": {
- "list": [
- "string"
]
}, - "secure_key": {
- "include_ip": true,
- "value": "15315f61c4bc9044b8"
}, - "user_agent": {
- "list": [
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
]
}
}, - "serve_stale": [
- "http_500",
- "http_502"
], - "set_custom_cache_headers": 86400,
- "shielding": true
}, - "origin_hostnames": [
- "fakeorigin.com"
], - "origin_ips": [
- "1.1.1.1"
], - "origin_protocol": "HTTPS",
- "provider_type": "Selectel"
}, - "name": "My CDN Resource",
- "origin_type": "custom"
}
{- "resource": {
- "config": {
- "client_hostnames": [
- "somehostname.co"
], - "default_client_hostname": "33251cee-9ff9-44fc-bda6-d549841236ca.fake.co",
- "options": {
- "brotli_compression": {
- "enabled": true,
- "value": [
- "text/html"
]
}, - "client_location": "INDIA",
- "content_characteristics": {
- "catalogue_size": "LARGE",
- "content_type": "GAME",
- "object_size": "TEN_MB_TO_100_MB",
- "popularity_distribution": "LONG_TAIL"
}, - "custom_host_header": "someHeader",
- "custom_origin_headers": {
- "{header1": "value1",
- "header2": "value2}"
}, - "edge_server_cache_expire": 86400,
- "forward_host_header": true,
- "gzip_compression": true,
- "ignore_cookie": true,
- "ignore_query_string": true,
- "image_stack": {
- "avif_enabled": true,
- "enabled": true,
- "png_lossless": true,
- "quality": 90,
- "webp_enabled": true
}, - "large_file_optimisation": true,
- "origin_compression": true,
- "origin_location": "GERMANY",
- "security_options": {
- "cors": {
- "access_control_allow_origin": [
- "host1.com",
- "host2.org"
], - "always": false
}, - "country_acl": {
- "list": [
- "RU",
- "SW"
]
}, - "ip_acl": {
- "list": [
- "string"
]
}, - "redirect_http_to_https": true,
- "referrer_acl": {
- "list": [
- "string"
]
}, - "secure_key": {
- "include_ip": true,
- "value": "15315f61c4bc9044b8"
}, - "user_agent": {
- "list": [
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
]
}
}, - "serve_stale": [
- "http_429",
- "http_500"
], - "set_custom_cache_headers": 86400,
- "shielding": false
}, - "origin_hostnames": [
- "someoriginhostname.co"
], - "origin_ips": [
- "127.0.0.1:443",
- "[eb59:10b8:32db:ca57:7d49:a56e:445:ec20]:8080"
], - "origin_protocol": "HTTPS"
}, - "id": "33251cee-9ff9-44fc-bda6-d549841236ca",
- "internal_fqdn": "33251cee-9ff9-44fc-bda6-d549841236ca.selcdn.ru",
- "last_update_error": "string",
- "le_certificate_status": "active",
- "name": "Some name",
- "origin_type": "custom",
- "provider": "Selectel",
- "read_only": true,
- "status": "active"
}
}
Deletes a CDN resource.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
ResourceID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Resource identifier. |
{- "error": {
- "id": "584105f1-7c20-4fb2-af1a-e96ee6a73752",
- "message": "object not found"
}
}
Returns information about a specific CDN resource.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
ResourceID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Resource identifier. |
{- "resource": {
- "config": {
- "client_hostnames": [
- "somehostname.co"
], - "default_client_hostname": "33251cee-9ff9-44fc-bda6-d549841236ca.fake.co",
- "options": {
- "brotli_compression": {
- "enabled": true,
- "value": [
- "text/html"
]
}, - "client_location": "INDIA",
- "content_characteristics": {
- "catalogue_size": "LARGE",
- "content_type": "GAME",
- "object_size": "TEN_MB_TO_100_MB",
- "popularity_distribution": "LONG_TAIL"
}, - "custom_host_header": "someHeader",
- "custom_origin_headers": {
- "{header1": "value1",
- "header2": "value2}"
}, - "edge_server_cache_expire": 86400,
- "forward_host_header": true,
- "gzip_compression": true,
- "ignore_cookie": true,
- "ignore_query_string": true,
- "image_stack": {
- "avif_enabled": true,
- "enabled": true,
- "png_lossless": true,
- "quality": 90,
- "webp_enabled": true
}, - "large_file_optimisation": true,
- "origin_compression": true,
- "origin_location": "GERMANY",
- "security_options": {
- "cors": {
- "access_control_allow_origin": [
- "host1.com",
- "host2.org"
], - "always": false
}, - "country_acl": {
- "list": [
- "RU",
- "SW"
]
}, - "ip_acl": {
- "list": [
- "string"
]
}, - "redirect_http_to_https": true,
- "referrer_acl": {
- "list": [
- "string"
]
}, - "secure_key": {
- "include_ip": true,
- "value": "15315f61c4bc9044b8"
}, - "user_agent": {
- "list": [
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
]
}
}, - "serve_stale": [
- "http_429",
- "http_500"
], - "set_custom_cache_headers": 86400,
- "shielding": false
}, - "origin_hostnames": [
- "someoriginhostname.co"
], - "origin_ips": [
- "127.0.0.1:443",
- "[eb59:10b8:32db:ca57:7d49:a56e:445:ec20]:8080"
], - "origin_protocol": "HTTPS"
}, - "id": "33251cee-9ff9-44fc-bda6-d549841236ca",
- "internal_fqdn": "33251cee-9ff9-44fc-bda6-d549841236ca.selcdn.ru",
- "last_update_error": "string",
- "le_certificate_status": "active",
- "name": "Some name",
- "origin_type": "custom",
- "provider": "Selectel",
- "read_only": true,
- "status": "active"
}
}
Updates a CDN resource by provided attributes.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
ResourceID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Resource identifier. |
Payload
required | object |
name required | string Name of the resource. |
{- "config": {
- "certificate": {
- "certificate": "string",
- "name": "string",
- "private_key": "string",
- "provider_cert_id": 0
}, - "client_hostnames": [
- "cdn.example.com"
], - "options": {
- "brotli_compression": {
- "enabled": true,
- "value": [
- "text/html"
]
}, - "custom_host_header": "samplehost.com",
- "edge_server_cache_expire": 86400,
- "forward_host_header": true,
- "gzip_compression": true,
- "ignore_cookie": true,
- "ignore_query_string": true,
- "image_stack": {
- "avif_enabled": true,
- "enabled": true,
- "png_lossless": true,
- "quality": 90,
- "webp_enabled": true
}, - "large_file_optimisation": true,
- "origin_compression": true,
- "security_options": {
- "cors": {
- "access_control_allow_origin": [
- "host1.com",
- "host2.org"
], - "always": false
}, - "country_acl": {
- "list": [
- "RU",
- "SW"
]
}, - "ip_acl": {
- "list": [
- "string"
]
}, - "redirect_http_to_https": true,
- "referrer_acl": {
- "list": [
- "string"
]
}, - "secure_key": {
- "include_ip": true,
- "value": "15315f61c4bc9044b8"
}, - "user_agent": {
- "list": [
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
]
}
}, - "serve_stale": [
- "http_500",
- "http_502"
], - "set_custom_cache_headers": 86400,
- "shielding": true
}, - "origin_hostnames": [
- "example.com"
], - "origin_ips": [
- "1.1.1.1"
], - "origin_protocol": "HTTPS",
- "provider_type": "Selectel"
}, - "name": "string"
}
{- "resource": {
- "config": {
- "client_hostnames": [
- "somehostname.co"
], - "default_client_hostname": "33251cee-9ff9-44fc-bda6-d549841236ca.fake.co",
- "options": {
- "brotli_compression": {
- "enabled": true,
- "value": [
- "text/html"
]
}, - "client_location": "INDIA",
- "content_characteristics": {
- "catalogue_size": "LARGE",
- "content_type": "GAME",
- "object_size": "TEN_MB_TO_100_MB",
- "popularity_distribution": "LONG_TAIL"
}, - "custom_host_header": "someHeader",
- "custom_origin_headers": {
- "{header1": "value1",
- "header2": "value2}"
}, - "edge_server_cache_expire": 86400,
- "forward_host_header": true,
- "gzip_compression": true,
- "ignore_cookie": true,
- "ignore_query_string": true,
- "image_stack": {
- "avif_enabled": true,
- "enabled": true,
- "png_lossless": true,
- "quality": 90,
- "webp_enabled": true
}, - "large_file_optimisation": true,
- "origin_compression": true,
- "origin_location": "GERMANY",
- "security_options": {
- "cors": {
- "access_control_allow_origin": [
- "host1.com",
- "host2.org"
], - "always": false
}, - "country_acl": {
- "list": [
- "RU",
- "SW"
]
}, - "ip_acl": {
- "list": [
- "string"
]
}, - "redirect_http_to_https": true,
- "referrer_acl": {
- "list": [
- "string"
]
}, - "secure_key": {
- "include_ip": true,
- "value": "15315f61c4bc9044b8"
}, - "user_agent": {
- "list": [
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
]
}
}, - "serve_stale": [
- "http_429",
- "http_500"
], - "set_custom_cache_headers": 86400,
- "shielding": false
}, - "origin_hostnames": [
- "someoriginhostname.co"
], - "origin_ips": [
- "127.0.0.1:443",
- "[eb59:10b8:32db:ca57:7d49:a56e:445:ec20]:8080"
], - "origin_protocol": "HTTPS"
}, - "id": "33251cee-9ff9-44fc-bda6-d549841236ca",
- "internal_fqdn": "33251cee-9ff9-44fc-bda6-d549841236ca.selcdn.ru",
- "last_update_error": "string",
- "le_certificate_status": "active",
- "name": "Some name",
- "origin_type": "custom",
- "provider": "Selectel",
- "read_only": true,
- "status": "active"
}
}
Checks the status of a CDN resource.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
ResourceID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Resource identifier. |
Payload
container | string |
domain required | string |
file_path required | string |
{- "container": "string",
- "domain": "example.com",
- "file_path": "string"
}
{- "cname": true,
- "origin_file": true,
- "resource_file": true
}
Enables Let's Encrypt® certificate for a CDN resource.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
ResourceID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Resource identifier. |
{- "resource": {
- "config": {
- "client_hostnames": [
- "somehostname.co"
], - "default_client_hostname": "33251cee-9ff9-44fc-bda6-d549841236ca.fake.co",
- "options": {
- "brotli_compression": {
- "enabled": true,
- "value": [
- "text/html"
]
}, - "client_location": "INDIA",
- "content_characteristics": {
- "catalogue_size": "LARGE",
- "content_type": "GAME",
- "object_size": "TEN_MB_TO_100_MB",
- "popularity_distribution": "LONG_TAIL"
}, - "custom_host_header": "someHeader",
- "custom_origin_headers": {
- "{header1": "value1",
- "header2": "value2}"
}, - "edge_server_cache_expire": 86400,
- "forward_host_header": true,
- "gzip_compression": true,
- "ignore_cookie": true,
- "ignore_query_string": true,
- "image_stack": {
- "avif_enabled": true,
- "enabled": true,
- "png_lossless": true,
- "quality": 90,
- "webp_enabled": true
}, - "large_file_optimisation": true,
- "origin_compression": true,
- "origin_location": "GERMANY",
- "security_options": {
- "cors": {
- "access_control_allow_origin": [
- "host1.com",
- "host2.org"
], - "always": false
}, - "country_acl": {
- "list": [
- "RU",
- "SW"
]
}, - "ip_acl": {
- "list": [
- "string"
]
}, - "redirect_http_to_https": true,
- "referrer_acl": {
- "list": [
- "string"
]
}, - "secure_key": {
- "include_ip": true,
- "value": "15315f61c4bc9044b8"
}, - "user_agent": {
- "list": [
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
]
}
}, - "serve_stale": [
- "http_429",
- "http_500"
], - "set_custom_cache_headers": 86400,
- "shielding": false
}, - "origin_hostnames": [
- "someoriginhostname.co"
], - "origin_ips": [
- "127.0.0.1:443",
- "[eb59:10b8:32db:ca57:7d49:a56e:445:ec20]:8080"
], - "origin_protocol": "HTTPS"
}, - "id": "33251cee-9ff9-44fc-bda6-d549841236ca",
- "internal_fqdn": "33251cee-9ff9-44fc-bda6-d549841236ca.selcdn.ru",
- "last_update_error": "string",
- "le_certificate_status": "active",
- "name": "Some name",
- "origin_type": "custom",
- "provider": "Selectel",
- "read_only": true,
- "status": "active"
}
}
Prefetches content into the cache for a CDN resource.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
ResourceID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Resource identifier. |
Payload
paths required | Array of strings File paths to be prefetched. |
{- "paths": [
- "/path/file1.jpg",
- "*/images/*.jpg"
]
}
{- "error": {
- "id": "584105f1-7c20-4fb2-af1a-e96ee6a73752",
- "message": "object not found"
}
}
Purges the cache for a CDN resource.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
ResourceID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Resource identifier. |
Payload with purge paths.
paths required | Array of strings File paths to be purged. |
{- "paths": [
- "/path/file1.jpg",
- "*/images/*.jpg"
]
}
{- "error": {
- "id": "584105f1-7c20-4fb2-af1a-e96ee6a73752",
- "message": "object not found"
}
}
Renames a CDN resource.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
ResourceID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Resource identifier. |
Payload
name required | string New name of the resource. |
{- "name": "My CDN Resource"
}
{- "resource": {
- "config": {
- "client_hostnames": [
- "somehostname.co"
], - "default_client_hostname": "33251cee-9ff9-44fc-bda6-d549841236ca.fake.co",
- "options": {
- "brotli_compression": {
- "enabled": true,
- "value": [
- "text/html"
]
}, - "client_location": "INDIA",
- "content_characteristics": {
- "catalogue_size": "LARGE",
- "content_type": "GAME",
- "object_size": "TEN_MB_TO_100_MB",
- "popularity_distribution": "LONG_TAIL"
}, - "custom_host_header": "someHeader",
- "custom_origin_headers": {
- "{header1": "value1",
- "header2": "value2}"
}, - "edge_server_cache_expire": 86400,
- "forward_host_header": true,
- "gzip_compression": true,
- "ignore_cookie": true,
- "ignore_query_string": true,
- "image_stack": {
- "avif_enabled": true,
- "enabled": true,
- "png_lossless": true,
- "quality": 90,
- "webp_enabled": true
}, - "large_file_optimisation": true,
- "origin_compression": true,
- "origin_location": "GERMANY",
- "security_options": {
- "cors": {
- "access_control_allow_origin": [
- "host1.com",
- "host2.org"
], - "always": false
}, - "country_acl": {
- "list": [
- "RU",
- "SW"
]
}, - "ip_acl": {
- "list": [
- "string"
]
}, - "redirect_http_to_https": true,
- "referrer_acl": {
- "list": [
- "string"
]
}, - "secure_key": {
- "include_ip": true,
- "value": "15315f61c4bc9044b8"
}, - "user_agent": {
- "list": [
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
]
}
}, - "serve_stale": [
- "http_429",
- "http_500"
], - "set_custom_cache_headers": 86400,
- "shielding": false
}, - "origin_hostnames": [
- "someoriginhostname.co"
], - "origin_ips": [
- "127.0.0.1:443",
- "[eb59:10b8:32db:ca57:7d49:a56e:445:ec20]:8080"
], - "origin_protocol": "HTTPS"
}, - "id": "33251cee-9ff9-44fc-bda6-d549841236ca",
- "internal_fqdn": "33251cee-9ff9-44fc-bda6-d549841236ca.selcdn.ru",
- "last_update_error": "string",
- "le_certificate_status": "active",
- "name": "Some name",
- "origin_type": "custom",
- "provider": "Selectel",
- "read_only": true,
- "status": "active"
}
}
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
ResourceID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Resource identifier. |
{- "resource": {
- "config": {
- "client_hostnames": [
- "somehostname.co"
], - "default_client_hostname": "33251cee-9ff9-44fc-bda6-d549841236ca.fake.co",
- "options": {
- "brotli_compression": {
- "enabled": true,
- "value": [
- "text/html"
]
}, - "client_location": "INDIA",
- "content_characteristics": {
- "catalogue_size": "LARGE",
- "content_type": "GAME",
- "object_size": "TEN_MB_TO_100_MB",
- "popularity_distribution": "LONG_TAIL"
}, - "custom_host_header": "someHeader",
- "custom_origin_headers": {
- "{header1": "value1",
- "header2": "value2}"
}, - "edge_server_cache_expire": 86400,
- "forward_host_header": true,
- "gzip_compression": true,
- "ignore_cookie": true,
- "ignore_query_string": true,
- "image_stack": {
- "avif_enabled": true,
- "enabled": true,
- "png_lossless": true,
- "quality": 90,
- "webp_enabled": true
}, - "large_file_optimisation": true,
- "origin_compression": true,
- "origin_location": "GERMANY",
- "security_options": {
- "cors": {
- "access_control_allow_origin": [
- "host1.com",
- "host2.org"
], - "always": false
}, - "country_acl": {
- "list": [
- "RU",
- "SW"
]
}, - "ip_acl": {
- "list": [
- "string"
]
}, - "redirect_http_to_https": true,
- "referrer_acl": {
- "list": [
- "string"
]
}, - "secure_key": {
- "include_ip": true,
- "value": "15315f61c4bc9044b8"
}, - "user_agent": {
- "list": [
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
]
}
}, - "serve_stale": [
- "http_429",
- "http_500"
], - "set_custom_cache_headers": 86400,
- "shielding": false
}, - "origin_hostnames": [
- "someoriginhostname.co"
], - "origin_ips": [
- "127.0.0.1:443",
- "[eb59:10b8:32db:ca57:7d49:a56e:445:ec20]:8080"
], - "origin_protocol": "HTTPS"
}, - "id": "33251cee-9ff9-44fc-bda6-d549841236ca",
- "internal_fqdn": "33251cee-9ff9-44fc-bda6-d549841236ca.selcdn.ru",
- "last_update_error": "string",
- "le_certificate_status": "active",
- "name": "Some name",
- "origin_type": "custom",
- "provider": "Selectel",
- "read_only": true,
- "status": "active"
}
}
Suspends a CDN resource.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
ResourceID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Resource identifier. |
{- "resource": {
- "config": {
- "client_hostnames": [
- "somehostname.co"
], - "default_client_hostname": "33251cee-9ff9-44fc-bda6-d549841236ca.fake.co",
- "options": {
- "brotli_compression": {
- "enabled": true,
- "value": [
- "text/html"
]
}, - "client_location": "INDIA",
- "content_characteristics": {
- "catalogue_size": "LARGE",
- "content_type": "GAME",
- "object_size": "TEN_MB_TO_100_MB",
- "popularity_distribution": "LONG_TAIL"
}, - "custom_host_header": "someHeader",
- "custom_origin_headers": {
- "{header1": "value1",
- "header2": "value2}"
}, - "edge_server_cache_expire": 86400,
- "forward_host_header": true,
- "gzip_compression": true,
- "ignore_cookie": true,
- "ignore_query_string": true,
- "image_stack": {
- "avif_enabled": true,
- "enabled": true,
- "png_lossless": true,
- "quality": 90,
- "webp_enabled": true
}, - "large_file_optimisation": true,
- "origin_compression": true,
- "origin_location": "GERMANY",
- "security_options": {
- "cors": {
- "access_control_allow_origin": [
- "host1.com",
- "host2.org"
], - "always": false
}, - "country_acl": {
- "list": [
- "RU",
- "SW"
]
}, - "ip_acl": {
- "list": [
- "string"
]
}, - "redirect_http_to_https": true,
- "referrer_acl": {
- "list": [
- "string"
]
}, - "secure_key": {
- "include_ip": true,
- "value": "15315f61c4bc9044b8"
}, - "user_agent": {
- "list": [
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
]
}
}, - "serve_stale": [
- "http_429",
- "http_500"
], - "set_custom_cache_headers": 86400,
- "shielding": false
}, - "origin_hostnames": [
- "someoriginhostname.co"
], - "origin_ips": [
- "127.0.0.1:443",
- "[eb59:10b8:32db:ca57:7d49:a56e:445:ec20]:8080"
], - "origin_protocol": "HTTPS"
}, - "id": "33251cee-9ff9-44fc-bda6-d549841236ca",
- "internal_fqdn": "33251cee-9ff9-44fc-bda6-d549841236ca.selcdn.ru",
- "last_update_error": "string",
- "le_certificate_status": "active",
- "name": "Some name",
- "origin_type": "custom",
- "provider": "Selectel",
- "read_only": true,
- "status": "active"
}
}
Returns logs for all CDN resources.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
from required | string <date-time> Example: from=2023-08-01T00:00:00Z Get logs from this time. |
to required | string <date-time> Example: to=2023-09-01T00:00:00Z Get logs up to this time. |
{- "data": [
- {
- "cache_status": "string",
- "client_ip": "string",
- "cname": "string",
- "method": "string",
- "path": "string",
- "referer": "string",
- "resource_id": "string",
- "sent_http_content_type": "string",
- "size": 0,
- "status": 0,
- "tcpinfo_rtt": 0,
- "timestamp": 0,
- "user_agent": "string"
}
], - "meta": {
- "count": 0
}
}
Returns url to download file with collected logs for all CDN resources.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
"string"
Returns a list of all tasks for collecting logs.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
{- "tasks": [
- {
- "created": "string",
- "id": "string",
- "progress": 0,
- "status": 0,
- "type": "string",
- "updated": "string"
}
]
}
Creates a new log collection task.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
Payload
container | string Target container to which logs will be saved (will be created if does not exist). |
delete_after | integer If specified, log objects will be deleted after the specified number of seconds. |
fields | Array of strings If specified, only these fields will be exported. |
object If specified, logs will be filtered by these fields. Pass field and values like {"host": ["domain.ru", "another-domain.com"]} | |
provider required | string CDN provider type. Only Selectel is supported now. |
since required | string Start of the export period, date and time in ISO 8601 format without timezone. |
till required | string End of the export period, date and time in ISO 8601 format without timezone. |
{- "container": "cdn_logs",
- "delete_after": 3600,
- "fields": [
- "host",
- "client_ip",
- "origin_host",
- "timestamp",
- "server_to_client_bytes"
], - "filters": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "provider": "selectel",
- "since": "2020-08-01T15:04:05",
- "till": "2020-08-01T15:04:05"
}
{- "created": "string",
- "data": {
- "container": "string",
- "delete_after": 0,
- "fields": [
- "string"
], - "filters": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "provider": "string",
- "since": "string",
- "till": "string"
}, - "id": "string",
- "progress": 0,
- "status": "string",
- "type": "string",
- "updated": "string"
}
Returns information about a specific task.
ProjectID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Project identifier. |
TaskID required | string <uuid> Example: 33251cee-9ff9-44fc-bda6-d549841236ca Log collection task identifier. |
{- "created": "string",
- "data": {
- "container": "string",
- "delete_after": 0,
- "fields": [
- "string"
], - "filters": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "provider": "string",
- "since": "string",
- "till": "string"
}, - "id": "string",
- "progress": 0,
- "status": "string",
- "type": "string",
- "updated": "string"
}
Returns a list of the IP addresses of all CDN servers that can pull content from your source. This list updates occasionally.
{- "ip_addresses": {
- "addresses_v4": [
- "10.20.30.40/32"
], - "addresses_v6": [
- "2a11:27c0:1a1:2803::173/128"
]
}
}
Returns a list of all CDN networks which servers can pull content from your source. This list updates occasionally.
{- "subnetList": {
- "addresses_v4": [
- "10.20.30.24/30"
], - "addresses_v6": [
- "2a11:27c0:181:2801::/64"
]
}
}