Skip to content

Getting the list of Nodes

Getting the list of IP addresses/subnets of nodes that can access the origin.

Attention

The list of IP addresses/subnets can change, so we recommend regularly requesting addresses via the API to periodically update the list.

Recommended frequency of requests: 1 time per day.

URL: https://api.cdnvideo.ru/app/nodes/v2/ip2origin/

  • Method: GET
  • Response Data Type: JSON Object

Response Codes and their Meanings:

Status Code Response Data Response Format Description
200 Subnets JSON List of subnets
500 None None Internal Server Error
503 None None Service Unavailable
504 None None Gateway Timeout

Request example

curl 'https://api.cdnvideo.ru/app/nodes/v2/ip2origin/'

Successful response example

{
    "status": "Completed",
    "data": [{"IPv4_subnet": "1.2.3.4/32"}, {"IPv4_subnet": "5.6.7.8/32"}, {"IPv4_subnet": "9.10.11.12/32"}]
}

Getting the list of hosts from which domain content can be distributed to user

URL: https://api.cdnvideo.ru/app/nodes/v2/<your_account_name>/ip2user/?cdn-domain=<cdn-domain>

  • Method: GET
  • Headers: CDN-AUTH-TOKEN
  • Response Data Type: JSON Object

Response Codes and their Meanings:

Status Code Response Data Response Format Description
200 IP addresses JSON Distribution IP address list
422 Error description JSON Validation error
403 Error description JSON Authorization Error
404 Error description JSON Not found
500 None None Internal server error
503 None None Service is unavailable
504 None None Gateway Timeout

Request example

curl -H "CDN-AUTH-TOKEN: $TOKEN" \
  -X GET \
  'https://api.cdnvideo.ru/app/nodes/v2/testaccount/ip2user/?cdn-domain=test.a.trbcdn.net'

Successful response example

{
  "status": "Completed",
  "data": [{"IPv4_address": "0.0.0.0"}, {"IPv4_address": "1.1.1.1"}]
}

Unsuccessful response example

{
    "message": "Validation error",
    "description": "{'query': {'cdn-domain': ['Missing data for required field.']}}",
    "status": "Unprocessable Entity"
}