Skip to main contentIBM Video Streaming Developers

Control video expiration

You can set an expiration date for video content. A video gets deleted when expires. These videos can be saved by setting the time of the expiration.

Get video expiration

Returns information on when the video will expire.

GET https://api.video.ibm.com/videos/{video_id}/expiration.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 pairs under an expiration key.

KEYTYPEDESCRIPTION
rulestringPossible values: never, at_given_time
expires_atnumberIf value of rule field is at_given_time, this field contains the Unix timestamp of the expiration. (If the value is never, this field is not provided.)

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
403 ForbiddenforbiddenManaging the expiration is disabled at system level or user has no permission to manage the expiration of videos
404 Not Foundnot_foundVideo was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Set video expiration

If you don’t want certain video assets to be deleted you can set the video to never expire.

GET https://api.video.ibm.com/videos/{video_id}/expiration.json

Parameters

The parameters for the PUT request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
rulestringREQUIREDSupported value: never

Success response

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

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
404 Bad Requestbad_requestrule is not provided value is not valid.
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
403 ForbiddenforbiddenManaging the expiration is disabled at system level or user has no permission to manage the expiration of videos
404 Not Foundnot_foundVideo was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request