API for CDN partners.

This api follows the json-rpc 2.0 specification. More information available at http://www.jsonrpc.org/specification.
BASE ENDPOINT: /api/partner/jsonrpc/v1/

Authentication is performed using a Bearer Token.
You can get a token from the administrator.

get_domain
Domain

Get domain by ID.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.id integer minLength="1" Domain ID.
Result
Name Type Constraints Description
result object Domain information.
result.id integer Domain ID.
result.name string Domain name.
result.cname_url string CDN domain name for CNAME domains.
result.external_user_id integer minLength="1" External user ID.
result.partner_name string Partner name.
result.is_active boolean Is the cdn enabled for the domain.
result.on_cdn_ns boolean Is the domain located on CDN NS.
result.status string Domain activity status.
result.last_cache_refill string Datetime of last cache refill or null. Format: ISO 8601
result.last_cache_cleanup string Datetime of last cache cleanup or null. Format: ISO 8601
result.type string Domain type. Can be "delegated" or "cname".
result.role object Domain role.
result.role.name string Role name. Available roles: "static"
result.role.is_custom boolean If a customised template is required for a client.
result.role.args object Custom role arguments.
result.sitemap string The sitemap URL associated with the current domain name.
result.canonical_link string Canonical link.
result.redirect_from_80_to_443 boolean The need for redirection from port: 80 to port: 443.
result.enable_webp boolean Enables WebP image compression. Default=false. Optional.
result.ips array List of IP-addresses. Required for "delegated" domain type.
result.ips[] object IP object
result.ips[].ip string IP address.
result.ips[].is_active boolean Do you need to use this ip address to work on the CDN.
result.ips[].ttl integer TTL value. Default=60. Optional
result.port integer Port. Default=80. Optional.
Errors
Code Message Description
-31600 Domain not found The domain with this ID not found.
-31630 Domain ID is required id field is required.
-31631 Domain ID must be an integer id field must be an integer.
-31632 Domain ID must be greater then 0 id field must be greater then 0.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_domain",
  "params": {
    "id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 13,
    "name": "example.com",
    "cname_url": "d42.cdn.itglobal.com",
    "external_user_id": 13,
    "partner_name": "cdn",
    "is_active": true,
    "on_cdn_ns": true,
    "status": "OK / DISABLED / BLOCKED / CHECKING_NS_LIST / DOMAIN_NOT_DELEGATED / CREATING_SSL_CERT / SSL_CERT_CREATING_ERROR / UPDATING_DNS_RECORDS / UPDATING_DNS_RECORDS_ERROR",
    "last_cache_refill": "null / 2023-02-07T15:10:29.681269Z",
    "last_cache_cleanup": "null / 2023-02-07T15:10:29.681269Z",
    "type": "cname / delegated",
    "role": {
      "name": "static",
      "is_custom": false,
      "args": {}
    },
    "sitemap": "http://www.example.com/sitemap.xml",
    "canonical_link": "http://www.example.com",
    "redirect_from_80_to_443": true,
    "enable_webp": false,
    "ips": [
      {
        "ip": "192.168.1.1",
        "is_active": false,
        "ttl": 60
      }
    ],
    "port": 5000
  }
}

get_domains
Domain

Get domains.

Authorization is required.


Parameters
Name Type Constraints Description
params object
params.external_user_id integer minLength="1" External user ID. Optional.
params.statuses array List of statuses by which you need to filter domains. Optional.
params.statuses[] string Domain status.
params.partner_name string Partner name. Optional.
params.domain_name_eq string Filter by exact match of the domain name. Optional.
params.domain_name_lk string Filter by match of the domain name. Optional.
params.type string Filter by domain type. Optional.
Result
Name Type Constraints Description
result array List of owner domains.
result[] object Domain information.
result[].id integer Domain ID.
result[].name string Domain name.
result[].cname_url string CDN domain name for CNAME domains.
result[].external_user_id integer minLength="1" External user ID.
result[].partner_name string Partner name.
result[].is_active boolean Is the cdn enabled for the domain.
result[].on_cdn_ns boolean Is the domain located on CDN NS.
result[].status string Domain activity status.
result[].last_cache_refill string Datetime of last cache refill or null. Format: ISO 8601
result[].last_cache_cleanup string Datetime of last cache cleanup or null. Format: ISO 8601
result[].type string Domain type. Can be "delegated" or "cname".
result[].role object Domain role.
result[].role.name string Role name. Available roles: "static"
result[].role.is_custom boolean If a customised template is required for a client.
result[].role.args object Custom role arguments.
result[].sitemap string The sitemap URL associated with the current domain name.
result[].canonical_link string Canonical link.
result[].redirect_from_80_to_443 boolean The need for redirection from port: 80 to port: 443.
result[].enable_webp boolean Enables WebP image compression. Default=false. Optional.
result[].ips array List of IP-addresses. Required for "delegated" domain type.
result[].ips[] object IP object
result[].ips[].ip string IP address.
result[].ips[].is_active boolean Do you need to use this ip address to work on the CDN.
result[].ips[].ttl integer TTL value. Default=60. Optional
result[].port integer Port. Default=80. Optional.
Errors
Code Message Description
-31556 External user ID must be an integer external_user_id field must be an integer.
-31557 External user ID must be greater then 0 external_user_id field must be greater then 0.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_domains",
  "params": {
    "external_user_id": 13,
    "statuses": [
      "DISABLED",
      "BLOCKED"
    ],
    "partner_name": "cdn",
    "domain_name_eq": "api.cdn.com",
    "domain_name_lk": "cdn",
    "type": "delegated / cname"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "id": 13,
      "name": "example.com",
      "cname_url": "d42.cdn.itglobal.com",
      "external_user_id": 13,
      "partner_name": "cdn",
      "is_active": true,
      "on_cdn_ns": true,
      "status": "OK / DISABLED / BLOCKED / CHECKING_NS_LIST / DOMAIN_NOT_DELEGATED / CREATING_SSL_CERT / SSL_CERT_CREATING_ERROR / UPDATING_DNS_RECORDS / UPDATING_DNS_RECORDS_ERROR",
      "last_cache_refill": "null / 2023-02-07T15:10:29.681269Z",
      "last_cache_cleanup": "null / 2023-02-07T15:10:29.681269Z",
      "type": "cname / delegated",
      "role": {
        "name": "static",
        "is_custom": false,
        "args": {}
      },
      "sitemap": "http://www.example.com/sitemap.xml",
      "canonical_link": "http://www.example.com",
      "redirect_from_80_to_443": true,
      "enable_webp": false,
      "ips": [
        {
          "ip": "192.168.1.1",
          "is_active": false,
          "ttl": 60
        }
      ],
      "port": 5000
    }
  ]
}

create_domain
Domain

Create a domain.

Authorization is required.


Parameters
Name Type Constraints Description
params object Domain information.
params.name string Domain name. ASCII only.
params.type string The type of domain being created. "delegated" or "cname". Default="delegated". Optional.
params.role object Domain role object. Optional.
params.role.name string Role name. Available roles: "static". Default="static". Optional.
params.role.is_custom boolean If a customised template is required for a client. Default=false. Optional.
params.role.args object Custom role arguments. Optional.
params.external_user_id integer minLength="1" External user ID.
params.canonical_link string Canonical link.
params.redirect_from_80_to_443 boolean The need for redirection from port: 80 to port: 443.
params.enable_webp boolean Enables WebP image compression. Default=false. Optional.
params.ips array List of IP-addresses. Required for "delegated" domain type.
params.ips[] object IP object
params.ips[].ip string IP address.
params.ips[].is_active boolean Do you need to use this ip address to work on the CDN.
params.ips[].ttl integer TTL value. Default=60. Optional
params.port integer Port. Default=80. Optional.
params.sitemap string The sitemap URL associated with the current domain name. Optional.
Result
Name Type Constraints Description
result object Domain information.
result.id integer Domain ID.
result.name string Domain name.
result.cname_url string CDN domain name for CNAME domains.
result.external_user_id integer minLength="1" External user ID.
result.partner_name string Partner name.
result.is_active boolean Is the cdn enabled for the domain.
result.on_cdn_ns boolean Is the domain located on CDN NS.
result.status string Domain activity status.
result.last_cache_refill string Datetime of last cache refill or null. Format: ISO 8601
result.last_cache_cleanup string Datetime of last cache cleanup or null. Format: ISO 8601
result.type string Domain type. Can be "delegated" or "cname".
result.role object Domain role.
result.role.name string Role name. Available roles: "static"
result.role.is_custom boolean If a customised template is required for a client.
result.role.args object Custom role arguments.
result.sitemap string The sitemap URL associated with the current domain name.
result.canonical_link string Canonical link.
result.redirect_from_80_to_443 boolean The need for redirection from port: 80 to port: 443.
result.enable_webp boolean Enables WebP image compression. Default=false. Optional.
result.ips array List of IP-addresses. Required for "delegated" domain type.
result.ips[] object IP object
result.ips[].ip string IP address.
result.ips[].is_active boolean Do you need to use this ip address to work on the CDN.
result.ips[].ttl integer TTL value. Default=60. Optional
result.port integer Port. Default=80. Optional.
Errors
Code Message Description
-31555 External user ID is required external_user_id field is required.
-31556 External user ID must be an integer external_user_id field must be an integer.
-31557 External user ID must be greater then 0 external_user_id field must be greater then 0.
-31601 Domain already exists The domain with this name already exists.
-31602 Failed to get domain info Failed to get domain information from DNS.
-31605 Domain name is required name filed is required.
-31606 Domain name is too short, min length: 4 name filed is too short, min length: 4.
-31607 Domain name is too long, max length: 256 name filed is too long, max length: 256.
-31608 Domain name is not a valid string name filed is not a valid string.
-31610 Canonical link is required canonical_link filed is required.
-31611 Canonical link is not valid: URL expected canonical_link filed is not valid: URL expected.
-31612 The sitemap URL does not belong to the domain name The sitemap URL must be beloved to the current domain name. For example: site.ru - https://site.ru/sitemap.xml.
-31613 The sitemap is not valid: URL expected The sitemap is not valid: URL expected.
-31615 redirect_from_80_to_443 field is required redirect_from_80_to_443 field is required.
-31616 redirect_from_80_to_443 must be boolean redirect_from_80_to_443 must be boolean.
-31620 Port value must be greater then 0 port field value must be greater then 0.
-31621 Port value must be less then 65535 port field value must be less then 65535.
-31622 Port value must be an integer port field value must be an integer.
-31625 ips field is required ips field is required.
-31626 List of IP is expected List of IP-addresses is expected.
-31627 ips may not be empty List of IP-addresses may not be empty.
-31700 ip field is required ip field in list ips is required.
-31701 IP value not valid: IPv4 or IPv6 address expected IP value not valid: IPv4 or IPv6 address expected.
-31702 IP address must be unique IP addresses in the list must be unique.
-31706 is_active must be a boolean is_active field must be a boolean.
-31707 TTL value must be greater then 0 TTL value must be greater then 0
-31708 TTL value must be an integer TTL value must be an integer
-31709 Domain name is blacklisted Domain name is blacklisted
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "create_domain",
  "params": {
    "name": "example.com",
    "type": "delegated / cname",
    "role": {
      "name": "static",
      "is_custom": false,
      "args": {}
    },
    "external_user_id": 13,
    "canonical_link": "http://www.example.com",
    "redirect_from_80_to_443": true,
    "enable_webp": false,
    "ips": [
      {
        "ip": "192.168.1.1",
        "is_active": false,
        "ttl": 60
      }
    ],
    "port": 5000,
    "sitemap": "http://www.example.com/sitemap.xml"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 13,
    "name": "example.com",
    "cname_url": "d42.cdn.itglobal.com",
    "external_user_id": 13,
    "partner_name": "cdn",
    "is_active": true,
    "on_cdn_ns": true,
    "status": "OK / DISABLED / BLOCKED / CHECKING_NS_LIST / DOMAIN_NOT_DELEGATED / CREATING_SSL_CERT / SSL_CERT_CREATING_ERROR / UPDATING_DNS_RECORDS / UPDATING_DNS_RECORDS_ERROR",
    "last_cache_refill": "null / 2023-02-07T15:10:29.681269Z",
    "last_cache_cleanup": "null / 2023-02-07T15:10:29.681269Z",
    "type": "cname / delegated",
    "role": {
      "name": "static",
      "is_custom": false,
      "args": {}
    },
    "sitemap": "http://www.example.com/sitemap.xml",
    "canonical_link": "http://www.example.com",
    "redirect_from_80_to_443": true,
    "enable_webp": false,
    "ips": [
      {
        "ip": "192.168.1.1",
        "is_active": false,
        "ttl": 60
      }
    ],
    "port": 5000
  }
}

test_create_domain
Domain

Test create a domain.

Check if it is possible to create a domain. Authorization is required.


Parameters
Name Type Constraints Description
params object Domain information.
params.name string Domain name. ASCII only.
params.type string The type of domain being created. "delegated" or "cname". Default="delegated". Optional.
params.role object Domain role object. Optional.
params.role.name string Role name. Available roles: "static". Default="static". Optional.
params.role.is_custom boolean If a customised template is required for a client. Default=false. Optional.
params.role.args object Custom role arguments. Optional.
params.external_user_id integer minLength="1" External user ID.
params.canonical_link string Canonical link.
params.redirect_from_80_to_443 boolean The need for redirection from port: 80 to port: 443.
params.enable_webp boolean Enables WebP image compression. Default=false. Optional.
params.ips array List of IP-addresses. Required for "delegated" domain type.
params.ips[] object IP object
params.ips[].ip string IP address.
params.ips[].is_active boolean Do you need to use this ip address to work on the CDN.
params.ips[].ttl integer TTL value. Default=60. Optional
params.port integer Port. Default=80. Optional.
params.sitemap string The sitemap URL associated with the current domain name. Optional.
Result
Name Type Constraints Description
result object Information about the domain being created.
result.name string Domain name.
result.external_user_id integer minLength="1" External user ID.
result.partner_name string Partner name.
result.type string Domain type. Can be "delegated" or "cname".
result.role object Domain role.
result.role.name string Role name. Available roles: "static"
result.role.is_custom boolean If a customised template is required for a client.
result.role.args object Custom role arguments.
result.sitemap string The sitemap URL associated with the current domain name.
result.port integer Port. Default=80. Optional.
result.canonical_link string Canonical link.
result.ips array List of IP-addresses. Required for "delegated" domain type.
result.ips[] object IP object
result.ips[].ip string IP address.
result.ips[].is_active boolean Do you need to use this ip address to work on the CDN.
result.ips[].ttl integer TTL value. Default=60. Optional
result.redirect_from_80_to_443 boolean The need for redirection from port: 80 to port: 443.
result.enable_webp boolean Enables WebP image compression. Default=false. Optional.
Errors
Code Message Description
-31555 External user ID is required external_user_id field is required.
-31556 External user ID must be an integer external_user_id field must be an integer.
-31557 External user ID must be greater then 0 external_user_id field must be greater then 0.
-31601 Domain already exists The domain with this name already exists.
-31602 Failed to get domain info Failed to get domain information from DNS.
-31605 Domain name is required name filed is required.
-31606 Domain name is too short, min length: 4 name filed is too short, min length: 4.
-31607 Domain name is too long, max length: 256 name filed is too long, max length: 256.
-31608 Domain name is not a valid string name filed is not a valid string.
-31610 Canonical link is required canonical_link filed is required.
-31611 Canonical link is not valid: URL expected canonical_link filed is not valid: URL expected.
-31612 The sitemap URL does not belong to the domain name The sitemap URL must be beloved to the current domain name. For example: site.ru - https://site.ru/sitemap.xml.
-31613 The sitemap is not valid: URL expected The sitemap is not valid: URL expected.
-31615 redirect_from_80_to_443 field is required redirect_from_80_to_443 field is required.
-31616 redirect_from_80_to_443 must be boolean redirect_from_80_to_443 must be boolean.
-31620 Port value must be greater then 0 port field value must be greater then 0.
-31621 Port value must be less then 65535 port field value must be less then 65535.
-31622 Port value must be an integer port field value must be an integer.
-31625 ips field is required ips field is required.
-31626 List of IP is expected List of IP-addresses is expected.
-31627 ips may not be empty List of IP-addresses may not be empty.
-31700 ip field is required ip field in list ips is required.
-31701 IP value not valid: IPv4 or IPv6 address expected IP value not valid: IPv4 or IPv6 address expected.
-31702 IP address must be unique IP addresses in the list must be unique.
-31706 is_active must be a boolean is_active field must be a boolean.
-31707 TTL value must be greater then 0 TTL value must be greater then 0
-31708 TTL value must be an integer TTL value must be an integer
-31709 Domain name is blacklisted Domain name is blacklisted
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "test_create_domain",
  "params": {
    "name": "example.com",
    "type": "delegated / cname",
    "role": {
      "name": "static",
      "is_custom": false,
      "args": {}
    },
    "external_user_id": 13,
    "canonical_link": "http://www.example.com",
    "redirect_from_80_to_443": true,
    "enable_webp": false,
    "ips": [
      {
        "ip": "192.168.1.1",
        "is_active": false,
        "ttl": 60
      }
    ],
    "port": 5000,
    "sitemap": "http://www.example.com/sitemap.xml"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "name": "example.com",
    "external_user_id": 13,
    "partner_name": "cdn",
    "type": "cname / delegated",
    "role": {
      "name": "static",
      "is_custom": false,
      "args": {}
    },
    "sitemap": "http://www.example.com/sitemap.xml",
    "port": 5000,
    "canonical_link": "http://www.example.com",
    "ips": [
      {
        "ip": "192.168.1.1",
        "is_active": false,
        "ttl": 60
      }
    ],
    "redirect_from_80_to_443": true,
    "enable_webp": false
  }
}

update_domain
Domain

Update a domain.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object Domain information.
params.id integer Domain ID.
params.name string Domain name. ASCII only.
params.role object Domain role object. Optional.
params.role.name string Role name. Available roles: "static". Default="static". Optional.
params.role.is_custom boolean If a customised template is required for a client. Default=false. Optional.
params.role.args object Custom role arguments. Optional.
params.external_user_id integer minLength="1" External user ID.
params.canonical_link string Canonical link.
params.redirect_from_80_to_443 boolean The need for redirection from port: 80 to port: 443.
params.enable_webp boolean Enables WebP image compression. Default=false. Optional.
params.ips array List of IP-addresses. Required for "delegated" domain type.
params.ips[] object IP object
params.ips[].ip string IP address.
params.ips[].is_active boolean Do you need to use this ip address to work on the CDN.
params.ips[].ttl integer TTL value. Default=60. Optional
params.port integer Port. Default=80. Optional.
params.sitemap string The sitemap URL associated with the current domain name. Optional.
Result
Name Type Constraints Description
result object Domain information.
result.id integer Domain ID.
result.name string Domain name.
result.cname_url string CDN domain name for CNAME domains.
result.external_user_id integer minLength="1" External user ID.
result.partner_name string Partner name.
result.is_active boolean Is the cdn enabled for the domain.
result.on_cdn_ns boolean Is the domain located on CDN NS.
result.status string Domain activity status.
result.last_cache_refill string Datetime of last cache refill or null. Format: ISO 8601
result.last_cache_cleanup string Datetime of last cache cleanup or null. Format: ISO 8601
result.type string Domain type. Can be "delegated" or "cname".
result.role object Domain role.
result.role.name string Role name. Available roles: "static"
result.role.is_custom boolean If a customised template is required for a client.
result.role.args object Custom role arguments.
result.sitemap string The sitemap URL associated with the current domain name.
result.canonical_link string Canonical link.
result.redirect_from_80_to_443 boolean The need for redirection from port: 80 to port: 443.
result.enable_webp boolean Enables WebP image compression. Default=false. Optional.
result.ips array List of IP-addresses. Required for "delegated" domain type.
result.ips[] object IP object
result.ips[].ip string IP address.
result.ips[].is_active boolean Do you need to use this ip address to work on the CDN.
result.ips[].ttl integer TTL value. Default=60. Optional
result.port integer Port. Default=80. Optional.
Errors
Code Message Description
-31600 Domain not found The domain with this ID not found.
-31555 External user ID is required external_user_id field is required.
-31556 External user ID must be an integer external_user_id field must be an integer.
-31557 External user ID must be greater then 0 external_user_id field must be greater then 0.
-31601 Domain already exists The domain with this name already exists.
-31602 Failed to get domain info Failed to get domain information from DNS.
-31605 Domain name is required name filed is required.
-31606 Domain name is too short, min length: 4 name filed is too short, min length: 4.
-31607 Domain name is too long, max length: 256 name filed is too long, max length: 256.
-31608 Domain name is not a valid string name filed is not a valid string.
-31610 Canonical link is required canonical_link filed is required.
-31611 Canonical link is not valid: URL expected canonical_link filed is not valid: URL expected.
-31612 The sitemap URL does not belong to the domain name The sitemap URL must be beloved to the current domain name. For example: site.ru - https://site.ru/sitemap.xml.
-31613 The sitemap is not valid: URL expected The sitemap is not valid: URL expected.
-31615 redirect_from_80_to_443 field is required redirect_from_80_to_443 field is required.
-31616 redirect_from_80_to_443 must be boolean redirect_from_80_to_443 must be boolean.
-31620 Port value must be greater then 0 port field value must be greater then 0.
-31621 Port value must be less then 65535 port field value must be less then 65535.
-31622 Port value must be an integer port field value must be an integer.
-31625 ips field is required ips field is required.
-31626 List of IP is expected List of IP-addresses is expected.
-31627 ips may not be empty List of IP-addresses may not be empty.
-31630 Domain ID is required id field is required.
-31631 Domain ID must be an integer id field must be an integer.
-31632 Domain ID must be greater then 0 id field must be greater then 0.
-31700 ip field is required ip field in list ips is required.
-31701 IP value not valid: IPv4 or IPv6 address expected IP value not valid: IPv4 or IPv6 address expected.
-31702 IP address must be unique IP addresses in the list must be unique.
-31706 is_active must be a boolean is_active field must be a boolean.
-31707 TTL value must be greater then 0 TTL value must be greater then 0
-31708 TTL value must be an integer TTL value must be an integer
-31709 Domain name is blacklisted Domain name is blacklisted
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "update_domain",
  "params": {
    "id": 13,
    "name": "example.com",
    "role": {
      "name": "static",
      "is_custom": false,
      "args": {}
    },
    "external_user_id": 13,
    "canonical_link": "http://www.example.com",
    "redirect_from_80_to_443": true,
    "enable_webp": false,
    "ips": [
      {
        "ip": "192.168.1.1",
        "is_active": false,
        "ttl": 60
      }
    ],
    "port": 5000,
    "sitemap": "http://www.example.com/sitemap.xml"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 13,
    "name": "example.com",
    "cname_url": "d42.cdn.itglobal.com",
    "external_user_id": 13,
    "partner_name": "cdn",
    "is_active": true,
    "on_cdn_ns": true,
    "status": "OK / DISABLED / BLOCKED / CHECKING_NS_LIST / DOMAIN_NOT_DELEGATED / CREATING_SSL_CERT / SSL_CERT_CREATING_ERROR / UPDATING_DNS_RECORDS / UPDATING_DNS_RECORDS_ERROR",
    "last_cache_refill": "null / 2023-02-07T15:10:29.681269Z",
    "last_cache_cleanup": "null / 2023-02-07T15:10:29.681269Z",
    "type": "cname / delegated",
    "role": {
      "name": "static",
      "is_custom": false,
      "args": {}
    },
    "sitemap": "http://www.example.com/sitemap.xml",
    "canonical_link": "http://www.example.com",
    "redirect_from_80_to_443": true,
    "enable_webp": false,
    "ips": [
      {
        "ip": "192.168.1.1",
        "is_active": false,
        "ttl": 60
      }
    ],
    "port": 5000
  }
}

delete_domain
Domain

Run a task to disable CDN and delete domain.

Authorization is required. Owner only.
Task type: DELETE_DOMAIN


Parameters
Name Type Constraints Description
params object
params.id integer minLength="1" Domain ID.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31600 Domain not found The domain with this ID not found.
-31630 Domain ID is required id field is required.
-31631 Domain ID must be an integer id field must be an integer.
-31632 Domain ID must be greater then 0 id field must be greater then 0.
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this domain is already running.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "delete_domain",
  "params": {
    "id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

enable_cdn_for_domain
Domain

Run the CDN activation task for the domain.

Authorization is required. Owner only.
Task type: ENABLE_CDN


Parameters
Name Type Constraints Description
params object
params.domain_id integer Domain ID.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31600 Domain not found The domain with this ID not found.
-31630 Domain ID is required id field is required.
-31631 Domain ID must be an integer id field must be an integer.
-31632 Domain ID must be greater then 0 id field must be greater then 0.
-31740 CDN for this domain is already enabled CDN for this domain is already enabled.
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this domain is already running.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "enable_cdn_for_domain",
  "params": {
    "domain_id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

test_enable_cdn_for_domain
Domain

Test run of the CDN activation task for the domain.

Authorization is required. Owner only.
Task type: ENABLE_CDN


Parameters
Name Type Constraints Description
params object
params.domain_id integer Domain ID.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31600 Domain not found The domain with this ID not found.
-31630 Domain ID is required id field is required.
-31631 Domain ID must be an integer id field must be an integer.
-31632 Domain ID must be greater then 0 id field must be greater then 0.
-31740 CDN for this domain is already enabled CDN for this domain is already enabled.
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this domain is already running.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "test_enable_cdn_for_domain",
  "params": {
    "domain_id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

disable_cdn_for_domain
Domain

Run the CDN deactivation task for the domain.

Authorization is required. Owner only.
Task type: DISABLE_CDN


Parameters
Name Type Constraints Description
params object
params.domain_id integer Domain ID.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31600 Domain not found The domain with this ID not found.
-31630 Domain ID is required id field is required.
-31631 Domain ID must be an integer id field must be an integer.
-31632 Domain ID must be greater then 0 id field must be greater then 0.
-31741 CDN for this domain is already disabled CDN for this domain is already disabled.
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this domain is already running.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "disable_cdn_for_domain",
  "params": {
    "domain_id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

refill_cache
Domain

Refill the cache for the domain.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.domain_id integer Domain ID.
params.sitemap string The sitemap URL associated with the current domain name. Optional.
Result
Name Type Constraints Description
result object Domain information.
result.id integer Domain ID.
result.name string Domain name.
result.cname_url string CDN domain name for CNAME domains.
result.external_user_id integer minLength="1" External user ID.
result.partner_name string Partner name.
result.is_active boolean Is the cdn enabled for the domain.
result.on_cdn_ns boolean Is the domain located on CDN NS.
result.status string Domain activity status.
result.last_cache_refill string Datetime of last cache refill or null. Format: ISO 8601
result.last_cache_cleanup string Datetime of last cache cleanup or null. Format: ISO 8601
result.type string Domain type. Can be "delegated" or "cname".
result.role object Domain role.
result.role.name string Role name. Available roles: "static"
result.role.is_custom boolean If a customised template is required for a client.
result.role.args object Custom role arguments.
result.sitemap string The sitemap URL associated with the current domain name.
result.canonical_link string Canonical link.
result.redirect_from_80_to_443 boolean The need for redirection from port: 80 to port: 443.
result.enable_webp boolean Enables WebP image compression. Default=false. Optional.
result.ips array List of IP-addresses. Required for "delegated" domain type.
result.ips[] object IP object
result.ips[].ip string IP address.
result.ips[].is_active boolean Do you need to use this ip address to work on the CDN.
result.ips[].ttl integer TTL value. Default=60. Optional
result.port integer Port. Default=80. Optional.
Errors
Code Message Description
-31600 Domain not found The domain with this ID not found.
-31630 Domain ID is required id field is required.
-31631 Domain ID must be an integer id field must be an integer.
-31632 Domain ID must be greater then 0 id field must be greater then 0.
-31612 The sitemap URL does not belong to the domain name The sitemap URL must be beloved to the current domain name. For example: site.ru - https://site.ru/sitemap.xml.
-31613 The sitemap is not valid: URL expected The sitemap is not valid: URL expected.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "refill_cache",
  "params": {
    "domain_id": 13,
    "sitemap": "http://www.example.com/sitemap.xml"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 13,
    "name": "example.com",
    "cname_url": "d42.cdn.itglobal.com",
    "external_user_id": 13,
    "partner_name": "cdn",
    "is_active": true,
    "on_cdn_ns": true,
    "status": "OK / DISABLED / BLOCKED / CHECKING_NS_LIST / DOMAIN_NOT_DELEGATED / CREATING_SSL_CERT / SSL_CERT_CREATING_ERROR / UPDATING_DNS_RECORDS / UPDATING_DNS_RECORDS_ERROR",
    "last_cache_refill": "null / 2023-02-07T15:10:29.681269Z",
    "last_cache_cleanup": "null / 2023-02-07T15:10:29.681269Z",
    "type": "cname / delegated",
    "role": {
      "name": "static",
      "is_custom": false,
      "args": {}
    },
    "sitemap": "http://www.example.com/sitemap.xml",
    "canonical_link": "http://www.example.com",
    "redirect_from_80_to_443": true,
    "enable_webp": false,
    "ips": [
      {
        "ip": "192.168.1.1",
        "is_active": false,
        "ttl": 60
      }
    ],
    "port": 5000
  }
}

clear_cache
Domain

Clear the cache for the domain.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.domain_id integer Domain ID.
Result
Name Type Constraints Description
result object Domain information.
result.id integer Domain ID.
result.name string Domain name.
result.cname_url string CDN domain name for CNAME domains.
result.external_user_id integer minLength="1" External user ID.
result.partner_name string Partner name.
result.is_active boolean Is the cdn enabled for the domain.
result.on_cdn_ns boolean Is the domain located on CDN NS.
result.status string Domain activity status.
result.last_cache_refill string Datetime of last cache refill or null. Format: ISO 8601
result.last_cache_cleanup string Datetime of last cache cleanup or null. Format: ISO 8601
result.type string Domain type. Can be "delegated" or "cname".
result.role object Domain role.
result.role.name string Role name. Available roles: "static"
result.role.is_custom boolean If a customised template is required for a client.
result.role.args object Custom role arguments.
result.sitemap string The sitemap URL associated with the current domain name.
result.canonical_link string Canonical link.
result.redirect_from_80_to_443 boolean The need for redirection from port: 80 to port: 443.
result.enable_webp boolean Enables WebP image compression. Default=false. Optional.
result.ips array List of IP-addresses. Required for "delegated" domain type.
result.ips[] object IP object
result.ips[].ip string IP address.
result.ips[].is_active boolean Do you need to use this ip address to work on the CDN.
result.ips[].ttl integer TTL value. Default=60. Optional
result.port integer Port. Default=80. Optional.
Errors
Code Message Description
-31600 Domain not found The domain with this ID not found.
-31630 Domain ID is required id field is required.
-31631 Domain ID must be an integer id field must be an integer.
-31632 Domain ID must be greater then 0 id field must be greater then 0.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "clear_cache",
  "params": {
    "domain_id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 13,
    "name": "example.com",
    "cname_url": "d42.cdn.itglobal.com",
    "external_user_id": 13,
    "partner_name": "cdn",
    "is_active": true,
    "on_cdn_ns": true,
    "status": "OK / DISABLED / BLOCKED / CHECKING_NS_LIST / DOMAIN_NOT_DELEGATED / CREATING_SSL_CERT / SSL_CERT_CREATING_ERROR / UPDATING_DNS_RECORDS / UPDATING_DNS_RECORDS_ERROR",
    "last_cache_refill": "null / 2023-02-07T15:10:29.681269Z",
    "last_cache_cleanup": "null / 2023-02-07T15:10:29.681269Z",
    "type": "cname / delegated",
    "role": {
      "name": "static",
      "is_custom": false,
      "args": {}
    },
    "sitemap": "http://www.example.com/sitemap.xml",
    "canonical_link": "http://www.example.com",
    "redirect_from_80_to_443": true,
    "enable_webp": false,
    "ips": [
      {
        "ip": "192.168.1.1",
        "is_active": false,
        "ttl": 60
      }
    ],
    "port": 5000
  }
}

get_ssl_cert
SSL Cert

Get ssl/tls certificate by domain ID.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.domain_id integer Domain ID.
Result
Name Type Constraints Description
result object SSL/TLS certificate information. May be empty.
result.domain_id integer ID of the domain the certificate belongs to.
result.domain_name string The name of the domain (CN) for which the certificate was issued.
result.is_custom boolean If this field is true, the certificate was uploaded by an external user. If false, the certificate was issued automatically.
result.issuer string The issuer of the certificate.
result.serial string The serial number of the certificate.
result.issue_date string Certificate issue date.
result.expiry_date string Certificate expiration date.
Errors
Code Message Description
-31600 Domain not found The domain with this ID not found.
-31630 Domain ID is required id field is required.
-31631 Domain ID must be an integer id field must be an integer.
-31632 Domain ID must be greater then 0 id field must be greater then 0.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_ssl_cert",
  "params": {
    "domain_id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "domain_id": 11,
    "domain_name": "example.com",
    "is_custom": true,
    "issuer": "C = US, O = Let's Encrypt, CN = Artificial Apricot R3",
    "serial": "FA8C15BF3D64241BA1B97D63186D59CB02D6",
    "issue_date": "2023-03-27T12:32:50Z",
    "expiry_date": "2023-06-25T12:32:12Z"
  }
}

issue_ssl_cert
SSL Cert

Run the issue certificate task for the domain.

Authorization is required. Owner only.
Task type: ISSUE_CERT


Parameters
Name Type Constraints Description
params object
params.domain_id integer Domain ID.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31600 Domain not found The domain with this ID not found.
-31630 Domain ID is required id field is required.
-31631 Domain ID must be an integer id field must be an integer.
-31632 Domain ID must be greater then 0 id field must be greater then 0.
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this domain is already running.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "issue_ssl_cert",
  "params": {
    "domain_id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

upload_ssl_cert
SSL Cert

Upload a custom SSL certificate for domain.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.domain_id integer Domain ID.
params.cert string SSL/TLS certificate for domain.
params.ca_cert string SSL/TLS CA certificate or chain CA certificates for domain.
params.key string RSA private key for the certificate.
params.password string Password for the certificate. Optional.
Result
Name Type Constraints Description
result object SSL/TLS certificate information.
result.domain_id integer ID of the domain the certificate belongs to.
result.domain_name string The name of the domain (CN) for which the certificate was issued.
result.is_custom boolean If this field is true, the certificate was uploaded by an external user. If false, the certificate was issued automatically.
result.issuer string The issuer of the certificate.
result.serial string The serial number of the certificate.
result.issue_date string Certificate issue date.
result.expiry_date string Certificate expiration date.
Errors
Code Message Description
-31600 Domain not found The domain with this ID not found.
-31630 Domain ID is required id field is required.
-31631 Domain ID must be an integer id field must be an integer.
-31632 Domain ID must be greater then 0 id field must be greater then 0.
-31722 SSL "cert" field is required cert field is required.
-31723 SSL "key" field is required key field is required.
-31724 Invalid SSL cert content Invalid SSL cert content.
-31725 Invalid SSL key content Invalid SSL key content.
-31726 The certificate does not match the domain name The certificate does not match the domain name.
-31727 The key does not match the certificate The key does not match the certificate.
-31728 The certificate has expired The certificate has expired.
-31729 Certificate password is too long, max length: 256 password field is too long, max length: 256.
-31730 SSL "ca_cert" field is required ca_cert field is required.
-31731 Invalid SSL CA cert content Invalid SSL CA cert content.
-31732 The CA certificate has expired The CA certificate has expired.
-31733 The CA certificate does not match the domain certificate The CA certificate does not match the domain certificate.
-31734 The CA certificate is self signed The CA certificate cannot be self signed.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "upload_ssl_cert",
  "params": {
    "domain_id": 13,
    "cert": "-----BEGIN CERTIFICATE-----  ...  -----END CERTIFICATE-----",
    "ca_cert": "-----BEGIN CERTIFICATE-----  ...  -----END CERTIFICATE-----",
    "key": "-----BEGIN RSA PRIVATE KEY-----  ...  -----END RSA PRIVATE KEY-----",
    "password": "wVwr05qNn7qf2APUhGPfVA3PwKBgArDWstvxMg4"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "domain_id": 11,
    "domain_name": "example.com",
    "is_custom": true,
    "issuer": "C = US, O = Let's Encrypt, CN = Artificial Apricot R3",
    "serial": "FA8C15BF3D64241BA1B97D63186D59CB02D6",
    "issue_date": "2023-03-27T12:32:50Z",
    "expiry_date": "2023-06-25T12:32:12Z"
  }
}

test_upload_ssl_cert
SSL Cert

Test upload the SSL/TLS certificate.

Check whether the certificate can be uploaded. Authorization is required.


Parameters
Name Type Constraints Description
params object
params.domain_name string the name of the domain for which the certificate is being uploaded.
params.cert string SSL/TLS certificate for domain.
params.ca_cert string SSL/TLS CA certificate or chain CA certificates for domain.
params.key string RSA private key for the certificate.
params.password string Password for the certificate. Optional.
Result
Name Type Constraints Description
result object SSL/TLS certificate information.
result.domain_id integer ID of the domain the certificate belongs to.
result.domain_name string The name of the domain (CN) for which the certificate was issued.
result.is_custom boolean If this field is true, the certificate was uploaded by an external user. If false, the certificate was issued automatically.
result.issuer string The issuer of the certificate.
result.serial string The serial number of the certificate.
result.issue_date string Certificate issue date.
result.expiry_date string Certificate expiration date.
Errors
Code Message Description
-31600 Domain not found The domain with this ID not found.
-31630 Domain ID is required id field is required.
-31631 Domain ID must be an integer id field must be an integer.
-31632 Domain ID must be greater then 0 id field must be greater then 0.
-31722 SSL "cert" field is required cert field is required.
-31723 SSL "key" field is required key field is required.
-31724 Invalid SSL cert content Invalid SSL cert content.
-31725 Invalid SSL key content Invalid SSL key content.
-31726 The certificate does not match the domain name The certificate does not match the domain name.
-31727 The key does not match the certificate The key does not match the certificate.
-31728 The certificate has expired The certificate has expired.
-31729 Certificate password is too long, max length: 256 password field is too long, max length: 256.
-31730 SSL "ca_cert" field is required ca_cert field is required.
-31731 Invalid SSL CA cert content Invalid SSL CA cert content.
-31732 The CA certificate has expired The CA certificate has expired.
-31733 The CA certificate does not match the domain certificate The CA certificate does not match the domain certificate.
-31734 The CA certificate is self signed The CA certificate cannot be self signed.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "test_upload_ssl_cert",
  "params": {
    "domain_name": "example.com",
    "cert": "-----BEGIN CERTIFICATE-----  ...  -----END CERTIFICATE-----",
    "ca_cert": "-----BEGIN CERTIFICATE-----  ...  -----END CERTIFICATE-----",
    "key": "-----BEGIN RSA PRIVATE KEY-----  ...  -----END RSA PRIVATE KEY-----",
    "password": "wVwr05qNn7qf2APUhGPfVA3PwKBgArDWstvxMg4"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "domain_id": 11,
    "domain_name": "example.com",
    "is_custom": true,
    "issuer": "C = US, O = Let's Encrypt, CN = Artificial Apricot R3",
    "serial": "FA8C15BF3D64241BA1B97D63186D59CB02D6",
    "issue_date": "2023-03-27T12:32:50Z",
    "expiry_date": "2023-06-25T12:32:12Z"
  }
}

get_location
Location

Get location.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.id integer minimum="1" Location ID
Result
Name Type Constraints Description
result object Location information.
result.id integer minimum="1" Location ID
result.domain_id integer ID of the domain the location belongs to.
result.name string minLength="1", maxLength="128" Location name. Matching location name represents the absolute URL path, named locations are set up by contacting support.
result.type string enum="matching,named" Type of location being created. Choices are "matching" and "named". Default is "matching". Optional.
result.headers array List of custom response headers. Optional.
result.headers[] object Header information.
result.headers[].key string minLength="1", maxLength="1024" Header key.
result.headers[].value string minLength="1", maxLength="4094" Header value.
result.cors_headers object CORS response headers information. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers for details. Optional.
result.cors_headers.access_control_allow_origin array A list of allowed origins. If an "*" symbol is present, other values are ignored. Optional.
result.cors_headers.access_control_allow_origin[] string Syntax according to CORS specification or an "*" symbol.
result.cors_headers.access_control_expose_headers array A list of header keys. Allows a server to indicate which response headers should be made available to scripts running in the browser. Optional.
result.cors_headers.access_control_expose_headers[] string Header key or an "*" symbol.
result.cors_headers.access_control_max_age integer minimum="0" Maximum number of seconds the results of preflight request can be cached. Optional.
result.cors_headers.access_control_allow_credentials boolean Indicates whether or not the actual request can be made using credentials. Optional.
result.cors_headers.access_control_allow_methods array A list of HTTP-methods allowed when accessing the resource. Optional.
result.cors_headers.access_control_allow_methods[] string HTTP-method name, uppercase.
result.cors_headers.access_control_allow_headers array A list of header keys. Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. If an "*" symbol is present, other values are ignored. Optional.
result.cors_headers.access_control_allow_headers[] string Header key or an "*" symbol.
Errors
Code Message Description
-31660 Location not found Location not found.
-31666 Location ID is required Location ID is required.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_location",
  "params": {
    "id": 42
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 42,
    "domain_id": 11,
    "name": "/static/",
    "type": "matching",
    "headers": [
      {
        "key": "Accept-Encoding",
        "value": "gzip, deflate, br"
      }
    ],
    "cors_headers": {
      "access_control_allow_origin": [
        "*"
      ],
      "access_control_expose_headers": [
        "*"
      ],
      "access_control_max_age": 600,
      "access_control_allow_credentials": true,
      "access_control_allow_methods": [
        "DELETE"
      ],
      "access_control_allow_headers": [
        "*"
      ]
    }
  }
}

get_locations
Location

Get locations list.

Authorization is required.


Parameters
Name Type Constraints Description
params object
params.domain_id integer minimum="1" Domain ID. Optional.
Result
Name Type Constraints Description
result array
result[] object Location information.
result[].id integer minimum="1" Location ID
result[].domain_id integer ID of the domain the location belongs to.
result[].name string minLength="1", maxLength="128" Location name. Matching location name represents the absolute URL path, named locations are set up by contacting support.
result[].type string enum="matching,named" Type of location being created. Choices are "matching" and "named". Default is "matching". Optional.
result[].headers array List of custom response headers. Optional.
result[].headers[] object Header information.
result[].headers[].key string minLength="1", maxLength="1024" Header key.
result[].headers[].value string minLength="1", maxLength="4094" Header value.
result[].cors_headers object CORS response headers information. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers for details. Optional.
result[].cors_headers.access_control_allow_origin array A list of allowed origins. If an "*" symbol is present, other values are ignored. Optional.
result[].cors_headers.access_control_allow_origin[] string Syntax according to CORS specification or an "*" symbol.
result[].cors_headers.access_control_expose_headers array A list of header keys. Allows a server to indicate which response headers should be made available to scripts running in the browser. Optional.
result[].cors_headers.access_control_expose_headers[] string Header key or an "*" symbol.
result[].cors_headers.access_control_max_age integer minimum="0" Maximum number of seconds the results of preflight request can be cached. Optional.
result[].cors_headers.access_control_allow_credentials boolean Indicates whether or not the actual request can be made using credentials. Optional.
result[].cors_headers.access_control_allow_methods array A list of HTTP-methods allowed when accessing the resource. Optional.
result[].cors_headers.access_control_allow_methods[] string HTTP-method name, uppercase.
result[].cors_headers.access_control_allow_headers array A list of header keys. Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. If an "*" symbol is present, other values are ignored. Optional.
result[].cors_headers.access_control_allow_headers[] string Header key or an "*" symbol.
Errors
Code Message Description
-31600 Domain not found The domain with this ID not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_locations",
  "params": {
    "domain_id": 42
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "id": 42,
      "domain_id": 11,
      "name": "/static/",
      "type": "matching",
      "headers": [
        {
          "key": "Accept-Encoding",
          "value": "gzip, deflate, br"
        }
      ],
      "cors_headers": {
        "access_control_allow_origin": [
          "*"
        ],
        "access_control_expose_headers": [
          "*"
        ],
        "access_control_max_age": 600,
        "access_control_allow_credentials": true,
        "access_control_allow_methods": [
          "DELETE"
        ],
        "access_control_allow_headers": [
          "*"
        ]
      }
    }
  ]
}

create_location
Location

Create location.

Authorization is required.


Parameters
Name Type Constraints Description
params object Location information.
params.domain_id integer ID of the domain the location belongs to.
params.name string minLength="1", maxLength="128" Location name. Matching location name represents the absolute URL path, named locations are set up by contacting support.
params.type string enum="matching,named" Type of location being created. Choices are "matching" and "named". Default is "matching". Optional.
params.headers array List of custom response headers. Optional.
params.headers[] object Header information.
params.headers[].key string minLength="1", maxLength="1024" Header key.
params.headers[].value string minLength="1", maxLength="4094" Header value.
params.cors_headers object CORS response headers information. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers for details. Optional.
params.cors_headers.access_control_allow_origin array A list of allowed origins. If an "*" symbol is present, other values are ignored. Optional.
params.cors_headers.access_control_allow_origin[] string Syntax according to CORS specification or an "*" symbol.
params.cors_headers.access_control_expose_headers array A list of header keys. Allows a server to indicate which response headers should be made available to scripts running in the browser. Optional.
params.cors_headers.access_control_expose_headers[] string Header key or an "*" symbol.
params.cors_headers.access_control_max_age integer minimum="0" Maximum number of seconds the results of preflight request can be cached. Optional.
params.cors_headers.access_control_allow_credentials boolean Indicates whether or not the actual request can be made using credentials. Optional.
params.cors_headers.access_control_allow_methods array A list of HTTP-methods allowed when accessing the resource. Optional.
params.cors_headers.access_control_allow_methods[] string HTTP-method name, uppercase.
params.cors_headers.access_control_allow_headers array A list of header keys. Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. If an "*" symbol is present, other values are ignored. Optional.
params.cors_headers.access_control_allow_headers[] string Header key or an "*" symbol.
Result
Name Type Constraints Description
result object Location information.
result.id integer minimum="1" Location ID
result.domain_id integer ID of the domain the location belongs to.
result.name string minLength="1", maxLength="128" Location name. Matching location name represents the absolute URL path, named locations are set up by contacting support.
result.type string enum="matching,named" Type of location being created. Choices are "matching" and "named". Default is "matching". Optional.
result.headers array List of custom response headers. Optional.
result.headers[] object Header information.
result.headers[].key string minLength="1", maxLength="1024" Header key.
result.headers[].value string minLength="1", maxLength="4094" Header value.
result.cors_headers object CORS response headers information. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers for details. Optional.
result.cors_headers.access_control_allow_origin array A list of allowed origins. If an "*" symbol is present, other values are ignored. Optional.
result.cors_headers.access_control_allow_origin[] string Syntax according to CORS specification or an "*" symbol.
result.cors_headers.access_control_expose_headers array A list of header keys. Allows a server to indicate which response headers should be made available to scripts running in the browser. Optional.
result.cors_headers.access_control_expose_headers[] string Header key or an "*" symbol.
result.cors_headers.access_control_max_age integer minimum="0" Maximum number of seconds the results of preflight request can be cached. Optional.
result.cors_headers.access_control_allow_credentials boolean Indicates whether or not the actual request can be made using credentials. Optional.
result.cors_headers.access_control_allow_methods array A list of HTTP-methods allowed when accessing the resource. Optional.
result.cors_headers.access_control_allow_methods[] string HTTP-method name, uppercase.
result.cors_headers.access_control_allow_headers array A list of header keys. Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. If an "*" symbol is present, other values are ignored. Optional.
result.cors_headers.access_control_allow_headers[] string Header key or an "*" symbol.
Errors
Code Message Description
-31600 Domain not found The domain with this ID not found.
-31661 Location already exists Location already exists.
-31662 Location name is required Location name is required.
-31663 Location name is not a valid string Location name is not a valid string.
-31664 Location name is too long, max length: 128 Location name is too long, max length: 128.
-31665 Location name is too short, min length: 1 Location name is too short, min length: 1.
-31751 Header key is required Header key is required.
-31752 Invalid header key Invalid header key. Header key can consist only latin letters and next symbols: -_: .
-31753 Header key is too long, max length: 1024 Header key is too long, max length: 1024.
-31754 Header keys must be unique Header keys must be unique.
-31755 Header value is required Header value is required.
-31756 Invalid header value Invalid header value. Header value can consist only letters and next symbols: _ :;.,\/"'!(){}[]@<>=-+*#$&`|~^%.
-31757 Header value is too long, max length: 4094 Header value is too long, max length: 4094.
-31758 The limit of headers has been exceeded. Max value is 10 The limit of headers has been exceeded. Max value is 10.
-31760 Duplicate elements in CORS values list Duplicate elements in CORS values list.
-31761 CORS values list length must not exceed 50 CORS values list length must not exceed 50.
-31762 Invalid CORS origin syntax Value of CORS access_control_allow_origin must be a valid origin defined by scheme, protocol, domain and (optional) port.
-31763 Invalid CORS header key syntax Invalid CORS header key. Header key can consist only latin letters and next symbols: -_: .
-31764 CORS header key length must not exceed 1024 CORS header key length must not exceed 1024.
-31765 CORS header access_control_max_age value must be positive integer CORS header access_control_max_age value must be positive integer.
-31766 CORS header access_control_max_age value must not exceed 86400 seconds CORS header access_control_max_age value must not exceed 86400 seconds (24 hours).
-31767 Invalid HTTP method in CORS header access_control_allow_methods Invalid HTTP method in CORS header access_control_allow_methods. Value must be a valid HTTP method uppercase.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "create_location",
  "params": {
    "domain_id": 11,
    "name": "/static/",
    "type": "matching",
    "headers": [
      {
        "key": "Accept-Encoding",
        "value": "gzip, deflate, br"
      }
    ],
    "cors_headers": {
      "access_control_allow_origin": [
        "*"
      ],
      "access_control_expose_headers": [
        "*"
      ],
      "access_control_max_age": 600,
      "access_control_allow_credentials": true,
      "access_control_allow_methods": [
        "DELETE"
      ],
      "access_control_allow_headers": [
        "*"
      ]
    }
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 42,
    "domain_id": 11,
    "name": "/static/",
    "type": "matching",
    "headers": [
      {
        "key": "Accept-Encoding",
        "value": "gzip, deflate, br"
      }
    ],
    "cors_headers": {
      "access_control_allow_origin": [
        "*"
      ],
      "access_control_expose_headers": [
        "*"
      ],
      "access_control_max_age": 600,
      "access_control_allow_credentials": true,
      "access_control_allow_methods": [
        "DELETE"
      ],
      "access_control_allow_headers": [
        "*"
      ]
    }
  }
}

update_location
Location

Update location.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.id integer minimum="1" Location ID
params.name string minLength="1", maxLength="128" Location name. Matching location name represents the absolute URL path, named locations are set up by contacting support.
params.headers array List of custom response headers. Optional.
params.headers[] object Header information.
params.headers[].key string minLength="1", maxLength="1024" Header key.
params.headers[].value string minLength="1", maxLength="4094" Header value.
params.cors_headers object CORS response headers information. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers for details. Optional.
params.cors_headers.access_control_allow_origin array A list of allowed origins. If an "*" symbol is present, other values are ignored. Optional.
params.cors_headers.access_control_allow_origin[] string Syntax according to CORS specification or an "*" symbol.
params.cors_headers.access_control_expose_headers array A list of header keys. Allows a server to indicate which response headers should be made available to scripts running in the browser. Optional.
params.cors_headers.access_control_expose_headers[] string Header key or an "*" symbol.
params.cors_headers.access_control_max_age integer minimum="0" Maximum number of seconds the results of preflight request can be cached. Optional.
params.cors_headers.access_control_allow_credentials boolean Indicates whether or not the actual request can be made using credentials. Optional.
params.cors_headers.access_control_allow_methods array A list of HTTP-methods allowed when accessing the resource. Optional.
params.cors_headers.access_control_allow_methods[] string HTTP-method name, uppercase.
params.cors_headers.access_control_allow_headers array A list of header keys. Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. If an "*" symbol is present, other values are ignored. Optional.
params.cors_headers.access_control_allow_headers[] string Header key or an "*" symbol.
Result
Name Type Constraints Description
result object Location information.
result.id integer minimum="1" Location ID
result.domain_id integer ID of the domain the location belongs to.
result.name string minLength="1", maxLength="128" Location name. Matching location name represents the absolute URL path, named locations are set up by contacting support.
result.type string enum="matching,named" Type of location being created. Choices are "matching" and "named". Default is "matching". Optional.
result.headers array List of custom response headers. Optional.
result.headers[] object Header information.
result.headers[].key string minLength="1", maxLength="1024" Header key.
result.headers[].value string minLength="1", maxLength="4094" Header value.
result.cors_headers object CORS response headers information. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers for details. Optional.
result.cors_headers.access_control_allow_origin array A list of allowed origins. If an "*" symbol is present, other values are ignored. Optional.
result.cors_headers.access_control_allow_origin[] string Syntax according to CORS specification or an "*" symbol.
result.cors_headers.access_control_expose_headers array A list of header keys. Allows a server to indicate which response headers should be made available to scripts running in the browser. Optional.
result.cors_headers.access_control_expose_headers[] string Header key or an "*" symbol.
result.cors_headers.access_control_max_age integer minimum="0" Maximum number of seconds the results of preflight request can be cached. Optional.
result.cors_headers.access_control_allow_credentials boolean Indicates whether or not the actual request can be made using credentials. Optional.
result.cors_headers.access_control_allow_methods array A list of HTTP-methods allowed when accessing the resource. Optional.
result.cors_headers.access_control_allow_methods[] string HTTP-method name, uppercase.
result.cors_headers.access_control_allow_headers array A list of header keys. Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. If an "*" symbol is present, other values are ignored. Optional.
result.cors_headers.access_control_allow_headers[] string Header key or an "*" symbol.
Errors
Code Message Description
-31666 Location ID is required Location ID is required.
-31600 Domain not found The domain with this ID not found.
-31660 Location not found Location not found.
-31661 Location already exists Location already exists.
-31662 Location name is required Location name is required.
-31663 Location name is not a valid string Location name is not a valid string.
-31664 Location name is too long, max length: 128 Location name is too long, max length: 128.
-31665 Location name is too short, min length: 1 Location name is too short, min length: 1.
-31751 Header key is required Header key is required.
-31752 Invalid header key Invalid header key. Header key can consist only latin letters and next symbols: -_: .
-31753 Header key is too long, max length: 1024 Header key is too long, max length: 1024.
-31754 Header keys must be unique Header keys must be unique.
-31755 Header value is required Header value is required.
-31756 Invalid header value Invalid header value. Header value can consist only letters and next symbols: _ :;.,\/"'!(){}[]@<>=-+*#$&`|~^%.
-31757 Header value is too long, max length: 4094 Header value is too long, max length: 4094.
-31758 The limit of headers has been exceeded. Max value is 10 The limit of headers has been exceeded. Max value is 10.
-31760 Duplicate elements in CORS values list Duplicate elements in CORS values list.
-31761 CORS values list length must not exceed 50 CORS values list length must not exceed 50.
-31762 Invalid CORS origin syntax Value of CORS access_control_allow_origin must be a valid origin defined by scheme, protocol, domain and (optional) port.
-31763 Invalid CORS header key syntax Invalid CORS header key. Header key can consist only latin letters and next symbols: -_: .
-31764 CORS header key length must not exceed 1024 CORS header key length must not exceed 1024.
-31765 CORS header access_control_max_age value must be positive integer CORS header access_control_max_age value must be positive integer.
-31766 CORS header access_control_max_age value must not exceed 86400 seconds CORS header access_control_max_age value must not exceed 86400 seconds (24 hours).
-31767 Invalid HTTP method in CORS header access_control_allow_methods Invalid HTTP method in CORS header access_control_allow_methods. Value must be a valid HTTP method uppercase.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "update_location",
  "params": {
    "id": 42,
    "name": "/static/",
    "headers": [
      {
        "key": "Accept-Encoding",
        "value": "gzip, deflate, br"
      }
    ],
    "cors_headers": {
      "access_control_allow_origin": [
        "*"
      ],
      "access_control_expose_headers": [
        "*"
      ],
      "access_control_max_age": 600,
      "access_control_allow_credentials": true,
      "access_control_allow_methods": [
        "DELETE"
      ],
      "access_control_allow_headers": [
        "*"
      ]
    }
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 42,
    "domain_id": 11,
    "name": "/static/",
    "type": "matching",
    "headers": [
      {
        "key": "Accept-Encoding",
        "value": "gzip, deflate, br"
      }
    ],
    "cors_headers": {
      "access_control_allow_origin": [
        "*"
      ],
      "access_control_expose_headers": [
        "*"
      ],
      "access_control_max_age": 600,
      "access_control_allow_credentials": true,
      "access_control_allow_methods": [
        "DELETE"
      ],
      "access_control_allow_headers": [
        "*"
      ]
    }
  }
}

delete_location
Location

Delete location.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.id integer minimum="1" Location ID
Result
Name Type Constraints Description
result object
result.id integer minimum="1" Location ID
Errors
Code Message Description
-31666 Location ID is required Location ID is required.
-31660 Location not found Location not found
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "delete_location",
  "params": {
    "id": 42
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 42
  }
}

get_s3_provider
S3 Provider

Get S3 provider by id.

Authorization is required.


Parameters
Name Type Constraints Description
params object
params.id integer minimum="1" Provider id.
Result
Name Type Constraints Description
result object S3 provider information.
result.id integer Provider id.
result.name string Provider name.
result.bucket_name_location string Designates whether a bucket name is a part of a hostname or path.
result.min_bucket_name_length integer Minimum bucket name.
result.max_bucket_name_length integer Maximum bucket name.
result.bucket_name_regex_pattern string Regular expression for bucket name validation.
result.bucket_naming_rule_description string References or description for bucket naming rules.
result.hostname_regex_pattern string Regular expression for hostname validation.
result.protocol_regex_pattern string Regular expression for protocol validation.
result.port_regex_pattern string Regular expression for port validation.
result.url_naming_rule_description string References or description for hostname naming rules.
Errors
Code Message Description
-31780 S3 provider not found S3 provider with this id not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_s3_provider",
  "params": {
    "id": 1
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 1,
    "name": "aws"
  }
}

get_s3_providers
S3 Provider

Get all S3 providers.

Authorization is required.


Result
Name Type Constraints Description
result array
result[] object S3 provider information.
result[].id integer Provider id.
result[].name string Provider name.
result[].bucket_name_location string Designates whether a bucket name is a part of a hostname or path.
result[].min_bucket_name_length integer Minimum bucket name.
result[].max_bucket_name_length integer Maximum bucket name.
result[].bucket_name_regex_pattern string Regular expression for bucket name validation.
result[].bucket_naming_rule_description string References or description for bucket naming rules.
result[].hostname_regex_pattern string Regular expression for hostname validation.
result[].protocol_regex_pattern string Regular expression for protocol validation.
result[].port_regex_pattern string Regular expression for port validation.
result[].url_naming_rule_description string References or description for hostname naming rules.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_s3_providers"
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "id": 1,
      "name": "aws"
    }
  ]
}

validate_s3_bucket_name
S3 Provider

Validate S3 bucket name.

Authorization is required.


Parameters
Name Type Constraints Description
params object
params.provider_id integer minimum="1" Provider ID.
params.name string Bucket name.
Result
Name Type Constraints Description
result object
result.is_valid boolean Bucket name is valid.
Errors
Code Message Description
-31780 S3 provider not found S3 provider with this id not found.
-31795 Bucket name is required S3 Bucket name is required
-31796 Bucket name is too short S3 Bucket name is too short
-31797 Bucket name is too long S3 Bucket name is too long
-31798 Bucket name is not a valid string S3 Bucket name is not a valid string
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "validate_s3_bucket_name",
  "params": {
    "provider_id": 42,
    "name": "media"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "is_valid": true
  }
}

validate_s3_provider_url
S3 Provider

Validate S3 provider URL parameters.

Authorization is required.


Parameters
Name Type Constraints Description
params object
params.provider_id integer minimum="1" Provider ID.
params.proto string Provider protocol.
params.host string Provider endpoint domain.
params.port integer Provider port.
Result
Name Type Constraints Description
result object
result.is_valid boolean URL parameters are valid.
Errors
Code Message Description
-31780 S3 provider not found S3 provider with this id not found.
-31787 Provider protocol is invalid S3 provider protocol is invalid.
-31788 Provider host is required S3 provider host is required.
-31791 Provider host is invalid S3 provider host is invalid.
-31794 Provider port is invalid S3 provider port is invalid.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "validate_s3_provider_url",
  "params": {
    "provider_id": 42,
    "proto": "http",
    "host": "example.com",
    "port": 443
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "is_valid": true
  }
}

get_s3_resource
S3 Resource

Get S3 resource by id.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.id integer minimum="1" Resource id.
Result
Name Type Constraints Description
result object S3 resource information.
result.id integer Resource id.
result.name string Resource name.
result.provider object S3 provider information.
result.provider.id integer Provider id.
result.provider.name string Provider name.
result.provider.bucket_name_location string Designates whether a bucket name is a part of a hostname or path.
result.provider.min_bucket_name_length integer Minimum bucket name.
result.provider.max_bucket_name_length integer Maximum bucket name.
result.provider.bucket_name_regex_pattern string Regular expression for bucket name validation.
result.provider.bucket_naming_rule_description string References or description for bucket naming rules.
result.provider.hostname_regex_pattern string Regular expression for hostname validation.
result.provider.protocol_regex_pattern string Regular expression for protocol validation.
result.provider.port_regex_pattern string Regular expression for port validation.
result.provider.url_naming_rule_description string References or description for hostname naming rules.
result.provider_proto string Http protocol. Choices: http | https.
result.provider_host string Provider host.
result.provider_port integer Provider port.
result.cdn_s3_domain integer The domain for working with S3 via CDN.
result.external_user_id integer External user id.
result.partner_name string Partner name.
result.is_active boolean Is the resource active.
result.updated_at string Datetime of last resource update. Format: ISO 8601
result.created_at string Datetime of resource creation. Format: ISO 8601
Errors
Code Message Description
-31781 S3 resource not found S3 resource with this id not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_s3_resource",
  "params": {
    "id": 1
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 1,
    "name": "My Resource",
    "provider": {
      "id": 1,
      "name": "aws"
    },
    "provider_proto": "https",
    "provider_host": "s3.aws.com",
    "provider_port": 443,
    "cdn_s3_domain": "s123.cdn-clients.arviol.com",
    "external_user_id": 1167,
    "partner_name": "cdn",
    "is_active": true,
    "updated_at": "2023-02-07T15:10:29.681270Z",
    "created_at": "2023-02-07T15:10:29.681269Z"
  }
}

get_s3_resources
S3 Resource

Get S3 resources.

Authorization is required.


Parameters
Name Type Constraints Description
params object
params.external_user_id integer minimum="1" Filter by external user id. Optional.
params.provider_id integer minimum="1" Filter by provider id. Optional.
params.partner_name string Filter by partner name. Optional.
params.resource_name_eq string Filter by exact match of the resource name. Optional.
params.resource_name_lk string Filter by match of the resource name. Optional.
Result
Name Type Constraints Description
result array
result[] object S3 resource information.
result[].id integer Resource id.
result[].name string Resource name.
result[].provider object S3 provider information.
result[].provider.id integer Provider id.
result[].provider.name string Provider name.
result[].provider.bucket_name_location string Designates whether a bucket name is a part of a hostname or path.
result[].provider.min_bucket_name_length integer Minimum bucket name.
result[].provider.max_bucket_name_length integer Maximum bucket name.
result[].provider.bucket_name_regex_pattern string Regular expression for bucket name validation.
result[].provider.bucket_naming_rule_description string References or description for bucket naming rules.
result[].provider.hostname_regex_pattern string Regular expression for hostname validation.
result[].provider.protocol_regex_pattern string Regular expression for protocol validation.
result[].provider.port_regex_pattern string Regular expression for port validation.
result[].provider.url_naming_rule_description string References or description for hostname naming rules.
result[].provider_proto string Http protocol. Choices: http | https.
result[].provider_host string Provider host.
result[].provider_port integer Provider port.
result[].cdn_s3_domain integer The domain for working with S3 via CDN.
result[].external_user_id integer External user id.
result[].partner_name string Partner name.
result[].is_active boolean Is the resource active.
result[].updated_at string Datetime of last resource update. Format: ISO 8601
result[].created_at string Datetime of resource creation. Format: ISO 8601
Errors
Code Message Description
-31556 External user ID must be an integer external_user_id field must be an integer.
-31557 External user ID must be greater then 0 external_user_id field must be greater then 0.
-31780 S3 provider not found S3 provider with this id not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_s3_resources",
  "params": {
    "external_user_id": 13,
    "provider_id": 78,
    "partner_name": 13,
    "resource_name_eq": "resource",
    "resource_name_lk": "my resource"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "id": 1,
      "name": "My Resource",
      "provider": {
        "id": 1,
        "name": "aws"
      },
      "provider_proto": "https",
      "provider_host": "s3.aws.com",
      "provider_port": 443,
      "cdn_s3_domain": "s123.cdn-clients.arviol.com",
      "external_user_id": 1167,
      "partner_name": "cdn",
      "is_active": true,
      "updated_at": "2023-02-07T15:10:29.681270Z",
      "created_at": "2023-02-07T15:10:29.681269Z"
    }
  ]
}

create_s3_resource
S3 Resource

Run the S3 resource creation task.

S3 resource is a object with S3 provider data. S3 resource is used when creating buckets.
Unique constraints: [external_user_id, provider_proto, provider_host, provider_port].
Authorization is required.
Task type: CREATE_S3_RESOURCE


Parameters
Name Type Constraints Description
params object S3 resource information.
params.name string minLength="1" Resource name.
params.provider_id integer minimum="1" Provider id.
params.provider_proto string enum="http,https" Http protocol. Choices: http | https. Default=https. Optional.
params.provider_host string minLength="3" Provider host.
params.provider_port integer minimum="1" Provider port. Default=443. Optional.
params.external_user_id integer minimum="1" External user id.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31780 S3 provider not found S3 provider with this id not found.
-31783 S3-resource already exists S3 resource with this params already exists or is being created.
-31784 Resource name is required Resource name is required.
-31785 Resource name is too short, min length: 1 Resource name is too short, min length: 1.
-31786 Resource name is too long, max length: 128 Resource name is too long, max length: 128.
-31787 Invalid choise. Expected: http, https S3 porvider protocol is invalid. Expected: http, https.
-31788 Provider host is required S3 provider host is required.
-31789 Porvider host is too short, min length: 4 S3 porvider host is too short, min length: 4.
-31790 Porvider host is too long, max length: 256 S3 porvider host is too long, max length: 256.
-31791 Porvider host is not a valid string S3 porvider host is not a valid string.
-31792 Provider port value must be greater then 0 S3 provider port value must be greater then 0.
-31793 Provider port value must be less then 65535 S3 provider port value must be less then 65535.
-31794 Provider port value must be an integer S3 provider port value must be an integer.
-31801 Task already exists Task with this id already exists.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "create_s3_resource",
  "params": {
    "name": "My Resource",
    "provider_id": 2,
    "provider_proto": "https",
    "provider_host": "s3.aws.com",
    "provider_port": 443,
    "external_user_id": 1167
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

update_s3_resource
S3 Resource

Update S3 resource.

Authorization is required. Owner only.
Unique constraints: [external_user_id, provider_proto, provider_host, provider_port].


Parameters
Name Type Constraints Description
params object S3 resource information.
params.id integer minimum="1" id of the S3 resource to be updated.
params.name string minLength="1" Resource name.
params.provider_id integer minimum="1" Provider id.
params.provider_proto string enum="http,https" Http protocol. Choices: http | https. Default=https. Optional.
params.provider_host string minLength="3" Provider host.
params.provider_port integer minimum="1" Provider port. Default=443. Optional.
params.external_user_id integer minimum="1" External user id.
Result
Name Type Constraints Description
result object S3 resource information.
result.id integer Resource id.
result.name string Resource name.
result.provider object S3 provider information.
result.provider.id integer Provider id.
result.provider.name string Provider name.
result.provider.bucket_name_location string Designates whether a bucket name is a part of a hostname or path.
result.provider.min_bucket_name_length integer Minimum bucket name.
result.provider.max_bucket_name_length integer Maximum bucket name.
result.provider.bucket_name_regex_pattern string Regular expression for bucket name validation.
result.provider.bucket_naming_rule_description string References or description for bucket naming rules.
result.provider.hostname_regex_pattern string Regular expression for hostname validation.
result.provider.protocol_regex_pattern string Regular expression for protocol validation.
result.provider.port_regex_pattern string Regular expression for port validation.
result.provider.url_naming_rule_description string References or description for hostname naming rules.
result.provider_proto string Http protocol. Choices: http | https.
result.provider_host string Provider host.
result.provider_port integer Provider port.
result.cdn_s3_domain integer The domain for working with S3 via CDN.
result.external_user_id integer External user id.
result.partner_name string Partner name.
result.is_active boolean Is the resource active.
result.updated_at string Datetime of last resource update. Format: ISO 8601
result.created_at string Datetime of resource creation. Format: ISO 8601
Errors
Code Message Description
-31780 S3 provider not found S3 provider with this id not found.
-31781 S3 resource not found S3 resource with this id not found.
-31783 S3-resource already exists S3 resource with this params already exists.
-31784 Resource name is required Resource name is required.
-31785 Resource name is too short, min length: 1 Resource name is too short, min length: 1.
-31786 Resource name is too long, max length: 128 Resource name is too long, max length: 128.
-31787 Invalid choise. Expected: http, https S3 provider protocol is invalid. Expected: http, https.
-31788 Provider host is required S3 provider host is required.
-31789 Provider host is too short, min length: 4 S3 provider host is too short, min length: 4.
-31790 Provider host is too long, max length: 256 S3 provider host is too long, max length: 256.
-31791 Provider host is not a valid string S3 provider host is not a valid string.
-31792 Provider port value must be greater then 0 S3 provider port value must be greater then 0.
-31793 Provider port value must be less then 65535 S3 provider port value must be less then 65535.
-31794 Provider port value must be an integer S3 provider port value must be an integer.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "update_s3_resource",
  "params": {
    "id": 1,
    "name": "My Resource",
    "provider_id": 2,
    "provider_proto": "https",
    "provider_host": "s3.aws.com",
    "provider_port": 443,
    "external_user_id": 1167
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 1,
    "name": "My Resource",
    "provider": {
      "id": 1,
      "name": "aws"
    },
    "provider_proto": "https",
    "provider_host": "s3.aws.com",
    "provider_port": 443,
    "cdn_s3_domain": "s123.cdn-clients.arviol.com",
    "external_user_id": 1167,
    "partner_name": "cdn",
    "is_active": true,
    "updated_at": "2023-02-07T15:10:29.681270Z",
    "created_at": "2023-02-07T15:10:29.681269Z"
  }
}

delete_s3_resource
S3 Resource

Run the S3 resource deletion task.

S3 resource will be deleted along with the buckets.
Authorization is required. Owner only.
Task type: DELETE_S3_RESOURCE


Parameters
Name Type Constraints Description
params object
params.id integer minimum="1" S3 resource id.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31781 S3 resource not found S3 resource with this id not found or is being deleted.
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this resource or related objects is already running.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "delete_s3_resource",
  "params": {
    "id": 12
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

get_s3_bucket
S3 Bucket

Get S3 bucket by id.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.id integer minimum="1" Bucket id.
Result
Name Type Constraints Description
result object S3 bucket information.
result.id integer Bucket id.
result.name string Bucket name.
result.status string enum="OK,DISABLED,BLOCKED" Bucket status. "OK" | "DISABLED" | "BLOCKED".
result.last_cache_cleanup string Datetime of last cache cleanup or null. Format: ISO 8601
result.headers array List of headers for this bucket.
result.headers[] object Bucket header.
result.headers[].key string Header key.
result.headers[].value string Header value.
result.resource_id integer Resource id.
result.cors_headers object CORS response headers information. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers for details. Optional.
result.cors_headers.access_control_allow_origin array A list of allowed origins. If an "*" symbol is present, other values are ignored. Optional.
result.cors_headers.access_control_allow_origin[] string Syntax according to CORS specification or an "*" symbol.
result.cors_headers.access_control_expose_headers array A list of header keys. Allows a server to indicate which response headers should be made available to scripts running in the browser. Optional.
result.cors_headers.access_control_expose_headers[] string Header key or an "*" symbol.
result.cors_headers.access_control_max_age integer minimum="0" Maximum number of seconds the results of preflight request can be cached. Optional.
result.cors_headers.access_control_allow_credentials boolean Indicates whether or not the actual request can be made using credentials. Optional.
result.cors_headers.access_control_allow_methods array A list of HTTP-methods allowed when accessing the resource. Optional.
result.cors_headers.access_control_allow_methods[] string HTTP-method name, uppercase.
result.cors_headers.access_control_allow_headers array A list of header keys. Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. If an "*" symbol is present, other values are ignored. Optional.
result.cors_headers.access_control_allow_headers[] string Header key or an "*" symbol.
Errors
Code Message Description
-31782 S3 bucket not found S3 bucket with this id not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_s3_bucket",
  "params": {
    "id": 1
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 1,
    "name": "my-bucket",
    "status": "DISABLED",
    "last_cache_cleanup": "null / 2023-02-07T15:10:29.681269Z",
    "headers": [
      {
        "key": "x-amz-server-side-encryption",
        "value": "AES256"
      }
    ],
    "resource_id": 1,
    "cors_headers": {
      "access_control_allow_origin": [
        "*"
      ],
      "access_control_expose_headers": [
        "*"
      ],
      "access_control_max_age": 600,
      "access_control_allow_credentials": true,
      "access_control_allow_methods": [
        "DELETE"
      ],
      "access_control_allow_headers": [
        "*"
      ]
    }
  }
}

get_s3_buckets
S3 Bucket

Get S3 buckets.

Authorization is required.


Parameters
Name Type Constraints Description
params object
params.external_user_id integer minimum="1" Filter by external user id. Optional.
params.provider_id integer minimum="1" Filter by provider id. Optional.
params.resource_id integer minimum="1" Filter by resource id. Optional.
params.partner_name string Filter by partner name. Optional.
params.bucket_name_eq string Filter by exact match of the bucket name. Optional.
params.bucket_name_lk string Filter by match of the bucket name. Optional.
params.statuses array List of statuses by which you need to filter buckets. Optional.
params.statuses[] string Bucket status.
Result
Name Type Constraints Description
result array
result[] object S3 bucket information.
result[].id integer Bucket id.
result[].name string Bucket name.
result[].status string enum="OK,DISABLED,BLOCKED" Bucket status. "OK" | "DISABLED" | "BLOCKED".
result[].last_cache_cleanup string Datetime of last cache cleanup or null. Format: ISO 8601
result[].headers array List of headers for this bucket.
result[].headers[] object Bucket header.
result[].headers[].key string Header key.
result[].headers[].value string Header value.
result[].resource_id integer Resource id.
result[].cors_headers object CORS response headers information. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers for details. Optional.
result[].cors_headers.access_control_allow_origin array A list of allowed origins. If an "*" symbol is present, other values are ignored. Optional.
result[].cors_headers.access_control_allow_origin[] string Syntax according to CORS specification or an "*" symbol.
result[].cors_headers.access_control_expose_headers array A list of header keys. Allows a server to indicate which response headers should be made available to scripts running in the browser. Optional.
result[].cors_headers.access_control_expose_headers[] string Header key or an "*" symbol.
result[].cors_headers.access_control_max_age integer minimum="0" Maximum number of seconds the results of preflight request can be cached. Optional.
result[].cors_headers.access_control_allow_credentials boolean Indicates whether or not the actual request can be made using credentials. Optional.
result[].cors_headers.access_control_allow_methods array A list of HTTP-methods allowed when accessing the resource. Optional.
result[].cors_headers.access_control_allow_methods[] string HTTP-method name, uppercase.
result[].cors_headers.access_control_allow_headers array A list of header keys. Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. If an "*" symbol is present, other values are ignored. Optional.
result[].cors_headers.access_control_allow_headers[] string Header key or an "*" symbol.
Errors
Code Message Description
-31780 S3 provider not found S3 provider with this id not found.
-31781 S3 resource not found S3 resource with this id not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_s3_buckets",
  "params": {
    "external_user_id": 13,
    "provider_id": 78,
    "resource_id": 1,
    "partner_name": 13,
    "bucket_name_eq": "bucket",
    "bucket_name_lk": "my-bucket",
    "statuses": [
      "DISABLED",
      "BLOCKED"
    ]
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "id": 1,
      "name": "my-bucket",
      "status": "DISABLED",
      "last_cache_cleanup": "null / 2023-02-07T15:10:29.681269Z",
      "headers": [
        {
          "key": "x-amz-server-side-encryption",
          "value": "AES256"
        }
      ],
      "resource_id": 1,
      "cors_headers": {
        "access_control_allow_origin": [
          "*"
        ],
        "access_control_expose_headers": [
          "*"
        ],
        "access_control_max_age": 600,
        "access_control_allow_credentials": true,
        "access_control_allow_methods": [
          "DELETE"
        ],
        "access_control_allow_headers": [
          "*"
        ]
      }
    }
  ]
}

create_s3_bucket
S3 Bucket

Create S3 bucket.

Authorization is required.


Parameters
Name Type Constraints Description
params object S3 bucket information.
params.name string minLength="3", maxLength="250" Bucket name. Bucket names must be between 3 (min) and 250 (max) characters long. Bucket names can consist only of letters, numbers, dots (.), underscores (_), and hyphens (-). Each dot-separated component can be no longer than 63 characters. Bucket names must begin and end with a letter or number. Bucket name in sum with provider host must be less than 256.
params.resource_id string minimum="1" Resource id.
params.headers array maximum="100" List of headers for this bucket. Default=[], Optional.
params.headers[] object Bucket header.
params.headers[].key string minLength="1", maxLength="1024" Header key.
params.headers[].value string minLength="1", maxLength="4094" Header value.
params.cors_headers object CORS response headers information. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers for details. Optional.
params.cors_headers.access_control_allow_origin array A list of allowed origins. If an "*" symbol is present, other values are ignored. Optional.
params.cors_headers.access_control_allow_origin[] string Syntax according to CORS specification or an "*" symbol.
params.cors_headers.access_control_expose_headers array A list of header keys. Allows a server to indicate which response headers should be made available to scripts running in the browser. Optional.
params.cors_headers.access_control_expose_headers[] string Header key or an "*" symbol.
params.cors_headers.access_control_max_age integer minimum="0" Maximum number of seconds the results of preflight request can be cached. Optional.
params.cors_headers.access_control_allow_credentials boolean Indicates whether or not the actual request can be made using credentials. Optional.
params.cors_headers.access_control_allow_methods array A list of HTTP-methods allowed when accessing the resource. Optional.
params.cors_headers.access_control_allow_methods[] string HTTP-method name, uppercase.
params.cors_headers.access_control_allow_headers array A list of header keys. Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. If an "*" symbol is present, other values are ignored. Optional.
params.cors_headers.access_control_allow_headers[] string Header key or an "*" symbol.
Result
Name Type Constraints Description
result object S3 bucket information.
result.id integer Bucket id.
result.name string Bucket name.
result.status string enum="OK,DISABLED,BLOCKED" Bucket status. "OK" | "DISABLED" | "BLOCKED".
result.last_cache_cleanup string Datetime of last cache cleanup or null. Format: ISO 8601
result.headers array List of headers for this bucket.
result.headers[] object Bucket header.
result.headers[].key string Header key.
result.headers[].value string Header value.
result.resource_id integer Resource id.
result.cors_headers object CORS response headers information. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers for details. Optional.
result.cors_headers.access_control_allow_origin array A list of allowed origins. If an "*" symbol is present, other values are ignored. Optional.
result.cors_headers.access_control_allow_origin[] string Syntax according to CORS specification or an "*" symbol.
result.cors_headers.access_control_expose_headers array A list of header keys. Allows a server to indicate which response headers should be made available to scripts running in the browser. Optional.
result.cors_headers.access_control_expose_headers[] string Header key or an "*" symbol.
result.cors_headers.access_control_max_age integer minimum="0" Maximum number of seconds the results of preflight request can be cached. Optional.
result.cors_headers.access_control_allow_credentials boolean Indicates whether or not the actual request can be made using credentials. Optional.
result.cors_headers.access_control_allow_methods array A list of HTTP-methods allowed when accessing the resource. Optional.
result.cors_headers.access_control_allow_methods[] string HTTP-method name, uppercase.
result.cors_headers.access_control_allow_headers array A list of header keys. Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. If an "*" symbol is present, other values are ignored. Optional.
result.cors_headers.access_control_allow_headers[] string Header key or an "*" symbol.
Errors
Code Message Description
-31751 Header key is required Header key is required.
-31752 Invalid header key Invalid header key. Header key can consist only latin letters and next symbols: -_: .
-31753 Header key is too long, max length: 1024 Header key is too long, max length: 1024.
-31754 Header keys must be unique Header keys must be unique.
-31755 Header value is required Header value is required.
-31756 Invalid header value Invalid header value. Header value can consist only letters and next symbols: _ :;.,\/"'!(){}[]@<>=-+*#$&`|~^%
-31757 Header value is too long, max length: 4094 Header value is too long, max length: 4094.
-31760 Duplicate elements in CORS values list Duplicate elements in CORS values list
-31761 CORS values list length must not exceed 50 CORS values list length must not exceed 50
-31762 Invalid CORS origin syntax Value of CORS access_control_allow_origin must be a valid origin defined by scheme, protocol, domain and (optional) port
-31763 Invalid CORS header key syntax Invalid CORS header key. Header key can consist only latin letters and next symbols: -_: .
-31764 CORS header key length must not exceed 1024 CORS header key length must not exceed 1024
-31765 CORS header access_control_max_age value must be positive integer CORS header access_control_max_age value must be positive integer
-31766 CORS header access_control_max_age value must not exceed 86400 seconds CORS header access_control_max_age value must not exceed 86400 seconds (24 hours)
-31767 Invalid HTTP method in CORS header access_control_allow_methods Invalid HTTP method in CORS header access_control_allow_methods. Value must be a valid HTTP method uppercase
-31781 S3 resource not found S3 resource with this id not found.
-31795 Bucket name is required Bucket name is required.
-31796 Bucket name is too short, min length: 3 Bucket name is too short, min length: 3.
-31797 Bucket name is too long, max length: 250 Bucket name is too long, max length: 250.
-31798 Bucket name is not a valid string Invalid bucket name. Bucket names can consist only of lowercase latin letters, numbers, dots, and hyphens.
-31799 Bucket already exists Bucket with this name already exists.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "create_s3_bucket",
  "params": {
    "name": "my-bucket",
    "resource_id": 2,
    "headers": [
      {
        "key": "x-amz-server-side-encryption",
        "value": "AES256"
      }
    ],
    "cors_headers": {
      "access_control_allow_origin": [
        "*"
      ],
      "access_control_expose_headers": [
        "*"
      ],
      "access_control_max_age": 600,
      "access_control_allow_credentials": true,
      "access_control_allow_methods": [
        "DELETE"
      ],
      "access_control_allow_headers": [
        "*"
      ]
    }
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 1,
    "name": "my-bucket",
    "status": "DISABLED",
    "last_cache_cleanup": "null / 2023-02-07T15:10:29.681269Z",
    "headers": [
      {
        "key": "x-amz-server-side-encryption",
        "value": "AES256"
      }
    ],
    "resource_id": 1,
    "cors_headers": {
      "access_control_allow_origin": [
        "*"
      ],
      "access_control_expose_headers": [
        "*"
      ],
      "access_control_max_age": 600,
      "access_control_allow_credentials": true,
      "access_control_allow_methods": [
        "DELETE"
      ],
      "access_control_allow_headers": [
        "*"
      ]
    }
  }
}

update_s3_bucket
S3 Bucket

Update S3 bucket.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object S3 bucket information.
params.id integer minimum="1" Bucket id.
params.headers array maximum="100" List of headers for this bucket. Default=[], Optional.
params.headers[] object Bucket header.
params.headers[].key string minLength="1", maxLength="1024" Header key.
params.headers[].value string minLength="1", maxLength="4094" Header value.
params.cors_headers object CORS response headers information. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers for details. Optional.
params.cors_headers.access_control_allow_origin array A list of allowed origins. If an "*" symbol is present, other values are ignored. Optional.
params.cors_headers.access_control_allow_origin[] string Syntax according to CORS specification or an "*" symbol.
params.cors_headers.access_control_expose_headers array A list of header keys. Allows a server to indicate which response headers should be made available to scripts running in the browser. Optional.
params.cors_headers.access_control_expose_headers[] string Header key or an "*" symbol.
params.cors_headers.access_control_max_age integer minimum="0" Maximum number of seconds the results of preflight request can be cached. Optional.
params.cors_headers.access_control_allow_credentials boolean Indicates whether or not the actual request can be made using credentials. Optional.
params.cors_headers.access_control_allow_methods array A list of HTTP-methods allowed when accessing the resource. Optional.
params.cors_headers.access_control_allow_methods[] string HTTP-method name, uppercase.
params.cors_headers.access_control_allow_headers array A list of header keys. Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. If an "*" symbol is present, other values are ignored. Optional.
params.cors_headers.access_control_allow_headers[] string Header key or an "*" symbol.
Result
Name Type Constraints Description
result object S3 bucket information.
result.id integer Bucket id.
result.name string Bucket name.
result.status string enum="OK,DISABLED,BLOCKED" Bucket status. "OK" | "DISABLED" | "BLOCKED".
result.last_cache_cleanup string Datetime of last cache cleanup or null. Format: ISO 8601
result.headers array List of headers for this bucket.
result.headers[] object Bucket header.
result.headers[].key string Header key.
result.headers[].value string Header value.
result.resource_id integer Resource id.
result.cors_headers object CORS response headers information. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers for details. Optional.
result.cors_headers.access_control_allow_origin array A list of allowed origins. If an "*" symbol is present, other values are ignored. Optional.
result.cors_headers.access_control_allow_origin[] string Syntax according to CORS specification or an "*" symbol.
result.cors_headers.access_control_expose_headers array A list of header keys. Allows a server to indicate which response headers should be made available to scripts running in the browser. Optional.
result.cors_headers.access_control_expose_headers[] string Header key or an "*" symbol.
result.cors_headers.access_control_max_age integer minimum="0" Maximum number of seconds the results of preflight request can be cached. Optional.
result.cors_headers.access_control_allow_credentials boolean Indicates whether or not the actual request can be made using credentials. Optional.
result.cors_headers.access_control_allow_methods array A list of HTTP-methods allowed when accessing the resource. Optional.
result.cors_headers.access_control_allow_methods[] string HTTP-method name, uppercase.
result.cors_headers.access_control_allow_headers array A list of header keys. Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. If an "*" symbol is present, other values are ignored. Optional.
result.cors_headers.access_control_allow_headers[] string Header key or an "*" symbol.
Errors
Code Message Description
-31751 Header key is required Header key is required.
-31752 Invalid header key Invalid header key. Header key can consist only latin letters and next symbols: -_: .
-31753 Header key is too long, max length: 1024 Header key is too long, max length: 1024.
-31754 Header keys must be unique Header keys must be unique.
-31755 Header value is required Header value is required.
-31756 Invalid header value Invalid header value. Header value can consist only letters and next symbols: _ :;.,\/"'!(){}[]@<>=-+*#$&`|~^%
-31757 Header value is too long, max length: 4094 Header value is too long, max length: 4094.
-31760 Duplicate elements in CORS values list Duplicate elements in CORS values list
-31761 CORS values list length must not exceed 50 CORS values list length must not exceed 50
-31762 Invalid CORS origin syntax Value of CORS access_control_allow_origin must be a valid origin defined by scheme, protocol, domain and (optional) port
-31763 Invalid CORS header key syntax Invalid CORS header key. Header key can consist only latin letters and next symbols: -_: .
-31764 CORS header key length must not exceed 1024 CORS header key length must not exceed 1024
-31765 CORS header access_control_max_age value must be positive integer CORS header access_control_max_age value must be positive integer
-31766 CORS header access_control_max_age value must not exceed 86400 seconds CORS header access_control_max_age value must not exceed 86400 seconds (24 hours)
-31767 Invalid HTTP method in CORS header access_control_allow_methods Invalid HTTP method in CORS header access_control_allow_methods. Value must be a valid HTTP method uppercase
-31782 S3 bucket not found S3 bucket with this id not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "update_s3_bucket",
  "params": {
    "id": 1,
    "headers": [
      {
        "key": "x-amz-server-side-encryption",
        "value": "AES256"
      }
    ],
    "cors_headers": {
      "access_control_allow_origin": [
        "*"
      ],
      "access_control_expose_headers": [
        "*"
      ],
      "access_control_max_age": 600,
      "access_control_allow_credentials": true,
      "access_control_allow_methods": [
        "DELETE"
      ],
      "access_control_allow_headers": [
        "*"
      ]
    }
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 1,
    "name": "my-bucket",
    "status": "DISABLED",
    "last_cache_cleanup": "null / 2023-02-07T15:10:29.681269Z",
    "headers": [
      {
        "key": "x-amz-server-side-encryption",
        "value": "AES256"
      }
    ],
    "resource_id": 1,
    "cors_headers": {
      "access_control_allow_origin": [
        "*"
      ],
      "access_control_expose_headers": [
        "*"
      ],
      "access_control_max_age": 600,
      "access_control_allow_credentials": true,
      "access_control_allow_methods": [
        "DELETE"
      ],
      "access_control_allow_headers": [
        "*"
      ]
    }
  }
}

delete_s3_bucket
S3 Bucket

Run a task to disable CDN and delete S3 bucket.

Authorization is required. Owner only.
Related VOD object will also be deleted.
Task type: DELETE_BUCKET


Parameters
Name Type Constraints Description
params object
params.id integer minimum="1" Bucket id.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31782 S3 bucket not found S3 bucket with this id not found.
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this bucket or related object is already running.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "delete_s3_bucket",
  "params": {
    "id": 1
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

enable_cdn_for_s3_bucket
S3 Bucket

Enable CDN for S3 bucket by id.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.id integer minimum="1" Bucket id.
Result
Name Type Constraints Description
result object
result.enabled string Name of the enabled bucket.
Errors
Code Message Description
-31782 S3 bucket not found S3 bucket with this id not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "enable_cdn_for_s3_bucket",
  "params": {
    "id": 1
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "enabled": "my-bucket"
  }
}

disable_cdn_for_s3_bucket
S3 Bucket

Run the CDN deactivation task for the S3 bucket.

Authorization is required. Owner only.
Related VOD objects will also be disabled.
Task type: DISABLE_BUCKET


Parameters
Name Type Constraints Description
params object
params.id integer minimum="1" Bucket id.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31782 S3 bucket not found S3 bucket with this id not found.
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this bucket or related object is already running.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "disable_cdn_for_s3_bucket",
  "params": {
    "id": 1
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

disable_s3_buckets_by_resource
S3 Bucket

Run CDN deactivation task for S3 buckets by resource_id.

Authorization is required. Owner only.
Related VOD objects will also be disabled.
Task type: DISABLE_BUCKETS_BY_RESOURCE


Parameters
Name Type Constraints Description
params object
params.resource_id string minimum="1" Resource id.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31781 S3 resource not found S3 resource with this id not found.
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this s3 resource or related objects is already running.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "disable_s3_buckets_by_resource",
  "params": {
    "resource_id": 2
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

clear_s3_bucket_cache
S3 Bucket

Clear the cache for the bucket.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.id integer minimum="1" Bucket id.
Result
Name Type Constraints Description
result object S3 bucket information.
result.id integer Bucket id.
result.name string Bucket name.
result.status string enum="OK,DISABLED,BLOCKED" Bucket status. "OK" | "DISABLED" | "BLOCKED".
result.last_cache_cleanup string Datetime of last cache cleanup or null. Format: ISO 8601
result.headers array List of headers for this bucket.
result.headers[] object Bucket header.
result.headers[].key string Header key.
result.headers[].value string Header value.
result.resource_id integer Resource id.
result.cors_headers object CORS response headers information. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers for details. Optional.
result.cors_headers.access_control_allow_origin array A list of allowed origins. If an "*" symbol is present, other values are ignored. Optional.
result.cors_headers.access_control_allow_origin[] string Syntax according to CORS specification or an "*" symbol.
result.cors_headers.access_control_expose_headers array A list of header keys. Allows a server to indicate which response headers should be made available to scripts running in the browser. Optional.
result.cors_headers.access_control_expose_headers[] string Header key or an "*" symbol.
result.cors_headers.access_control_max_age integer minimum="0" Maximum number of seconds the results of preflight request can be cached. Optional.
result.cors_headers.access_control_allow_credentials boolean Indicates whether or not the actual request can be made using credentials. Optional.
result.cors_headers.access_control_allow_methods array A list of HTTP-methods allowed when accessing the resource. Optional.
result.cors_headers.access_control_allow_methods[] string HTTP-method name, uppercase.
result.cors_headers.access_control_allow_headers array A list of header keys. Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. If an "*" symbol is present, other values are ignored. Optional.
result.cors_headers.access_control_allow_headers[] string Header key or an "*" symbol.
Errors
Code Message Description
-31782 S3 bucket not found S3 bucket with this id not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "clear_s3_bucket_cache",
  "params": {
    "id": 1
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 1,
    "name": "my-bucket",
    "status": "DISABLED",
    "last_cache_cleanup": "null / 2023-02-07T15:10:29.681269Z",
    "headers": [
      {
        "key": "x-amz-server-side-encryption",
        "value": "AES256"
      }
    ],
    "resource_id": 1,
    "cors_headers": {
      "access_control_allow_origin": [
        "*"
      ],
      "access_control_expose_headers": [
        "*"
      ],
      "access_control_max_age": 600,
      "access_control_allow_credentials": true,
      "access_control_allow_methods": [
        "DELETE"
      ],
      "access_control_allow_headers": [
        "*"
      ]
    }
  }
}

get_task
Task

Get task by ID.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.id string Task ID in UUID.
Result
Name Type Constraints Description
result object Task information.
result.id string Task ID in UUID.
result.task_type string Task type.
result.priority integer Task priority.
result.args json Task arguments.
result.groups array Task groups.
result.owner_id integer ID of the task owner.
result.external_user_id integer External user ID.
result.result json Result params.
result.start_stage integer Start stage of task.
result.stage integer Current stage of task.
result.stage_name string The name of current stage.
result.tries_count integer Tries count of current stage.
result.max_tries integer Max tries of current stage.
result.status string Task status.
result.store json Task store.
result.info json Task info.
result.logs array Task logs in json format.
result.logs[] json
result.created_at string Task creating time.
result.updated_at string Task updating time.
result.removed_at string Task removing time.
result.completed_at string Task completion time.
result.domain_id integer Domain ID, if the task is performed with a domain or null.
result.s3_resource_id integer S3 resource ID, if the task is performed with a S3 resource or null.
result.vod_id integer VOD ID, if the task is performed with a VOD object or null.
result.subject_id string Additional ID for user identification.
result.percentage integer Percentage of task completion
result.partner_name string Partner name.
Errors
Code Message Description
-31800 Task not found The Task with this ID not found.
-31805 Task ID is required id field is required.
-31806 Task ID is not valid: UUID expected id is not valid: UUID expected.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_task",
  "params": {
    "id": "0478584f-f1a4-4c64-80c8-e7170d24dbb6"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "0478584f-f1a4-4c64-80c8-e7170d24dbb6",
    "task_type": "ENABLE_CDN",
    "priority": 5,
    "args": {
      "domain_id": 78,
      "headers_info": {
        "SUBJECT-ID": "1111",
        "PARTNER-NAME": "partner_name"
      }
    },
    "owner_id": 1,
    "external_user_id": 13,
    "result": {},
    "start_stage": 1,
    "stage": 2,
    "stage_name": "issue_ssl_cert",
    "tries_count": 0,
    "max_tries": 1,
    "status": "COMPLETED",
    "store": {},
    "info": {},
    "logs": [
      {
        "failed": "1663928018.002775 - Domain mail.ru not on ITGlobals NS"
      }
    ],
    "created_at": "2022-09-23T09:31:24.724889Z",
    "updated_at": "2022-09-23T09:31:24.724917Z",
    "removed_at": "2022-09-23T09:31:24.724917Z",
    "completed_at": "2022-09-23T09:31:24.917482Z",
    "domain_id": 78,
    "s3_resource_id": 12,
    "vod_id": 12,
    "subject_id": "0478584f-f12b-45c3-e7170d24dbb6",
    "percentage": "66",
    "partner_name": "cdn"
  }
}

get_tasks
Task

Get tasks.

Authorization is required.


Parameters
Name Type Constraints Description
params object
params.limit integer minLength="1" Limit the number of output tasks. Optional.
params.external_user_id integer minLength="1" Filter by external user ID. Optional.
params.domain_id integer minLength="1" Filter by domain_id in task args. Optional.
params.s3_resource_id integer minLength="1" Filter by s3_resource_id in task args. Optional.
params.bucket_id integer minLength="1" Filter by bucket_id in task args. Optional.
params.vod_id integer minLength="1" Filter by vod_id in task args. Optional.
params.statuses array List of statuses by which you need to filter tasks. Optional.
params.statuses[] string Task status.
params.partner_name string Partner name. Optional.
Result
Name Type Constraints Description
result array
result[] object Task information.
result[].id string Task ID in UUID.
result[].task_type string Task type.
result[].priority integer Task priority.
result[].args json Task arguments.
result[].groups array Task groups.
result[].owner_id integer ID of the task owner.
result[].external_user_id integer External user ID.
result[].result json Result params.
result[].start_stage integer Start stage of task.
result[].stage integer Current stage of task.
result[].stage_name string The name of current stage.
result[].tries_count integer Tries count of current stage.
result[].max_tries integer Max tries of current stage.
result[].status string Task status.
result[].store json Task store.
result[].info json Task info.
result[].logs array Task logs in json format.
result[].logs[] json
result[].created_at string Task creating time.
result[].updated_at string Task updating time.
result[].removed_at string Task removing time.
result[].completed_at string Task completion time.
result[].domain_id integer Domain ID, if the task is performed with a domain or null.
result[].s3_resource_id integer S3 resource ID, if the task is performed with a S3 resource or null.
result[].vod_id integer VOD ID, if the task is performed with a VOD object or null.
result[].subject_id string Additional ID for user identification.
result[].percentage integer Percentage of task completion
result[].partner_name string Partner name.
Errors
Code Message Description
-31556 External user ID must be an integer external_user_id field must be an integer.
-31557 External user ID must be greater then 0 external_user_id field must be greater then 0.
-31631 Domain ID must be an integer domain_id field must be an integer.
-31632 Domain ID must be greater then 0 domain_id field must be greater then 0.
-31811 Task status is not a valid string status in statuses field is not a valid string.
-31815 List of Task statuses is expected statuses field must be a list.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_tasks",
  "params": {
    "limit": 5,
    "external_user_id": 13,
    "domain_id": 78,
    "s3_resource_id": 123,
    "bucket_id": 12,
    "vod_id": 126,
    "statuses": [
      "COMPLETED",
      "CANCELED"
    ],
    "partner_name": "cdn"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "id": "0478584f-f1a4-4c64-80c8-e7170d24dbb6",
      "task_type": "ENABLE_CDN",
      "priority": 5,
      "args": {
        "domain_id": 78,
        "headers_info": {
          "SUBJECT-ID": "1111",
          "PARTNER-NAME": "partner_name"
        }
      },
      "owner_id": 1,
      "external_user_id": 13,
      "result": {},
      "start_stage": 1,
      "stage": 2,
      "stage_name": "issue_ssl_cert",
      "tries_count": 0,
      "max_tries": 1,
      "status": "COMPLETED",
      "store": {},
      "info": {},
      "logs": [
        {
          "failed": "1663928018.002775 - Domain mail.ru not on ITGlobals NS"
        }
      ],
      "created_at": "2022-09-23T09:31:24.724889Z",
      "updated_at": "2022-09-23T09:31:24.724917Z",
      "removed_at": "2022-09-23T09:31:24.724917Z",
      "completed_at": "2022-09-23T09:31:24.917482Z",
      "domain_id": 78,
      "s3_resource_id": 12,
      "vod_id": 12,
      "subject_id": "0478584f-f12b-45c3-e7170d24dbb6",
      "percentage": "66",
      "partner_name": "cdn"
    }
  ]
}

restart_task
Task

Restart the task.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.id string Task ID in UUID.
Result
Name Type Constraints Description
result object Task information.
result.id string Task ID in UUID.
result.task_type string Task type.
result.priority integer Task priority.
result.args json Task arguments.
result.groups array Task groups.
result.owner_id integer ID of the task owner.
result.external_user_id integer External user ID.
result.result json Result params.
result.start_stage integer Start stage of task.
result.stage integer Current stage of task.
result.stage_name string The name of current stage.
result.tries_count integer Tries count of current stage.
result.max_tries integer Max tries of current stage.
result.status string Task status.
result.store json Task store.
result.info json Task info.
result.logs array Task logs in json format.
result.logs[] json
result.created_at string Task creating time.
result.updated_at string Task updating time.
result.removed_at string Task removing time.
result.completed_at string Task completion time.
result.domain_id integer Domain ID, if the task is performed with a domain or null.
result.s3_resource_id integer S3 resource ID, if the task is performed with a S3 resource or null.
result.vod_id integer VOD ID, if the task is performed with a VOD object or null.
result.subject_id string Additional ID for user identification.
result.percentage integer Percentage of task completion
result.partner_name string Partner name.
Errors
Code Message Description
-31800 Task not found The Task with this ID not found.
-31803 Task is locked Any actions with this task are prohibited.
-31805 Task ID is required id field is required.
-31806 Task ID is not valid: UUID expected id is not valid: UUID expected.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "restart_task",
  "params": {
    "id": "0478584f-f1a4-4c64-80c8-e7170d24dbb6"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "0478584f-f1a4-4c64-80c8-e7170d24dbb6",
    "task_type": "ENABLE_CDN",
    "priority": 5,
    "args": {
      "domain_id": 78,
      "headers_info": {
        "SUBJECT-ID": "1111",
        "PARTNER-NAME": "partner_name"
      }
    },
    "owner_id": 1,
    "external_user_id": 13,
    "result": {},
    "start_stage": 1,
    "stage": 2,
    "stage_name": "issue_ssl_cert",
    "tries_count": 0,
    "max_tries": 1,
    "status": "COMPLETED",
    "store": {},
    "info": {},
    "logs": [
      {
        "failed": "1663928018.002775 - Domain mail.ru not on ITGlobals NS"
      }
    ],
    "created_at": "2022-09-23T09:31:24.724889Z",
    "updated_at": "2022-09-23T09:31:24.724917Z",
    "removed_at": "2022-09-23T09:31:24.724917Z",
    "completed_at": "2022-09-23T09:31:24.917482Z",
    "domain_id": 78,
    "s3_resource_id": 12,
    "vod_id": 12,
    "subject_id": "0478584f-f12b-45c3-e7170d24dbb6",
    "percentage": "66",
    "partner_name": "cdn"
  }
}

cancel_task
Task

Cancel the task.

If task status is IN_PROGRESS, then it changes the status to CANCELLING.
Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.id string Task ID in UUID.
Result
Name Type Constraints Description
result object Task information.
result.id string Task ID in UUID.
result.task_type string Task type.
result.priority integer Task priority.
result.args json Task arguments.
result.groups array Task groups.
result.owner_id integer ID of the task owner.
result.external_user_id integer External user ID.
result.result json Result params.
result.start_stage integer Start stage of task.
result.stage integer Current stage of task.
result.stage_name string The name of current stage.
result.tries_count integer Tries count of current stage.
result.max_tries integer Max tries of current stage.
result.status string Task status.
result.store json Task store.
result.info json Task info.
result.logs array Task logs in json format.
result.logs[] json
result.created_at string Task creating time.
result.updated_at string Task updating time.
result.removed_at string Task removing time.
result.completed_at string Task completion time.
result.domain_id integer Domain ID, if the task is performed with a domain or null.
result.s3_resource_id integer S3 resource ID, if the task is performed with a S3 resource or null.
result.vod_id integer VOD ID, if the task is performed with a VOD object or null.
result.subject_id string Additional ID for user identification.
result.percentage integer Percentage of task completion
result.partner_name string Partner name.
Errors
Code Message Description
-31800 Task not found The Task with this ID not found.
-31803 Task is locked Any actions with this task are prohibited.
-31805 Task ID is required id field is required.
-31806 Task ID is not valid: UUID expected id is not valid: UUID expected.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "cancel_task",
  "params": {
    "id": "0478584f-f1a4-4c64-80c8-e7170d24dbb6"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "0478584f-f1a4-4c64-80c8-e7170d24dbb6",
    "task_type": "ENABLE_CDN",
    "priority": 5,
    "args": {
      "domain_id": 78,
      "headers_info": {
        "SUBJECT-ID": "1111",
        "PARTNER-NAME": "partner_name"
      }
    },
    "owner_id": 1,
    "external_user_id": 13,
    "result": {},
    "start_stage": 1,
    "stage": 2,
    "stage_name": "issue_ssl_cert",
    "tries_count": 0,
    "max_tries": 1,
    "status": "COMPLETED",
    "store": {},
    "info": {},
    "logs": [
      {
        "failed": "1663928018.002775 - Domain mail.ru not on ITGlobals NS"
      }
    ],
    "created_at": "2022-09-23T09:31:24.724889Z",
    "updated_at": "2022-09-23T09:31:24.724917Z",
    "removed_at": "2022-09-23T09:31:24.724917Z",
    "completed_at": "2022-09-23T09:31:24.917482Z",
    "domain_id": 78,
    "s3_resource_id": 12,
    "vod_id": 12,
    "subject_id": "0478584f-f12b-45c3-e7170d24dbb6",
    "percentage": "66",
    "partner_name": "cdn"
  }
}

get_vhost
Vhost

Get vhost by ID.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.id integer Vhost ID.
Result
Name Type Constraints Description
result object
result.name string Vhost name.
result.external_user_id integer External user ID.
result.secret_key string Secret key for SignedPolicy.
Errors
Code Message Description
-31845 Vhost not found Vhost with this ID was not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_vhost",
  "params": {
    "id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "name": "vhost1",
    "external_user_id": 1,
    "secret_key": "HolOOVnh6dK2XLdc4y85bA"
  }
}

create_vhost
Vhost

Run the task of creating a vhost.

Authorization is required.
Task type: CREATE_VHOST


Parameters
Name Type Constraints Description
params object
params.external_user_id integer External user ID.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31556 External user ID must be an integer external_user_id field must be an integer.
-31557 External user ID must be greater then 0 external_user_id field must be greater then 0.
-31801 Task already exists Task with this id already exists.
-31845 Vhost already exists Vhost for this external_user_id already exists.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "create_vhost",
  "params": {
    "external_user_id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

delete_vhost
Vhost

Run the vhost deletion task.

Authorization is required. Owner only.
Task type: DELETE_VHOST


Parameters
Name Type Constraints Description
params object
params.id integer Vhost ID.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this vhost is already running.
-31845 Vhost not found Vhost with this ID was not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "delete_vhost",
  "params": {
    "id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

get_stream
Stream

Get stream by ID.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.id integer Stream ID.
Result
Name Type Constraints Description
result object Stream information.
result.id integer Stream ID.
result.name string Stream name. ASCII only.
result.status string Stream activity status.
result.vhost_id integer minLength="1" Vhost ID.
result.is_active boolean Is the stream enabled.
result.enable_dump boolean Is stream dump enabled.
result.partner_name string Partner name.
result.provider_urls array List of provider urls.
result.provider_urls[] object Provider url object.
result.provider_urls[].url string Provider url
result.provider_urls[].url_expire datetime The time the URL expires in '%Y-%M-%dT%H:%m:%S%z' format. Required.
result.provider_urls[].url_activate datetime The time the URL activates in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result.provider_urls[].stream_expire datetime The time the Stream expires in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result.provider_urls[].allow_ip string Allowed IP address range. IPv4 CIDR. Optional
result.publisher_urls array List of publisher urls.
result.publisher_urls[] object Publisher url object.
result.publisher_urls[].url string Publisher url
result.publisher_urls[].url_expire datetime The time the URL expires in '%Y-%M-%dT%H:%m:%S%z' format. Required.
result.publisher_urls[].url_activate datetime The time the URL activates in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result.publisher_urls[].stream_expire datetime The time the Stream expires in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result.publisher_urls[].allow_ip string Allowed IP address range. IPv4 CIDR. Optional
result.playlists array Playlists information.
result.playlists[] object Playlist information.
result.playlists[].id integer Playlist ID.
result.playlists[].name string Playlist name. ASCII only.
result.playlists[].filename string Playlist filename. ASCII only.
result.playlists[].webrtc_auto_abr boolean Enable Adaptive Bitrates Streaming.
result.playlists[].renditions array List of publisher urls.
result.playlists[].renditions[] object Rendition information.
result.playlists[].renditions[].name string Rendition name. ASCII only.
result.playlists[].renditions[].audio object Audio encoder information.
result.playlists[].renditions[].audio.name string Audio encoder name.
result.playlists[].renditions[].audio.codec string Audio codec.
result.playlists[].renditions[].audio.bitrate integer Bitrate value
result.playlists[].renditions[].audio.samplerate integer Samplerate value.
result.playlists[].renditions[].audio.channel integer Number of channels.
result.playlists[].renditions[].audio.bypass boolean Bypass
result.playlists[].renditions[].video object Video encoder information.
result.playlists[].renditions[].video.name string Video encoder name.
result.playlists[].renditions[].video.codec string Video codec.
result.playlists[].renditions[].video.bitrate integer Bitrate value
result.playlists[].renditions[].video.framerate integer Framerate value.
result.playlists[].renditions[].video.width integer Width value.
result.playlists[].renditions[].video.height integer Height value.
result.playlists[].renditions[].video.preset integer Preset value.
result.playlists[].renditions[].video.bypass boolean Bypass
Errors
Code Message Description
-31839 Stream not found. Stream with this ID was not found.
-31841 Stream ID is required The "id" field is required.
-31842 Stream ID must be an integer The "id" field must be an integer.
-31843 Stream ID must be greater then 0 The "id" field must be greater then 0.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_stream",
  "params": {
    "id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 13,
    "name": "mystream",
    "status": "OK / DISABLED / BLOCKED",
    "vhost_id": 13,
    "is_active": true,
    "enable_dump": false,
    "partner_name": "cdn",
    "provider_urls": [
      {
        "url": "rtmp://vhost.stream.example.com:1935/app_namepolicy=QWerTYuDFGhJ&signature=CVBnmJHGHjJT",
        "url_expire": "2023-12-21 18:00:00+0300",
        "url_activate": "2023-12-12 18:00:00+0300",
        "stream_expire": "2023-12-21 18:00:00+0300",
        "allow_ip": "192.168.0.0/24"
      }
    ],
    "publisher_urls": [
      {
        "url": "https://vhost.stream.example.com:443/app_name/stream_name/playlist.m3u8policy=QWerTYuDFGhJ&signature=CVBnmJHGHjJT",
        "url_expire": "2023-12-21 18:00:00+0300",
        "url_activate": "2023-12-12 18:00:00+0300",
        "stream_expire": "2023-12-21 18:00:00+0300",
        "allow_ip": "192.168.0.0/24"
      }
    ],
    "playlists": [
      {
        "id": 1,
        "name": "example_playlist",
        "filename": "example_playlist.pls",
        "webrtc_auto_abr": true,
        "renditions": [
          {
            "name": "example_rendition",
            "audio": {
              "name": "example_audio",
              "codec": "AAC",
              "bitrate": 128,
              "samplerate": 1,
              "channel": 1,
              "bypass": true
            },
            "video": {
              "name": "example_video",
              "codec": "H.264",
              "bitrate": 128,
              "framerate": 25,
              "width": 1920,
              "height": 1080,
              "preset": 1,
              "bypass": true
            }
          }
        ]
      }
    ]
  }
}

get_streams
Stream

Get streams.

Authorization is required.


Parameters
Name Type Constraints Description
params object
params.vhost_id integer minLength="1" Vhost ID. Optional.
params.partner_name string Partner name. Optional.
params.statuses array List of statuses by which you need to filter streams. Optional.
params.statuses[] string Stream status.
params.stream_name_eq string Filter by exact match of the stream name. Optional.
params.stream_name_lk string Filter by match of the stream name. Optional.
Result
Name Type Constraints Description
result array List of streams.
result[] object Stream information.
result[].id integer Stream ID.
result[].name string Stream name. ASCII only.
result[].status string Stream activity status.
result[].vhost_id integer minLength="1" Vhost ID.
result[].is_active boolean Is the stream enabled.
result[].enable_dump boolean Is stream dump enabled.
result[].partner_name string Partner name.
result[].provider_urls array List of provider urls.
result[].provider_urls[] object Provider url object.
result[].provider_urls[].url string Provider url
result[].provider_urls[].url_expire datetime The time the URL expires in '%Y-%M-%dT%H:%m:%S%z' format. Required.
result[].provider_urls[].url_activate datetime The time the URL activates in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result[].provider_urls[].stream_expire datetime The time the Stream expires in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result[].provider_urls[].allow_ip string Allowed IP address range. IPv4 CIDR. Optional
result[].publisher_urls array List of publisher urls.
result[].publisher_urls[] object Publisher url object.
result[].publisher_urls[].url string Publisher url
result[].publisher_urls[].url_expire datetime The time the URL expires in '%Y-%M-%dT%H:%m:%S%z' format. Required.
result[].publisher_urls[].url_activate datetime The time the URL activates in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result[].publisher_urls[].stream_expire datetime The time the Stream expires in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result[].publisher_urls[].allow_ip string Allowed IP address range. IPv4 CIDR. Optional
result[].playlists array Playlists information.
result[].playlists[] object Playlist information.
result[].playlists[].id integer Playlist ID.
result[].playlists[].name string Playlist name. ASCII only.
result[].playlists[].filename string Playlist filename. ASCII only.
result[].playlists[].webrtc_auto_abr boolean Enable Adaptive Bitrates Streaming.
result[].playlists[].renditions array List of publisher urls.
result[].playlists[].renditions[] object Rendition information.
result[].playlists[].renditions[].name string Rendition name. ASCII only.
result[].playlists[].renditions[].audio object Audio encoder information.
result[].playlists[].renditions[].audio.name string Audio encoder name.
result[].playlists[].renditions[].audio.codec string Audio codec.
result[].playlists[].renditions[].audio.bitrate integer Bitrate value
result[].playlists[].renditions[].audio.samplerate integer Samplerate value.
result[].playlists[].renditions[].audio.channel integer Number of channels.
result[].playlists[].renditions[].audio.bypass boolean Bypass
result[].playlists[].renditions[].video object Video encoder information.
result[].playlists[].renditions[].video.name string Video encoder name.
result[].playlists[].renditions[].video.codec string Video codec.
result[].playlists[].renditions[].video.bitrate integer Bitrate value
result[].playlists[].renditions[].video.framerate integer Framerate value.
result[].playlists[].renditions[].video.width integer Width value.
result[].playlists[].renditions[].video.height integer Height value.
result[].playlists[].renditions[].video.preset integer Preset value.
result[].playlists[].renditions[].video.bypass boolean Bypass
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_streams",
  "params": {
    "vhost_id": 1,
    "partner_name": "cdn",
    "statuses": [
      "OK",
      "DISABLED"
    ],
    "stream_name_eq": "mystream_1",
    "stream_name_lk": "stream"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "id": 13,
      "name": "mystream",
      "status": "OK / DISABLED / BLOCKED",
      "vhost_id": 13,
      "is_active": true,
      "enable_dump": false,
      "partner_name": "cdn",
      "provider_urls": [
        {
          "url": "rtmp://vhost.stream.example.com:1935/app_namepolicy=QWerTYuDFGhJ&signature=CVBnmJHGHjJT",
          "url_expire": "2023-12-21 18:00:00+0300",
          "url_activate": "2023-12-12 18:00:00+0300",
          "stream_expire": "2023-12-21 18:00:00+0300",
          "allow_ip": "192.168.0.0/24"
        }
      ],
      "publisher_urls": [
        {
          "url": "https://vhost.stream.example.com:443/app_name/stream_name/playlist.m3u8policy=QWerTYuDFGhJ&signature=CVBnmJHGHjJT",
          "url_expire": "2023-12-21 18:00:00+0300",
          "url_activate": "2023-12-12 18:00:00+0300",
          "stream_expire": "2023-12-21 18:00:00+0300",
          "allow_ip": "192.168.0.0/24"
        }
      ],
      "playlists": [
        {
          "id": 1,
          "name": "example_playlist",
          "filename": "example_playlist.pls",
          "webrtc_auto_abr": true,
          "renditions": [
            {
              "name": "example_rendition",
              "audio": {
                "name": "example_audio",
                "codec": "AAC",
                "bitrate": 128,
                "samplerate": 1,
                "channel": 1,
                "bypass": true
              },
              "video": {
                "name": "example_video",
                "codec": "H.264",
                "bitrate": 128,
                "framerate": 25,
                "width": 1920,
                "height": 1080,
                "preset": 1,
                "bypass": true
              }
            }
          ]
        }
      ]
    }
  ]
}

create_stream
Stream

Create a stream.

Authorization is required.


Parameters
Name Type Constraints Description
params object Stream information.
params.name string minLength="2", maxLength="32" Stream name. Stream names must be between 2 (min) and 32 (max) characters long. Stream names can consist only of letters, numbers, underscores (_), and hyphens (-).
params.vhost_id integer minLength="1" Vhost ID.
params.enable_dump boolean Is stream dump enabled.
params.playlists array Playlists.
params.playlists[] object Playlist object.
params.playlists[].name string Playlist name
Result
Name Type Constraints Description
result object Stream information.
result.id integer Stream ID.
result.name string Stream name. ASCII only.
result.status string Stream activity status.
result.vhost_id integer minLength="1" Vhost ID.
result.is_active boolean Is the stream enabled.
result.enable_dump boolean Is stream dump enabled.
result.partner_name string Partner name.
result.provider_urls array List of provider urls.
result.provider_urls[] object Provider url object.
result.provider_urls[].url string Provider url
result.provider_urls[].url_expire datetime The time the URL expires in '%Y-%M-%dT%H:%m:%S%z' format. Required.
result.provider_urls[].url_activate datetime The time the URL activates in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result.provider_urls[].stream_expire datetime The time the Stream expires in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result.provider_urls[].allow_ip string Allowed IP address range. IPv4 CIDR. Optional
result.publisher_urls array List of publisher urls.
result.publisher_urls[] object Publisher url object.
result.publisher_urls[].url string Publisher url
result.publisher_urls[].url_expire datetime The time the URL expires in '%Y-%M-%dT%H:%m:%S%z' format. Required.
result.publisher_urls[].url_activate datetime The time the URL activates in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result.publisher_urls[].stream_expire datetime The time the Stream expires in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result.publisher_urls[].allow_ip string Allowed IP address range. IPv4 CIDR. Optional
result.playlists array Playlists information.
result.playlists[] object Playlist information.
result.playlists[].id integer Playlist ID.
result.playlists[].name string Playlist name. ASCII only.
result.playlists[].filename string Playlist filename. ASCII only.
result.playlists[].webrtc_auto_abr boolean Enable Adaptive Bitrates Streaming.
result.playlists[].renditions array List of publisher urls.
result.playlists[].renditions[] object Rendition information.
result.playlists[].renditions[].name string Rendition name. ASCII only.
result.playlists[].renditions[].audio object Audio encoder information.
result.playlists[].renditions[].audio.name string Audio encoder name.
result.playlists[].renditions[].audio.codec string Audio codec.
result.playlists[].renditions[].audio.bitrate integer Bitrate value
result.playlists[].renditions[].audio.samplerate integer Samplerate value.
result.playlists[].renditions[].audio.channel integer Number of channels.
result.playlists[].renditions[].audio.bypass boolean Bypass
result.playlists[].renditions[].video object Video encoder information.
result.playlists[].renditions[].video.name string Video encoder name.
result.playlists[].renditions[].video.codec string Video codec.
result.playlists[].renditions[].video.bitrate integer Bitrate value
result.playlists[].renditions[].video.framerate integer Framerate value.
result.playlists[].renditions[].video.width integer Width value.
result.playlists[].renditions[].video.height integer Height value.
result.playlists[].renditions[].video.preset integer Preset value.
result.playlists[].renditions[].video.bypass boolean Bypass
Errors
Code Message Description
-31830 Stream already exists. A stream with that name already exists.
-31831 Stream name is too long, max length: 32. Stream name is too long, max length: 32.
-31832 Stream name is required. Stream name is required.
-31835 Playlist not found. No playlist with the specified name was found.
-31836 Playlist name is required. The "name" field is required for the "playlists" parameter.
-31837 Stream name is too short, min length: 2. Stream name is too short, min length: 2.
-31846 Invalid stream name Stream name can consist only of letters, numbers, underscores (_), and hyphens (-).
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "create_stream",
  "params": {
    "name": "mystream",
    "vhost_id": 13,
    "enable_dump": false,
    "playlists": [
      {
        "name": "playlist_1"
      }
    ]
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 13,
    "name": "mystream",
    "status": "OK / DISABLED / BLOCKED",
    "vhost_id": 13,
    "is_active": true,
    "enable_dump": false,
    "partner_name": "cdn",
    "provider_urls": [
      {
        "url": "rtmp://vhost.stream.example.com:1935/app_namepolicy=QWerTYuDFGhJ&signature=CVBnmJHGHjJT",
        "url_expire": "2023-12-21 18:00:00+0300",
        "url_activate": "2023-12-12 18:00:00+0300",
        "stream_expire": "2023-12-21 18:00:00+0300",
        "allow_ip": "192.168.0.0/24"
      }
    ],
    "publisher_urls": [
      {
        "url": "https://vhost.stream.example.com:443/app_name/stream_name/playlist.m3u8policy=QWerTYuDFGhJ&signature=CVBnmJHGHjJT",
        "url_expire": "2023-12-21 18:00:00+0300",
        "url_activate": "2023-12-12 18:00:00+0300",
        "stream_expire": "2023-12-21 18:00:00+0300",
        "allow_ip": "192.168.0.0/24"
      }
    ],
    "playlists": [
      {
        "id": 1,
        "name": "example_playlist",
        "filename": "example_playlist.pls",
        "webrtc_auto_abr": true,
        "renditions": [
          {
            "name": "example_rendition",
            "audio": {
              "name": "example_audio",
              "codec": "AAC",
              "bitrate": 128,
              "samplerate": 1,
              "channel": 1,
              "bypass": true
            },
            "video": {
              "name": "example_video",
              "codec": "H.264",
              "bitrate": 128,
              "framerate": 25,
              "width": 1920,
              "height": 1080,
              "preset": 1,
              "bypass": true
            }
          }
        ]
      }
    ]
  }
}

update_stream
Stream

Run the stream update task.

Authorization is required. Owner only.
Task type: UPDATE_STREAM


Parameters
Name Type Constraints Description
params object Stream information.
params.stream_id integer Stream ID.
params.name string minLength="2", maxLength="32" Stream name. Stream names must be between 2 (min) and 32 (max) characters long. Stream names can consist only of letters, numbers, underscores (_), and hyphens (-).
params.enable_dump boolean Is stream dump enabled.
params.playlists array Playlists.
params.playlists[] object Playlist object.
params.playlists[].name string Playlist name
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this stream is already running.
-31839 Stream not found. Stream with this ID was not found.
-31841 Stream ID is required The "stream_id" field is required.
-31842 Stream ID must be an integer The "stream_id" field must be an integer.
-31843 Stream ID must be greater then 0 The "stream_id" field must be greater then 0.
-31830 Stream already exists. A stream with that name already exists.
-31831 Stream name is too long, max length: 32. Stream name is too long, max length: 32.
-31832 Stream name is required. Stream name is required.
-31835 Playlist not found. No playlist with the specified name was found.
-31836 Playlist name is required. The "name" field is required for the "playlists" parameter.
-31837 Stream name is too short, min length: 2. Stream name is too short, min length: 2.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "update_stream",
  "params": {
    "stream_id": 13,
    "name": "mystream",
    "enable_dump": false,
    "playlists": [
      {
        "name": "playlist_1"
      }
    ]
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

delete_stream
Stream

Run the stream deletion task.

Authorization is required. Owner only.
Task type: DELETE_STREAM


Parameters
Name Type Constraints Description
params object
params.stream_id integer Stream ID.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this stream is already running.
-31839 Stream not found. Stream with this ID was not found.
-31841 Stream ID is required The "stream_id" field is required.
-31842 Stream ID must be an integer The "stream_id" field must be an integer.
-31843 Stream ID must be greater then 0 The "stream_id" field must be greater then 0.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "delete_stream",
  "params": {
    "stream_id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

enable_stream
Stream

Run the stream activation task.

Authorization is required. Owner only.
Task type: ENABLE_STREAM


Parameters
Name Type Constraints Description
params object
params.stream_id integer Stream ID.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this stream is already running.
-31839 Stream not found. Stream with this ID was not found.
-31840 Stream already enabled. Stream with this ID already enabled.
-31841 Stream ID is required The "stream_id" field is required.
-31842 Stream ID must be an integer The "stream_id" field must be an integer.
-31843 Stream ID must be greater then 0 The "stream_id" field must be greater then 0.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "enable_stream",
  "params": {
    "stream_id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

disable_stream
Stream

Run the stream deactivation task.

Authorization is required. Owner only.
Task type: DISABLE_STREAM


Parameters
Name Type Constraints Description
params object
params.stream_id integer Stream ID.
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this stream is already running.
-31839 Stream not found. Stream with this ID was not found.
-31844 Stream already disabled. Stream with this ID already disabled.
-31841 Stream ID is required The "stream_id" field is required.
-31842 Stream ID must be an integer The "stream_id" field must be an integer.
-31843 Stream ID must be greater then 0 The "stream_id" field must be greater then 0.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "disable_stream",
  "params": {
    "stream_id": 13
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

sign_provider_urls
Stream

Sign provider urls.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.stream_id integer Stream ID.
params.url_expire datetime The time the URL expires in '%Y-%M-%dT%H:%m:%S%z' format. Required.
params.url_activate datetime The time the URL activates in '%Y-%M-%dT%H:%m:%S%z' format. Optional
params.stream_expire datetime The time the Stream expires in '%Y-%M-%dT%H:%m:%S%z' format. Optional
params.allow_ip string Allowed IP address range. IPv4 CIDR. Optional
Result
Name Type Constraints Description
result array List of provider urls.
result[] object Provider url object.
result[].url string Provider url
result[].url_expire datetime The time the URL expires in '%Y-%M-%dT%H:%m:%S%z' format. Required.
result[].url_activate datetime The time the URL activates in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result[].stream_expire datetime The time the Stream expires in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result[].allow_ip string Allowed IP address range. IPv4 CIDR. Optional
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "sign_provider_urls",
  "params": {
    "stream_id": 1,
    "url_expire": "2023-12-21 18:00:00+0300",
    "url_activate": "2023-12-21 18:00:00+0300",
    "stream_expire": "2023-12-21 18:00:00+0300",
    "allow_ip": "192.168.0.0/24"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "url": "rtmp://vhost.stream.example.com:1935/app_namepolicy=QWerTYuDFGhJ&signature=CVBnmJHGHjJT",
      "url_expire": "2023-12-21 18:00:00+0300",
      "url_activate": "2023-12-12 18:00:00+0300",
      "stream_expire": "2023-12-21 18:00:00+0300",
      "allow_ip": "192.168.0.0/24"
    }
  ]
}

sign_publisher_urls
Stream

Sign publisher urls.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.stream_id integer Stream ID.
params.url_expire datetime The time the URL expires in '%Y-%M-%dT%H:%m:%S%z' format. Required.
params.url_activate datetime The time the URL activates in '%Y-%M-%dT%H:%m:%S%z' format. Optional
params.stream_expire datetime The time the Stream expires in '%Y-%M-%dT%H:%m:%S%z' format. Optional
params.allow_ip string Allowed IP address range. IPv4 CIDR. Optional
Result
Name Type Constraints Description
result array List of publisher urls.
result[] object Publisher url object.
result[].url string Publisher url
result[].url_expire datetime The time the URL expires in '%Y-%M-%dT%H:%m:%S%z' format. Required.
result[].url_activate datetime The time the URL activates in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result[].stream_expire datetime The time the Stream expires in '%Y-%M-%dT%H:%m:%S%z' format. Optional
result[].allow_ip string Allowed IP address range. IPv4 CIDR. Optional
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "sign_publisher_urls",
  "params": {
    "stream_id": 1,
    "url_expire": "2023-12-21 18:00:00+0300",
    "url_activate": "2023-12-21 18:00:00+0300",
    "stream_expire": "2023-12-21 18:00:00+0300",
    "allow_ip": "192.168.0.0/24"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "url": "https://vhost.stream.example.com:443/app_name/stream_name/playlist.m3u8policy=QWerTYuDFGhJ&signature=CVBnmJHGHjJT",
      "url_expire": "2023-12-21 18:00:00+0300",
      "url_activate": "2023-12-12 18:00:00+0300",
      "stream_expire": "2023-12-21 18:00:00+0300",
      "allow_ip": "192.168.0.0/24"
    }
  ]
}

get_playlist
Playlist

Get playlist by ID.

Authorization is required.


Parameters
Name Type Constraints Description
params object
params.id integer Playlist ID.
Result
Name Type Constraints Description
result object Playlist information.
result.id integer Playlist ID.
result.name string Playlist name. ASCII only.
result.filename string Playlist filename. ASCII only.
result.webrtc_auto_abr boolean Enable Adaptive Bitrates Streaming.
result.renditions array List of publisher urls.
result.renditions[] object Rendition information.
result.renditions[].name string Rendition name. ASCII only.
result.renditions[].audio object Audio encoder information.
result.renditions[].audio.name string Audio encoder name.
result.renditions[].audio.codec string Audio codec.
result.renditions[].audio.bitrate integer Bitrate value
result.renditions[].audio.samplerate integer Samplerate value.
result.renditions[].audio.channel integer Number of channels.
result.renditions[].audio.bypass boolean Bypass
result.renditions[].video object Video encoder information.
result.renditions[].video.name string Video encoder name.
result.renditions[].video.codec string Video codec.
result.renditions[].video.bitrate integer Bitrate value
result.renditions[].video.framerate integer Framerate value.
result.renditions[].video.width integer Width value.
result.renditions[].video.height integer Height value.
result.renditions[].video.preset integer Preset value.
result.renditions[].video.bypass boolean Bypass
Errors
Code Message Description
-31835 Playlist not found. Playlist with this ID was not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_playlist",
  "params": {
    "id": 1
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 1,
    "name": "example_playlist",
    "filename": "example_playlist.pls",
    "webrtc_auto_abr": true,
    "renditions": [
      {
        "name": "example_rendition",
        "audio": {
          "name": "example_audio",
          "codec": "AAC",
          "bitrate": 128,
          "samplerate": 1,
          "channel": 1,
          "bypass": true
        },
        "video": {
          "name": "example_video",
          "codec": "H.264",
          "bitrate": 128,
          "framerate": 25,
          "width": 1920,
          "height": 1080,
          "preset": 1,
          "bypass": true
        }
      }
    ]
  }
}

get_playlists
Playlist

Get playlists.

Authorization is required.


Result
Name Type Constraints Description
result array Playlists.
result[] object Playlist information.
result[].id integer Playlist ID.
result[].name string Playlist name. ASCII only.
result[].filename string Playlist filename. ASCII only.
result[].webrtc_auto_abr boolean Enable Adaptive Bitrates Streaming.
result[].renditions array List of publisher urls.
result[].renditions[] object Rendition information.
result[].renditions[].name string Rendition name. ASCII only.
result[].renditions[].audio object Audio encoder information.
result[].renditions[].audio.name string Audio encoder name.
result[].renditions[].audio.codec string Audio codec.
result[].renditions[].audio.bitrate integer Bitrate value
result[].renditions[].audio.samplerate integer Samplerate value.
result[].renditions[].audio.channel integer Number of channels.
result[].renditions[].audio.bypass boolean Bypass
result[].renditions[].video object Video encoder information.
result[].renditions[].video.name string Video encoder name.
result[].renditions[].video.codec string Video codec.
result[].renditions[].video.bitrate integer Bitrate value
result[].renditions[].video.framerate integer Framerate value.
result[].renditions[].video.width integer Width value.
result[].renditions[].video.height integer Height value.
result[].renditions[].video.preset integer Preset value.
result[].renditions[].video.bypass boolean Bypass
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_playlists"
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "id": 1,
      "name": "example_playlist",
      "filename": "example_playlist.pls",
      "webrtc_auto_abr": true,
      "renditions": [
        {
          "name": "example_rendition",
          "audio": {
            "name": "example_audio",
            "codec": "AAC",
            "bitrate": 128,
            "samplerate": 1,
            "channel": 1,
            "bypass": true
          },
          "video": {
            "name": "example_video",
            "codec": "H.264",
            "bitrate": 128,
            "framerate": 25,
            "width": 1920,
            "height": 1080,
            "preset": 1,
            "bypass": true
          }
        }
      ]
    }
  ]
}

get_audio_encoder
Audio

Get audio encoder by ID.

Authorization is required.


Parameters
Name Type Constraints Description
params object
params.id integer Audio encoder ID.
Result
Name Type Constraints Description
result object Audio encoder information.
result.name string Audio encoder name.
result.codec string Audio codec.
result.bitrate integer Bitrate value
result.samplerate integer Samplerate value.
result.channel integer Number of channels.
result.bypass boolean Bypass
Errors
Code Message Description
-31845 Audio encoder not found. Audio encoder with this ID was not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_audio_encoder",
  "params": {
    "id": 1
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "name": "example_audio",
    "codec": "AAC",
    "bitrate": 128,
    "samplerate": 1,
    "channel": 1,
    "bypass": true
  }
}

get_audio_encoders
Audio

Get audio encoders.

Authorization is required.


Result
Name Type Constraints Description
result array Audio encoders.
result[] object Audio encoder information.
result[].name string Audio encoder name.
result[].codec string Audio codec.
result[].bitrate integer Bitrate value
result[].samplerate integer Samplerate value.
result[].channel integer Number of channels.
result[].bypass boolean Bypass
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_audio_encoders"
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "name": "example_audio",
      "codec": "AAC",
      "bitrate": 128,
      "samplerate": 1,
      "channel": 1,
      "bypass": true
    }
  ]
}

get_video_encoder
Video

Get video encoder by ID.

Authorization is required.


Parameters
Name Type Constraints Description
params object
params.id integer Video encoder ID.
Result
Name Type Constraints Description
result object Video encoder information.
result.name string Video encoder name.
result.codec string Video codec.
result.bitrate integer Bitrate value
result.framerate integer Framerate value.
result.width integer Width value.
result.height integer Height value.
result.preset integer Preset value.
result.bypass boolean Bypass
Errors
Code Message Description
-31846 Video encoder not found. Video encoder with this ID was not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_video_encoder",
  "params": {
    "id": 1
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "name": "example_video",
    "codec": "H.264",
    "bitrate": 128,
    "framerate": 25,
    "width": 1920,
    "height": 1080,
    "preset": 1,
    "bypass": true
  }
}

get_video_encoders
Video

Get video encoders.

Authorization is required.


Result
Name Type Constraints Description
result array Video encoders.
result[] object Video encoder information.
result[].name string Video encoder name.
result[].codec string Video codec.
result[].bitrate integer Bitrate value
result[].framerate integer Framerate value.
result[].width integer Width value.
result[].height integer Height value.
result[].preset integer Preset value.
result[].bypass boolean Bypass
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_video_encoders"
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "name": "example_video",
      "codec": "H.264",
      "bitrate": 128,
      "framerate": 25,
      "width": 1920,
      "height": 1080,
      "preset": 1,
      "bypass": true
    }
  ]
}

get_vod
VOD

Get VOD.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object
params.id integer VOD ID
Result
Name Type Constraints Description
result object VOD information
result.id integer VOD ID
result.vod_domain string Domain name to access VOD resources
result.is_active boolean Designates whether VOD is enabled
result.source_type string enum="domain,s3_bucket" Type of source type. Choices are "domain" and "s3_bucket"
result.source_id integer Source ID
Errors
Code Message Description
-31906 VOD with specified ID not found VOD with specified ID not found
-31907 VOD ID parameter is required VOD ID parameter is required
-31908 VOD ID must be a positive integer VOD ID must be a positive integer
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_vod",
  "params": {
    "id": 29
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 29,
    "vod_domain": "vs42.vod-clients.arviol.com",
    "is_active": true,
    "source_type": "domain",
    "source_id": 42
  }
}

get_vods
VOD

Get VOD list.

Authorization is required.


Parameters
Name Type Constraints Description
params object
params.source_type string enum="domain,s3_bucket" Type of source type. Choices are "domain" and "s3_bucket"
params.source_id integer ID of source object (domain or s3_bucket)
Result
Name Type Constraints Description
result array
result[] object VOD information
result[].id integer VOD ID
result[].vod_domain string Domain name to access VOD resources
result[].is_active boolean Designates whether VOD is enabled
result[].source_type string enum="domain,s3_bucket" Type of source type. Choices are "domain" and "s3_bucket"
result[].source_id integer Source ID
Errors
Code Message Description
-31901 Source type is invalid Source type is invalid
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_vods",
  "params": {
    "source_type": "domain",
    "source_id": "123"
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "id": 29,
      "vod_domain": "vs42.vod-clients.arviol.com",
      "is_active": true,
      "source_type": "domain",
      "source_id": 42
    }
  ]
}

create_vod
VOD

Create VOD.

Authorization is required.


Parameters
Name Type Constraints Description
params object VOD information
params.source_type string enum="domain,s3_bucket" Type of source type. Choices are "domain" and "s3_bucket"
params.source_id integer Source ID
Result
Name Type Constraints Description
result object VOD information
result.id integer VOD ID
result.vod_domain string Domain name to access VOD resources
result.is_active boolean Designates whether VOD is enabled
result.source_type string enum="domain,s3_bucket" Type of source type. Choices are "domain" and "s3_bucket"
result.source_id integer Source ID
Errors
Code Message Description
-31900 Source type parameter is required Source type parameter is required
-31901 Source type is invalid Source type is invalid
-31902 Source ID parameter is required Source ID parameter is required
-31903 Source ID is invalid Source ID is invalid
-31904 Source with given parameters not found Source with given parameters not found
-31905 Source with given parameters already exists Source with given parameters already exists
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "create_vod",
  "params": {
    "source_type": "domain",
    "source_id": 42
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 29,
    "vod_domain": "vs42.vod-clients.arviol.com",
    "is_active": true,
    "source_type": "domain",
    "source_id": 42
  }
}

delete_vod
VOD

Run the VOD deletion task.

Authorization is required. Owner only.
Task type: DELETE_VOD


Parameters
Name Type Constraints Description
params object
params.id integer VOD ID
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this VOD is already running.
-31906 VOD with specified ID not found VOD with specified ID not found
-31907 VOD ID parameter is required VOD ID parameter is required
-31908 VOD ID must be a positive integer VOD ID must be a positive integer
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "delete_vod",
  "params": {
    "id": 29
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

enable_vod
VOD

Run the VOD activation task.

Authorization is required. Owner only.
Task type: ENABLE_VOD


Parameters
Name Type Constraints Description
params object
params.id integer VOD ID
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this VOD is already running.
-31906 VOD with specified ID not found VOD with specified ID not found
-31907 VOD ID parameter is required VOD ID parameter is required
-31908 VOD ID must be a positive integer VOD ID must be a positive integer
-31909 Specified VOD is already enabled Specified VOD is already enabled
-31911 Source of specified VOD must be enabled Source of specified VOD must be enabled
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "enable_vod",
  "params": {
    "id": 29
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

disable_vod
VOD

Run the VOD deactivation task.

Authorization is required. Owner only.
Task type: DISABLE_VOD


Parameters
Name Type Constraints Description
params object
params.id integer VOD ID
Result
Name Type Constraints Description
result object
result.id string Task id in UUID.
Errors
Code Message Description
-31801 Task already exists Task with this id already exists.
-31802 Task is already running Task for this VOD is already running.
-31906 VOD with specified ID not found VOD with specified ID not found
-31907 VOD ID parameter is required VOD ID parameter is required
-31908 VOD ID must be a positive integer VOD ID must be a positive integer
-31910 Specified VOD is already disabled Specified VOD is already disabled
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "disable_vod",
  "params": {
    "id": 29
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": "bb4dcd80-01a5-4a73-8c2b-62c5027a9b72"
  }
}

get_waf
WAF

Get WAF by ID.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object WAF information.
params.id integer WAF ID.
Result
Name Type Constraints Description
result object WAF information.
result.id integer WAF ID.
result.domain_id integer Domain ID.
result.sec_rule_engine string enum="on,off,detection_only" SecRuleEngine. Choices: "on", "off", "detection_only". Default: "detection_only". Optional.
result.paranoia_level integer minimum="1", maximum="4" Paranoia level. Default: 1. Optional.
result.executing_paranoia_level integer minimum="1", maximum="4" Executing paranoia level. Default: 1. Optional.
result.critical_anomaly_score integer minimum="1", maximum="100000" Critical anomaly score. Default: 5. Optional.
result.error_anomaly_score integer minimum="1", maximum="100000" Error anomaly score. Default: 4. Optional.
result.warning_anomaly_score integer minimum="1", maximum="100000" Warning anomaly score. Default: 3. Optional.
result.notice_anomaly_score integer minimum="1", maximum="100000" Notice anomaly score. Default: 2. Optional.
result.in_score_threshold integer minimum="1", maximum="100000" In score threshold. Default: 5. Optional.
result.out_score_threshold integer minimum="1", maximum="100000" Out score threshold. Default: 4. Optional.
result.sampling_percentage integer minimum="1", maximum="100" Percentage of traffic to run CRS. Default: 100. Optional.
Errors
Code Message Description
-31930 WAF ID is required WAF ID is required.
-31931 WAF ID is invalid WAF ID is invalid.
-31932 WAF not found WAF not found.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_waf",
  "params": {
    "id": 1
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 1,
    "domain_id": 1,
    "sec_rule_engine": "detection_only",
    "paranoia_level": 1,
    "executing_paranoia_level": 1,
    "critical_anomaly_score": 5,
    "error_anomaly_score": 4,
    "warning_anomaly_score": 3,
    "notice_anomaly_score": 2,
    "in_score_threshold": 5,
    "out_score_threshold": 4,
    "sampling_percentage": 100
  }
}

get_wafs
WAF

Get WAFs.

Authorization is required.


Parameters
Name Type Constraints Description
params object Domain information.
params.domain_id integer Domain ID. Optional.
params.external_user_id integer External user ID. Optional.
Result
Name Type Constraints Description
result array
result[] object WAF information.
result[].id integer WAF ID.
result[].domain_id integer Domain ID.
result[].sec_rule_engine string enum="on,off,detection_only" SecRuleEngine. Choices: "on", "off", "detection_only". Default: "detection_only". Optional.
result[].paranoia_level integer minimum="1", maximum="4" Paranoia level. Default: 1. Optional.
result[].executing_paranoia_level integer minimum="1", maximum="4" Executing paranoia level. Default: 1. Optional.
result[].critical_anomaly_score integer minimum="1", maximum="100000" Critical anomaly score. Default: 5. Optional.
result[].error_anomaly_score integer minimum="1", maximum="100000" Error anomaly score. Default: 4. Optional.
result[].warning_anomaly_score integer minimum="1", maximum="100000" Warning anomaly score. Default: 3. Optional.
result[].notice_anomaly_score integer minimum="1", maximum="100000" Notice anomaly score. Default: 2. Optional.
result[].in_score_threshold integer minimum="1", maximum="100000" In score threshold. Default: 5. Optional.
result[].out_score_threshold integer minimum="1", maximum="100000" Out score threshold. Default: 4. Optional.
result[].sampling_percentage integer minimum="1", maximum="100" Percentage of traffic to run CRS. Default: 100. Optional.
Errors
Code Message Description
-31556 External user ID must be an integer external_user_id field must be an integer.
-31557 External user ID must be greater then 0 external_user_id field must be greater than 0.
-31631 Domain ID must be an integer domain_id field must be an integer.
-31632 Domain ID must be greater then 0 domain_id field must be greater than 0.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "get_wafs",
  "params": {
    "domain_id": 1,
    "external_user_id": 1
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": [
    {
      "id": 1,
      "domain_id": 1,
      "sec_rule_engine": "detection_only",
      "paranoia_level": 1,
      "executing_paranoia_level": 1,
      "critical_anomaly_score": 5,
      "error_anomaly_score": 4,
      "warning_anomaly_score": 3,
      "notice_anomaly_score": 2,
      "in_score_threshold": 5,
      "out_score_threshold": 4,
      "sampling_percentage": 100
    }
  ]
}

create_waf
WAF

Create WAF.

Authorization is required.


Parameters
Name Type Constraints Description
params object WAF information.
params.domain_id integer Domain ID.
params.sec_rule_engine string enum="on,off,detection_only" SecRuleEngine. Choices: "on", "off", "detection_only". Default: "detection_only". Optional.
params.paranoia_level integer minimum="1", maximum="4" Paranoia level. Default: 1. Optional.
params.executing_paranoia_level integer minimum="1", maximum="4" Executing paranoia level. Default: 1. Optional.
params.critical_anomaly_score integer minimum="1", maximum="100000" Critical anomaly score. Default: 5. Optional.
params.error_anomaly_score integer minimum="1", maximum="100000" Error anomaly score. Default: 4. Optional.
params.warning_anomaly_score integer minimum="1", maximum="100000" Warning anomaly score. Default: 3. Optional.
params.notice_anomaly_score integer minimum="1", maximum="100000" Notice anomaly score. Default: 2. Optional.
params.in_score_threshold integer minimum="1", maximum="100000" In score threshold. Default: 5. Optional.
params.out_score_threshold integer minimum="1", maximum="100000" Out score threshold. Default: 4. Optional.
params.sampling_percentage integer minimum="1", maximum="100" Percentage of traffic to run CRS. Default: 100. Optional.
Result
Name Type Constraints Description
result object WAF information.
result.id integer WAF ID.
result.domain_id integer Domain ID.
result.sec_rule_engine string enum="on,off,detection_only" SecRuleEngine. Choices: "on", "off", "detection_only". Default: "detection_only". Optional.
result.paranoia_level integer minimum="1", maximum="4" Paranoia level. Default: 1. Optional.
result.executing_paranoia_level integer minimum="1", maximum="4" Executing paranoia level. Default: 1. Optional.
result.critical_anomaly_score integer minimum="1", maximum="100000" Critical anomaly score. Default: 5. Optional.
result.error_anomaly_score integer minimum="1", maximum="100000" Error anomaly score. Default: 4. Optional.
result.warning_anomaly_score integer minimum="1", maximum="100000" Warning anomaly score. Default: 3. Optional.
result.notice_anomaly_score integer minimum="1", maximum="100000" Notice anomaly score. Default: 2. Optional.
result.in_score_threshold integer minimum="1", maximum="100000" In score threshold. Default: 5. Optional.
result.out_score_threshold integer minimum="1", maximum="100000" Out score threshold. Default: 4. Optional.
result.sampling_percentage integer minimum="1", maximum="100" Percentage of traffic to run CRS. Default: 100. Optional.
Errors
Code Message Description
-31920 Sec rule engine value is not a valid choice Sec rule engine value is not a valid choice.
-31921 Paranoia level must be greater than or equal to 1 Paranoia level must be greater than or equal to 1.
-31922 Paranoia level must be less than or equal to 4 Paranoia level must be less than or equal to 4.
-31923 Anomaly score must be greater than or equal to 1 Anomaly score must be greater than or equal to 1.
-31924 Anomaly score must be less than or equal to 100,000 Anomaly score must be less than or equal to 100,000.
-31925 In and out score threshold must be greater than or equal to 1 In and out score threshold must be greater than or equal to 1.
-31926 In and out score threshold must be less than or equal to 100,000 In and out score threshold must be less than or equal to 100,000.
-31927 Sampling percentage must be greater than or equal to 1 Sampling percentage must be greater than or equal to 1.
-31928 Sampling percentage must be greater than or equal to 100 Sampling percentage must be greater than or equal to 100.
-31929 WAF already exists for this domain WAF already exists for this domain.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "create_waf",
  "params": {
    "domain_id": 1,
    "sec_rule_engine": "detection_only",
    "paranoia_level": 1,
    "executing_paranoia_level": 1,
    "critical_anomaly_score": 5,
    "error_anomaly_score": 4,
    "warning_anomaly_score": 3,
    "notice_anomaly_score": 2,
    "in_score_threshold": 5,
    "out_score_threshold": 4,
    "sampling_percentage": 100
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 1,
    "domain_id": 1,
    "sec_rule_engine": "detection_only",
    "paranoia_level": 1,
    "executing_paranoia_level": 1,
    "critical_anomaly_score": 5,
    "error_anomaly_score": 4,
    "warning_anomaly_score": 3,
    "notice_anomaly_score": 2,
    "in_score_threshold": 5,
    "out_score_threshold": 4,
    "sampling_percentage": 100
  }
}

update_waf
WAF

Update WAF.

Authorization is required. Owner only.


Parameters
Name Type Constraints Description
params object WAF information.
params.id integer WAF ID.
params.sec_rule_engine string enum="on,off,detection_only" SecRuleEngine. Choices: "on", "off", "detection_only". Default: "detection_only". Optional.
params.paranoia_level integer minimum="1", maximum="4" Paranoia level. Default: 1. Optional.
params.executing_paranoia_level integer minimum="1", maximum="4" Executing paranoia level. Default: 1. Optional.
params.critical_anomaly_score integer minimum="1", maximum="100000" Critical anomaly score. Default: 5. Optional.
params.error_anomaly_score integer minimum="1", maximum="100000" Error anomaly score. Default: 4. Optional.
params.warning_anomaly_score integer minimum="1", maximum="100000" Warning anomaly score. Default: 3. Optional.
params.notice_anomaly_score integer minimum="1", maximum="100000" Notice anomaly score. Default: 2. Optional.
params.in_score_threshold integer minimum="1", maximum="100000" In score threshold. Default: 5. Optional.
params.out_score_threshold integer minimum="1", maximum="100000" Out score threshold. Default: 4. Optional.
params.sampling_percentage integer minimum="1", maximum="100" Percentage of traffic to run CRS. Default: 100. Optional.
Result
Name Type Constraints Description
result object WAF information.
result.id integer WAF ID.
result.domain_id integer Domain ID.
result.sec_rule_engine string enum="on,off,detection_only" SecRuleEngine. Choices: "on", "off", "detection_only". Default: "detection_only". Optional.
result.paranoia_level integer minimum="1", maximum="4" Paranoia level. Default: 1. Optional.
result.executing_paranoia_level integer minimum="1", maximum="4" Executing paranoia level. Default: 1. Optional.
result.critical_anomaly_score integer minimum="1", maximum="100000" Critical anomaly score. Default: 5. Optional.
result.error_anomaly_score integer minimum="1", maximum="100000" Error anomaly score. Default: 4. Optional.
result.warning_anomaly_score integer minimum="1", maximum="100000" Warning anomaly score. Default: 3. Optional.
result.notice_anomaly_score integer minimum="1", maximum="100000" Notice anomaly score. Default: 2. Optional.
result.in_score_threshold integer minimum="1", maximum="100000" In score threshold. Default: 5. Optional.
result.out_score_threshold integer minimum="1", maximum="100000" Out score threshold. Default: 4. Optional.
result.sampling_percentage integer minimum="1", maximum="100" Percentage of traffic to run CRS. Default: 100. Optional.
Errors
Code Message Description
-31930 WAF ID is required WAF ID is required.
-31931 WAF ID is invalid WAF ID is invalid.
-31932 WAF not found WAF not found.
-31920 Sec rule engine value is not a valid choice Sec rule engine value is not a valid choice.
-31921 Paranoia level must be greater than or equal to 1 Paranoia level must be greater than or equal to 1.
-31922 Paranoia level must be less than or equal to 4 Paranoia level must be less than or equal to 4.
-31923 Anomaly score must be greater than or equal to 1 Anomaly score must be greater than or equal to 1.
-31924 Anomaly score must be less than or equal to 100,000 Anomaly score must be less than or equal to 100,000.
-31925 In and out score threshold must be greater than or equal to 1 In and out score threshold must be greater than or equal to 1.
-31926 In and out score threshold must be less than or equal to 100,000 In and out score threshold must be less than or equal to 100,000.
-31927 Sampling percentage must be greater than or equal to 1 Sampling percentage must be greater than or equal to 1.
-31928 Sampling percentage must be greater than or equal to 100 Sampling percentage must be greater than or equal to 100.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "update_waf",
  "params": {
    "id": 1,
    "sec_rule_engine": "detection_only",
    "paranoia_level": 1,
    "executing_paranoia_level": 1,
    "critical_anomaly_score": 5,
    "error_anomaly_score": 4,
    "warning_anomaly_score": 3,
    "notice_anomaly_score": 2,
    "in_score_threshold": 5,
    "out_score_threshold": 4,
    "sampling_percentage": 100
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "result": {
    "id": 1,
    "domain_id": 1,
    "sec_rule_engine": "detection_only",
    "paranoia_level": 1,
    "executing_paranoia_level": 1,
    "critical_anomaly_score": 5,
    "error_anomaly_score": 4,
    "warning_anomaly_score": 3,
    "notice_anomaly_score": 2,
    "in_score_threshold": 5,
    "out_score_threshold": 4,
    "sampling_percentage": 100
  }
}

delete_waf


Parameters
Name Type Constraints Description
params object WAF information.
params.id integer WAF ID.
Request example
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "delete_waf",
  "params": {
    "id": 1
  }
}
Response example
{
  "jsonrpc": "2.0",
  "id": "1234567890"
}