Skip to main content

CDN Manager API

Managing CDN resources: creating resources, retrieving CDN servers information, prefetching and purging resource's CDN caches, and more

Projects

Managing projects including creating, retrieving, viewing project limits and quotas.

List projects

Returns a list of projects.

Authorizations:
static_token

Responses

Response samples

Content type
application/json
{
  • "projects": [
    ]
}

Create project

Creates a new project.

Authorizations:
static_token

Responses

Response samples

Content type
application/json
{
  • "project": {
    }
}

Get project

Returns information about a specific project.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

Responses

Response samples

Content type
application/json
{
  • "project": {
    }
}

Get project limits

Returns the limits for a project.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

Responses

Response samples

Content type
application/json
{
  • "current_values": [
    ],
  • "project_limits": [
    ]
}

Get project quotas

Returns the quotas for a project.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

Responses

Response samples

Content type
application/json
{
  • "selectel_resources": {
    }
}

Resources

Managing resources, prefetching and purging resource's CDN caches, enabling Let's Encrypt® certificates.

List CDN resource

Returns a list of CDN resources.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

Responses

Response samples

Content type
application/json
{
  • "resources": [
    ]
}

Create CDN resource

Creates a new CDN resource.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

Request Body schema: application/json
required

Payload

required
object
name
required
string

Name of the resource.

origin_type
required
string

Origin type of the resource.

Responses

Request samples

Content type
application/json
{
  • "config": {
    },
  • "name": "My CDN Resource",
  • "origin_type": "custom"
}

Response samples

Content type
application/json
{
  • "resource": {
    }
}

Delete CDN resource

Deletes a CDN resource.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

ResourceID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Resource identifier.

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get CDN resource

Returns information about a specific CDN resource.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

ResourceID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Resource identifier.

Responses

Response samples

Content type
application/json
{
  • "resource": {
    }
}

Update CDN resource

Updates a CDN resource by provided attributes.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

ResourceID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Resource identifier.

Request Body schema: application/json
required

Payload

required
object
name
required
string

Name of the resource.

Responses

Request samples

Content type
application/json
{
  • "config": {
    },
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "resource": {
    }
}

Check CDN resource Deprecated

Checks the status of a CDN resource.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

ResourceID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Resource identifier.

Request Body schema: application/json
required

Payload

container
string
domain
required
string
file_path
required
string

Responses

Request samples

Content type
application/json
{
  • "container": "string",
  • "domain": "example.com",
  • "file_path": "string"
}

Response samples

Content type
application/json
{
  • "cname": true,
  • "origin_file": true,
  • "resource_file": true
}

Enable LE for CDN resource

Enables Let's Encrypt® certificate for a CDN resource.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

ResourceID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Resource identifier.

Responses

Response samples

Content type
application/json
{
  • "resource": {
    }
}

Prefetch CDN resource cache

Prefetches content into the cache for a CDN resource.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

ResourceID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Resource identifier.

Request Body schema: application/json
required

Payload

paths
required
Array of strings

File paths to be prefetched.

Responses

Request samples

Content type
application/json
{
  • "paths": [
    ]
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Purge CDN resource cache

Purges the cache for a CDN resource.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

ResourceID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Resource identifier.

Request Body schema: application/json
required

Payload with purge paths.

paths
required
Array of strings

File paths to be purged.

Responses

Request samples

Content type
application/json
{
  • "paths": [
    ]
}

Response samples

Content type
application/json
{
  • "error": {
    }
}

Rename CDN resource

Renames a CDN resource.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

ResourceID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Resource identifier.

Request Body schema: application/json
required

Payload

name
required
string

New name of the resource.

Responses

Request samples

Content type
application/json
{
  • "name": "My CDN Resource"
}

Response samples

Content type
application/json
{
  • "resource": {
    }
}

Resume CDN resource

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

ResourceID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Resource identifier.

Responses

Response samples

Content type
application/json
{
  • "resource": {
    }
}

Suspend CDN resource

Suspends a CDN resource.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

ResourceID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Resource identifier.

Responses

Response samples

Content type
application/json
{
  • "resource": {
    }
}

Logs

Retrieving CDN logs and managing tasks for its collection.

Get CDN resources logs

Returns logs for all CDN resources.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

query Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Collect CDN resources logs

Returns url to download file with collected logs for all CDN resources.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

Responses

Response samples

Content type
application/json
"string"

List log collection tasks

Returns a list of all tasks for collecting logs.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

Responses

Response samples

Content type
application/json
{
  • "tasks": [
    ]
}

Create new log collection task

Creates a new log collection task.

Authorizations:
static_token
path Parameters
ProjectID
required
string <uuid>
Example: 33251cee-9ff9-44fc-bda6-d549841236ca

Project identifier.

Request Body schema: application/json
required

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.

Responses

Request samples

Content type
application/json
{
  • "container": "cdn_logs",
  • "delete_after": 3600,
  • "fields": [
    ],
  • "filters": {
    },
  • "provider": "selectel",
  • "since": "2020-08-01T15:04:05",
  • "till": "2020-08-01T15:04:05"
}

Response samples

Content type
application/json
{
  • "created": "string",
  • "data": {
    },
  • "id": "string",
  • "progress": 0,
  • "status": "string",
  • "type": "string",
  • "updated": "string"
}

Get task information

Returns information about a specific task.

Authorizations:
static_token
path Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "created": "string",
  • "data": {
    },
  • "id": "string",
  • "progress": 0,
  • "status": "string",
  • "type": "string",
  • "updated": "string"
}

Extras

Retrieving information about CDN server's networks and IP addresses.

List CDN servers IP addresses

Returns a list of the IP addresses of all CDN servers that can pull content from your source. This list updates occasionally.

Authorizations:
static_token

Responses

Response samples

Content type
application/json
{
  • "ip_addresses": {
    }
}

Get CDN servers networks

Returns a list of all CDN networks which servers can pull content from your source. This list updates occasionally.

Authorizations:
static_token

Responses

Response samples

Content type
application/json
{
  • "subnetList": {
    }
}