Web Call Server uses two URLs for REST API
To invoke the REST API, you have to make request using the following format:
- Protocol: HTTP or HTTPS
- Content Type: application/json
- Method: POST
- Body: JSON
By default, server accepts REST HTTP requests on 8081 TCP port and REST HTTPS requests on 8444 TCP port. Those values are defined with the following settings in flashphoner.properties file
Cross-domain request are managed with the following settings in flashphoner.properties file
By default, cross-domain requests from any address are allowed, to make port redirection work.
REST API requests are handled without user authorization by default. HTTP basic authorization may be enabled with the following parameter in flashphoner.properties file if necessary
When authorization is enabled, REST API users are managed from WCS core CLI.
For cross-domain requests, custom headers have to be added using the following parameter in flashphoner.properties file:
Here <origin>is the request source, e.g. http://test.flashphoner.com.
For testing purpose you can use a REST client. I.e. Advanced REST Console for browser Google Chrome.
On the screenshot below you can see how to get list of streams by REST API using REST method /stream/find_all
Since build 5.2.1343 REST API can be displayed and tested according to OpenAPI 3 specification. OpenAPI specification file can be downloaded by URL https://demo.flashphoner.com:8444/rest-api/openapi_spec in YAML format, UI is vailable by URL https://demo.flashphoner.com:8444/rest-api-spec/, where
demo.flashphoner.com is WCS server address
Every REST API query can be explored and tested using Swagger UI
Required fields are marked by
* character on