Skip to main contentIBM Video Streaming Developers

Recording videos

Get time limit of recorded videos

Returns the maximum allowed length of recorded videos for the channel.

GET https://api.video.ibm.com/channels/{channel_id}/limits/recording.json

Parameters

This request has no parameters.

Success response

Upon success a response with HTTP status “200 OK” is returned with the following key-value pair.

KEYTYPEDESCRIPTION
timenumberTime limit in seconds

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given channel
404 Not Foundnot_foundChannel was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Get recording status

Returns information on recording status during live broadcasts done on a channel.

GET https://api.video.ibm.com/channels/{channel_id}/recorder.json

Parameters

This request has no parameters.

Success response

Upon success a response with HTTP status “200 OK” is returned. If the channel has a live broadcast running, it also returns the following key-value pairs under a video element.

KEYTYPEDESCRIPTION
idstringUnique ID of the video that is being recorded
urlstringVideo URL

Example of a success response:

{
"video": {
"id": "11111",
"url": "https://api.video.ibm.com/videos/11111.json"
}
}

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
404 Not Foundnot_foundChannel was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Start/stop recording

Control recording during live broadcast on a channel.

POST https://api.video.ibm.com/channels/{channel_id}/recorder.json

Parameters

The parameters for the POST request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
commandstringREQUIREDSupported values: start or stop

Example of the request:

POST /channels/42/recorder.json HTTP/1.1
Host: api.video.ibm.com
Authorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
Content-Type: application/x-www-form-urlencoded
command=stop

Success response

Upon success a response with HTTP status “202 Accepted” is returned. If the channel has a live broadcast running, it also returns the following key-value pairs under a video element.

KEYTYPEDESCRIPTION
idstringUnique ID of the video that is being recorded
urlstringVideo URL

There’s no direct feedback on the results of the operation.

Example of a success response:

{
"video": {
"id": "11111",
"url": "https://api.video.ibm.com/videos/11111.json"
}
}

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
404 Not Foundnot_foundChannel was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Control auto-recording

A video on demand recording can be automatically created when live broadcasting that is made available to viewers after the live stream. The behavior can be controlled by this resource.

PUT https://api.video.ibm.com/channels/{channel_id}/settings/autorecord.json

Parameters

The parameters for the PUT request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
valuestringREQUIREDSupported values: disabled – no auto-recorded video gets created for the channel when broadcasting; private – the new auto-record will be private by default; public – the created auto-records will be public by default

Success response

Upon success a response with HTTP status “200 OK” is returned.

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
400 Bad Requestinvalid_valueThe specified value is invalid or unsupported
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
402 Payment Requiredinvalid_requestThe user does not have the benefit
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given channel
404 Not Foundnot_foundChannel was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request