Перейти к основному содержимому

CDN API (v2.0)

Selectel CDN Team: support@selectel.ru License: Selectel EULA

Managing resources and logs

Extras

List IP addresses.

Authorizations:
X-Token

Responses

Response samples

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

List subnets.

Authorizations:
X-Token

Responses

Response samples

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

Projects

List of projects.

Authorizations:
X-Token

Responses

Response samples

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

Create project.

Authorizations:
X-Token

Responses

Response samples

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

Get project.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

Responses

Response samples

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

Get project limits.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

Responses

Response samples

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

Get project quotas.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

Responses

Response samples

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

Update project quotas.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

Request Body schema: application/json
required

Dictionary containing provider as key and limit value as value

property name*
additional property
integer

Responses

Request samples

Content type
application/json
{
  • "property1": 0,
  • "property2": 0
}

Response samples

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

Logs

Get logs for all CDN resources.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

query Parameters
from
required
string <date-time>
Example: from=2023-08-01T00:00:00Z

Gather logs from this time

to
required
string <date-time>
Example: to=2023-09-01T00:00:00Z

Gather logs up to this time

Responses

Response samples

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

Get logs for all CDN resources.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

Responses

Response samples

Content type
application/json
"string"

List of collecting logs.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

Responses

Response samples

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

Create new task of collecting logs.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

Request Body schema: application/json
required

Payload

container
string

Container Target container (will be created if it does not exist)

delete_after
integer

DeleteAfter Delete logs after specified timeout (in seconds)

fields
Array of strings

Fields Log's fields list

object

Filter Log's filters map. Pass field and values like {"host": ["domain.ru", "another-domain.com"]}

provider
required
string

Provider CDN provider type selectel or akamai

since
required
string

date-time without time-zone ISO8601

till
required
string

date-time without time-zone ISO8601

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 info.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

TaskID
required
string <uuid>

ID log collecting task

Responses

Response samples

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

Resources

List CDN resource.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

Responses

Response samples

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

Create CDN resource.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

Request Body schema: application/json
required

Payload

required
object
custom_hostname
string

CustomHostname custom third level domain for akamai CDN. This option can't be used with Selectel CDN

name
required
string
origin_type
required
string

Responses

Request samples

Content type
application/json
{
  • "config": {
    },
  • "custom_hostname": "my-fake.akamaized.net",
  • "name": "My CDN Resource",
  • "origin_type": "custom"
}

Response samples

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

Delete CDN resource.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

ResourceID
required
string <uuid>

ID of CDN resource

Responses

Response samples

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

Get CDN resource.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

ResourceID
required
string <uuid>

ID of CDN resource

Responses

Response samples

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

Update CDN resource.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

ResourceID
required
string <uuid>

ID of CDN resource

Request Body schema: application/json
required

Payload

required
object
name
required
string

Responses

Request samples

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

Response samples

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

Check CDN resource. Deprecated

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

ResourceID
required
string <uuid>

ID of CDN resource

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.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

ResourceID
required
string <uuid>

ID of CDN resource

Responses

Response samples

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

Prefetch cache for CDN resource.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

ResourceID
required
string <uuid>

ID of CDN resource

Request Body schema: application/json
required

Payload

paths
required
Array of strings

Responses

Request samples

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

Response samples

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

Purge cache for CDN resource.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

ResourceID
required
string <uuid>

ID of CDN resource

Request Body schema: application/json
required

Payload

paths
required
Array of strings

Responses

Request samples

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

Response samples

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

Rename CDN resource.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

ResourceID
required
string <uuid>

ID of CDN resource

Request Body schema: application/json
required

Payload

name
required
string

Responses

Request samples

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

Response samples

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

Resume CDN resource.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

ResourceID
required
string <uuid>

ID of CDN resource

Responses

Response samples

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

Suspend CDN resource.

Authorizations:
X-Token
path Parameters
ProjectID
required
string <uuid>

ID of CDN project

ResourceID
required
string <uuid>

ID of CDN resource

Responses

Response samples

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