Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Command

Description

Example result

show cdn-nodes

Displays the list of node servers in CDN:

ACTIVE - the server is running, responds to queries and/or sends notifications

PASSIVE - the server is stopped or unavailable

Code Block
languagebash
themeRDark
IIp                       State        
---------------------------------
edge1.flashphoner.com    ACTIVE   
edge2.flashphoner.com    ACTIVE   
origin2.flashphoner.com  PASSIVE

show cdn-routes

Shows the list of active streams in CDN

Code Block
languagebash
themeRDark
Route                       Stream     
------------------------------------
1-origin2.flashphoner.com-2 stream1
0-origin2.flashphoner.com-0 stream2
2-origin1.flashphoner.com-1 stream1

Using REST API

A REST-query should be HTTP/HTTPS POST request as follows:

  • HTTP: http://test.flashphoner.com:8081/rest-api/cdn/show_routes
  • HTTPS: https://test.flashphoner.com:8444/rest-api/cdn/show_routes

Where:

  • test.flashphoner.com - is the address of the WCS server
  • 8081 - is the standard REST / HTTP port of the WCS server
  • 8444 - is the standard HTTPS port
  • rest-api - is the required part of the URL
  • /cdn/show_routes - REST-method to use

REST queries and response statuses

REST query

REST query example

REST response example

Response states

Description

/cdn/show_routes


Code Block
languagejs
themeRDark
{
 "1-origin2.flashphoner.com-2": "stream1",
 "0-origin2.flashphoner.com-0": "stream2",
 "2-origin1.flashphoner.com-1": "stream1"
}

200 – OK

500 – Internal Server Error

Show active CDN routes

Parameters

Description

Example

Route identifier

1-origin2.flashphoner.com-2

Stream name in CDN

stream1

Removing stopped servers from CDN nodes list

...