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

CDN API (v0.0.1)

Managing CDN resources, cache tasks, SSL certificates, Let's Encrypt certificates, and more.

Resources

Managing CDN resources: viewing a list of resources, creating, updating, and deleting resources.

List resources

Returns a list of resources in the project.

Authorizations:
iam_token_project_scoped
query Parameters
active
boolean
Default: true

Filter by active/deactivated resources.

header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create resource

Creates an HTTP CDN resource for the project.

Authorizations:
iam_token_project_scoped
header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Request Body schema: application/json
required

HTTP resource create payload.

active
boolean
Default: true

Indicates whether the resource is active.

allowed_http_methods
Array of strings
Items Enum: "POST" "PUT" "PATCH" "DELETE" "MKCOL" "COPY" "MOVE" "PROPFIND" "PROPPATCH" "LOCK" "UNLOCK"

List of allowed HTTP methods. GET, HEAD, and OPTIONS are always allowed.

object

User request authorization settings.

object

Cache settings.

cdn_domain
string

CDN domain for distribution (read-only).

certificate
integer

Identifier of the SSL certificate to bind to the resource.

object

Compression settings.

object

CORS settings.

creation_ts
integer

Resource creation timestamp (read-only).

follow_redirects
boolean
Default: false

Indicates whether to follow redirects.

object

Headers settings.

http2https
boolean
Default: false

If true, HTTP will be automatically redirected to HTTPS during distribution.

https_only
boolean
Default: false

If true, only HTTPS will be used during distribution.

id
string

Identifier of the HTTP resource (read-only).

ioss
boolean
Default: false

Indicates whether image optimization and modification is enabled.

object

Distribution restrictions by geography, IP, Referer, or UserAgent.

object

Rules for specific request paths. Key: path pattern (e.g., /images, /video/*). Value: location-specific configuration.

modern_tls_only
boolean
Default: false

If true, only modern TLS versions will be used.

name
required
string

Resource name. Pattern: ^[a-zA-Zа-яА-ЯёЁ0-9\-\_\ ]{1,50}$.

names
Array of strings

Canonical Names (CNAMEs) for the CDN domain.

no_http2
boolean
Default: false

If true, HTTP/2 will be disabled.

object

Origin server parameters.

object

Video conversion.

object

Forced response instead of content.

Array of objects (models.ResourceRewrite)

Request path rewrite rules.

object

robots.txt settings.

slice_size_megabytes
integer [ 1 .. 1024 ]
Default: 0

Slice size in MB (only when tuning is large).

ssl_protocols
Array of strings
Items Enum: "TLSv1" "TLSv1.1" "TLSv1.2" "TLSv1.3" "SSLv3"

List of allowed TLS versions.

strong_ssl_ciphers
boolean
Default: false

If true, strong SSL ciphers will be used (requires modern_tls_only to be true).

tuning
string
Default: "default"
Enum: "default" "large" "live"

Distribution optimization:

  • default - for small static files;
  • large - for large files over 20 MB;
  • live - for HTTP LIVE streams.
use_http3
boolean
Default: false

Indicates whether to use HTTP/3.

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "allowed_http_methods": [
    ],
  • "auth": {
    },
  • "cache": {
    },
  • "cdn_domain": "6d19b7a2-a493-48fa-a9ec-aea7ba9ffa28.selcdn.net",
  • "certificate": 1,
  • "compress": {
    },
  • "cors": {
    },
  • "creation_ts": 1708581262,
  • "follow_redirects": false,
  • "headers": {
    },
  • "http2https": false,
  • "https_only": false,
  • "id": "6d19b7a2-a493-48fa-a9ec-aea7ba9ffa28",
  • "ioss": false,
  • "limitations": {
    },
  • "locations": {
    },
  • "modern_tls_only": false,
  • "name": "testname",
  • "names": [
    ],
  • "no_http2": false,
  • "origin": {
    },
  • "packaging": {
    },
  • "return": {
    },
  • "rewrite": [
    ],
  • "robots": {
    },
  • "slice_size_megabytes": 16,
  • "ssl_protocols": [
    ],
  • "strong_ssl_ciphers": false,
  • "tuning": "default",
  • "use_http3": false
}

Response samples

Content type
application/json
{
  • "cdn_domain": "6d19b7a2-a493-48fa-a9ec-aea7ba9ffa28.selcdn.net",
  • "description": "Key incorrect or not found ( origin )",
  • "message": "Json invalid",
  • "resource_id": "6d19b7a2-a493-48fa-a9ec-aea7ba9ffa28",
  • "status": "accept",
  • "task_id": "20180402162358692400"
}

Get resource by identifier

Returns the resource by its identifier.

Authorizations:
iam_token_project_scoped
path Parameters
resource_id
required
string <uuid>

Resource identifier.

header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Responses

Response samples

Content type
application/json
{
  • "active": true,
  • "allowed_http_methods": [
    ],
  • "auth": {
    },
  • "cache": {
    },
  • "cdn_domain": "6d19b7a2-a493-48fa-a9ec-aea7ba9ffa28.selcdn.net",
  • "certificate": 1,
  • "compress": {
    },
  • "cors": {
    },
  • "creation_ts": 1708581262,
  • "follow_redirects": false,
  • "headers": {
    },
  • "http2https": false,
  • "https_only": false,
  • "id": "6d19b7a2-a493-48fa-a9ec-aea7ba9ffa28",
  • "ioss": false,
  • "limitations": {
    },
  • "locations": {
    },
  • "modern_tls_only": false,
  • "name": "testname",
  • "names": [
    ],
  • "no_http2": false,
  • "origin": {
    },
  • "packaging": {
    },
  • "return": {
    },
  • "rewrite": [
    ],
  • "robots": {
    },
  • "slice_size_megabytes": 16,
  • "ssl_protocols": [
    ],
  • "strong_ssl_ciphers": false,
  • "tuning": "default",
  • "use_http3": false
}

Partially update resource

Partially updates the first-level fields of the HTTP resource with the payload from the request body.

Authorizations:
iam_token_project_scoped
path Parameters
resource_id
required
string <uuid>

Resource identifier.

header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Request Body schema: application/json
required

HTTP resource patch payload.

active
boolean
Default: true

Indicates whether the resource is active.

allowed_http_methods
Array of strings
Items Enum: "POST" "PUT" "PATCH" "DELETE" "MKCOL" "COPY" "MOVE" "PROPFIND" "PROPPATCH" "LOCK" "UNLOCK"

List of allowed HTTP methods. GET, HEAD, and OPTIONS are always allowed.

object

User request authorization settings.

object

Cache settings.

cdn_domain
string

CDN domain for distribution (read-only).

certificate
integer

Identifier of the SSL certificate to bind to the resource.

object

Compression settings.

object

CORS settings.

creation_ts
integer

Resource creation timestamp (read-only).

follow_redirects
boolean
Default: false

Indicates whether to follow redirects.

object

Headers settings.

http2https
boolean
Default: false

If true, HTTP will be automatically redirected to HTTPS during distribution.

https_only
boolean
Default: false

If true, only HTTPS will be used during distribution.

id
string

Identifier of the HTTP resource (read-only).

ioss
boolean
Default: false

Indicates whether image optimization and modification is enabled.

object

Distribution restrictions by geography, IP, Referer, or UserAgent.

object

Rules for specific request paths. Key: path pattern (e.g., /images, /video/*). Value: location-specific configuration.

modern_tls_only
boolean
Default: false

If true, only modern TLS versions will be used.

name
required
string

Resource name. Pattern: ^[a-zA-Zа-яА-ЯёЁ0-9\-\_\ ]{1,50}$.

names
Array of strings

Canonical Names (CNAMEs) for the CDN domain.

no_http2
boolean
Default: false

If true, HTTP/2 will be disabled.

object

Origin server parameters.

object

Video conversion.

object

Forced response instead of content.

Array of objects (models.ResourceRewrite)

Request path rewrite rules.

object

robots.txt settings.

slice_size_megabytes
integer [ 1 .. 1024 ]
Default: 0

Slice size in MB (only when tuning is large).

ssl_protocols
Array of strings
Items Enum: "TLSv1" "TLSv1.1" "TLSv1.2" "TLSv1.3" "SSLv3"

List of allowed TLS versions.

strong_ssl_ciphers
boolean
Default: false

If true, strong SSL ciphers will be used (requires modern_tls_only to be true).

tuning
string
Default: "default"
Enum: "default" "large" "live"

Distribution optimization:

  • default - for small static files;
  • large - for large files over 20 MB;
  • live - for HTTP LIVE streams.
use_http3
boolean
Default: false

Indicates whether to use HTTP/3.

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "allowed_http_methods": [
    ],
  • "auth": {
    },
  • "cache": {
    },
  • "cdn_domain": "6d19b7a2-a493-48fa-a9ec-aea7ba9ffa28.selcdn.net",
  • "certificate": 1,
  • "compress": {
    },
  • "cors": {
    },
  • "creation_ts": 1708581262,
  • "follow_redirects": false,
  • "headers": {
    },
  • "http2https": false,
  • "https_only": false,
  • "id": "6d19b7a2-a493-48fa-a9ec-aea7ba9ffa28",
  • "ioss": false,
  • "limitations": {
    },
  • "locations": {
    },
  • "modern_tls_only": false,
  • "name": "testname",
  • "names": [
    ],
  • "no_http2": false,
  • "origin": {
    },
  • "packaging": {
    },
  • "return": {
    },
  • "rewrite": [
    ],
  • "robots": {
    },
  • "slice_size_megabytes": 16,
  • "ssl_protocols": [
    ],
  • "strong_ssl_ciphers": false,
  • "tuning": "default",
  • "use_http3": false
}

Response samples

Content type
application/json
{
  • "cdn_domain": "6d19b7a2-a493-48fa-a9ec-aea7ba9ffa28.selcdn.net",
  • "description": "Key incorrect or not found ( origin )",
  • "message": "Json invalid",
  • "resource_id": "6d19b7a2-a493-48fa-a9ec-aea7ba9ffa28",
  • "status": "accept",
  • "task_id": "20180402162358692400"
}

Fully update resource

Fully replaces the HTTP resource configuration with the payload from the request body.

Authorizations:
iam_token_project_scoped
path Parameters
resource_id
required
string <uuid>

Resource identifier.

header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Request Body schema: application/json
required

HTTP resource update payload.

active
boolean
Default: true

Indicates whether the resource is active.

allowed_http_methods
Array of strings
Items Enum: "POST" "PUT" "PATCH" "DELETE" "MKCOL" "COPY" "MOVE" "PROPFIND" "PROPPATCH" "LOCK" "UNLOCK"

List of allowed HTTP methods. GET, HEAD, and OPTIONS are always allowed.

object

User request authorization settings.

object

Cache settings.

cdn_domain
string

CDN domain for distribution (read-only).

certificate
integer

Identifier of the SSL certificate to bind to the resource.

object

Compression settings.

object

CORS settings.

creation_ts
integer

Resource creation timestamp (read-only).

follow_redirects
boolean
Default: false

Indicates whether to follow redirects.

object

Headers settings.

http2https
boolean
Default: false

If true, HTTP will be automatically redirected to HTTPS during distribution.

https_only
boolean
Default: false

If true, only HTTPS will be used during distribution.

id
string

Identifier of the HTTP resource (read-only).

ioss
boolean
Default: false

Indicates whether image optimization and modification is enabled.

object

Distribution restrictions by geography, IP, Referer, or UserAgent.

object

Rules for specific request paths. Key: path pattern (e.g., /images, /video/*). Value: location-specific configuration.

modern_tls_only
boolean
Default: false

If true, only modern TLS versions will be used.

name
required
string

Resource name. Pattern: ^[a-zA-Zа-яА-ЯёЁ0-9\-\_\ ]{1,50}$.

names
Array of strings

Canonical Names (CNAMEs) for the CDN domain.

no_http2
boolean
Default: false

If true, HTTP/2 will be disabled.

object

Origin server parameters.

object

Video conversion.

object

Forced response instead of content.

Array of objects (models.ResourceRewrite)

Request path rewrite rules.

object

robots.txt settings.

slice_size_megabytes
integer [ 1 .. 1024 ]
Default: 0

Slice size in MB (only when tuning is large).

ssl_protocols
Array of strings
Items Enum: "TLSv1" "TLSv1.1" "TLSv1.2" "TLSv1.3" "SSLv3"

List of allowed TLS versions.

strong_ssl_ciphers
boolean
Default: false

If true, strong SSL ciphers will be used (requires modern_tls_only to be true).

tuning
string
Default: "default"
Enum: "default" "large" "live"

Distribution optimization:

  • default - for small static files;
  • large - for large files over 20 MB;
  • live - for HTTP LIVE streams.
use_http3
boolean
Default: false

Indicates whether to use HTTP/3.

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "allowed_http_methods": [
    ],
  • "auth": {
    },
  • "cache": {
    },
  • "cdn_domain": "6d19b7a2-a493-48fa-a9ec-aea7ba9ffa28.selcdn.net",
  • "certificate": 1,
  • "compress": {
    },
  • "cors": {
    },
  • "creation_ts": 1708581262,
  • "follow_redirects": false,
  • "headers": {
    },
  • "http2https": false,
  • "https_only": false,
  • "id": "6d19b7a2-a493-48fa-a9ec-aea7ba9ffa28",
  • "ioss": false,
  • "limitations": {
    },
  • "locations": {
    },
  • "modern_tls_only": false,
  • "name": "testname",
  • "names": [
    ],
  • "no_http2": false,
  • "origin": {
    },
  • "packaging": {
    },
  • "return": {
    },
  • "rewrite": [
    ],
  • "robots": {
    },
  • "slice_size_megabytes": 16,
  • "ssl_protocols": [
    ],
  • "strong_ssl_ciphers": false,
  • "tuning": "default",
  • "use_http3": false
}

Response samples

Content type
application/json
{
  • "cdn_domain": "6d19b7a2-a493-48fa-a9ec-aea7ba9ffa28.selcdn.net",
  • "description": "Key incorrect or not found ( origin )",
  • "message": "Json invalid",
  • "resource_id": "6d19b7a2-a493-48fa-a9ec-aea7ba9ffa28",
  • "status": "accept",
  • "task_id": "20180402162358692400"
}

Get resource status

Returns status for the specified HTTP resource.

Authorizations:
iam_token_project_scoped
path Parameters
resource_id
required
string <uuid>

Resource identifier.

header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Responses

Response samples

Content type
application/json
{
  • "message": "dns processing",
  • "resource": "string",
  • "status": "Completed"
}

Get resources status

Returns status for up to 50 HTTP resources. If resource_id is not provided, returns empty response.

Authorizations:
iam_token_project_scoped
query Parameters
resource_id
Array of strings

Resource identifiers (up to 50).

header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Cache

Managing cache tasks: deleting files from cache, preloading files into cache, and getting task execution status.

Create cache task

Creates a new cache task to delete or preload files in CDN cache.

Authorizations:
iam_token_project_scoped
header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Request Body schema: application/json
required

Cache task payload.

action
required
string
Enum: "delete" "preload"

Action type: delete or preload.

action_type
string
Default: "single"
Enum: "single" "full" "playlist"

Operation type:

  • single - by paths list;
  • full - clear entire domain cache (delete only);
  • playlist - from .m3u8 playlist file (preload only).
domain
required
string

Domain name (CNAME or CDN domain).

paths
Array of strings

List of file paths.

Responses

Request samples

Content type
application/json
{
  • "action": "delete",
  • "action_type": "single",
  • "domain": "6d19b7a2-a493-48fa-fa9ec-aea7ba9ffa28.selcdn.net",
  • "paths": [
    ]
}

Response samples

Content type
application/json
{
  • "task_id": "30ee3d06-b7fa-4dc7-ba84-44f4aa5bfaf0"
}

Get cache task

Returns information about a specific cache task.

Authorizations:
iam_token_project_scoped
path Parameters
task_id
required
string <string>

Task identifier.

header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Responses

Response samples

Content type
application/json
{
  • "rate": [
    ],
  • "status": "ok",
  • "task": {
    },
  • "task_id": "30ee3d06-b7fa-4dc7-ba84-44f4aa5bfaf0"
}

Certificates

Managing SSL certificates: viewing a list of certificates, adding, updating, and deleting certificates.

List certificates

Returns a list of certificates for the account.

Authorizations:
iam_token_project_scoped
header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "message": "OK",
  • "status": 0
}

Create certificate

Creates a custom certificate for the account.

Authorizations:
iam_token_project_scoped
header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Request Body schema: application/json
required

Certificate create payload.

certificate
required
string

Certificate text in PEM format.

comment
required
string

Certificate comment.

private_key
required
string

Private key text in PEM format.

Responses

Request samples

Content type
application/json
{
  • "certificate": "-----BEGIN CERTIFICATE-----\nMIIMvzCCC6egAwIBAgISBDOHrUbe+jaL2W0x4w3T5YuBMA0GCSqGSIb3DQEBCwUA\n-----END CERTIFICATE-----",
  • "comment": "new comment",
  • "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDQtDgBy3kRiv2\n-----END PRIVATE KEY-----"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "message": "cert saved",
  • "status": 0
}

Delete certificate

Deletes the certificate.

Authorizations:
iam_token_project_scoped
path Parameters
certificate_seq
required
integer <int>

Certificate sequence number.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "message": "cert deleted",
  • "status": 0
}

Get certificate

Returns the certificate details.

Authorizations:
iam_token_project_scoped
path Parameters
certificate_seq
required
integer <int>

Certificate sequence number.

query Parameters
details
boolean

If true, certificate details (PEM content) will be included.

header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "message": "OK",
  • "status": 0
}

Update certificate

Updates an existing certificate.

Authorizations:
iam_token_project_scoped
path Parameters
certificate_seq
required
integer <int>

Certificate sequence number.

Request Body schema: application/json
required

Certificate update payload.

certificate
string

New certificate text in PEM format (optional).

comment
string

New certificate comment (optional).

private_key
string

New private key text in PEM format (optional).

Responses

Request samples

Content type
application/json
{
  • "certificate": "-----BEGIN CERTIFICATE-----\nMIIMvzCCC6egAwIBAgISBDOHrUbe+jaL2W0x4w3T5YuBMA0GCSqGSIb3DQEBCwUA\n-----END CERTIFICATE-----",
  • "comment": "new comment",
  • "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDQtDgBy3kRiv2\n-----END PRIVATE KEY-----"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "message": "cert updated",
  • "status": 0
}

LetsEncrypt

Managing Let's Encrypt certificates: ordering certificates for a resource, ordering wildcard certificates, and getting order status.

Order wildcard Let's Encrypt certificate

Creates a Let's Encrypt wildcard certificate order.

Authorizations:
iam_token_project_scoped
header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Request Body schema: application/json
required

Domains for a wildcard certificate.

domains
required
Array of strings

List of domains for a wildcard certificate.

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": 0
}

Get Let's Encrypt status

Returns the Let's Encrypt order status for the resource.

Authorizations:
iam_token_project_scoped
path Parameters
resource_id
required
string <uuid>

CDN resource identifier.

header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "message": "Success",
  • "status": 0
}

Order Let's Encrypt certificate

Creates a Let's Encrypt certificate order for an existing HTTP CDN resource.

Authorizations:
iam_token_project_scoped
path Parameters
resource_id
required
string <uuid>

CDN resource identifier.

header Parameters
X-Project-Id
required
string <uuid>

Project identifier.

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": 0
}