REST API v3¶
Since build 5.3.392 the new REST API v3 is available for users.
Warning
REST API v2 is deprecated. All the new methods and features are added to REST API v3 only.
The automatically generated REST API documentation is available on the official Flashphoner web site: REST API v3
Also, the docs are available in Web Call Server admin interface:

Async REST API¶
Some long term operations initiated by REST API queries may be executed asynchronously: reading a watermark picture file, starting a VOD stream, connection to RTSP IP camera and so one. Such REST methods initiate an asynchronous job:
-
If the job completes within the wait time, it returns
200 OKwith the result in the response body. -
If the job continues in the background, it returns
202 Acceptedwith a job identifier. The result can be retrieved later using/jobs/findmethod — it will be available in theresultfield of the Job object.
A job may be in one of the possible states at the moment:
PENDING— Job created, waiting to startRUNNING— Job is in progressDONE— Job completed successfullyFAILED— Job failed with an errorCANCELLED— Job cancelled by timeout
Job timeouts configuration¶
A standard Prefer header may be used to set a job timeouts at client side
curl --location 'http://localhost:8081/rest-api/v3/vod/startup' \
--header 'Content-Type: application/json' \
--header 'Prefer: respond-async, wait=3, timeout=10' \
--data '{"uri": "vod-live://sample.mp4", "localStreamName": "test", "loop": true}'
Where:
wait=3— Sync wait time in seconds. Returns200 OKif the job finishes within the specified time, otherwise202 Accepted. Default: 5.timeout=10— Max execution time in seconds. If the job does not complete within this time, it is automatically canceled. Default: 60.
The corresponding server side settings are
If the Prefer header value is omitted or exceeds these limits, the server setting value is used