The Content-Length header is automatically populated by curl. If using another method to access the API, you must calculate and populate the Content-Length header.
Request Fields
Field
Description
applicationId (required)
Your Application ID
secret (required)
Your application secret
streamId (required)
The stream ID of the on-demand stream that you want to delete
reason (required)
A reason for why the stream is deleted for your records.
Delete Stream Response
The platform will return a successful response that contains a "status" field. The HTTP status code is set according to the "status" field.
HTTP
1HTTP/1.1 200 OK
2Content-Type: application/json; charset=utf-8
3Content-Length: 15
4
5{"status":"ok"}
cURL
1{
2"status":"ok"
3}
Status Codes
HTTP
Status
Retry
Description
200 OK
ok
never
Stream was successfully terminated.
400 Bad Request
varies
never
Indicates an issue with the request itself.
401 Unauthorized
unauthorized
never
The streaming platform was not able to authorize the provided credentials.
404 Not Found
not-found
never
The specified stream is not known to the platform.
408 Request Timeout
request-timeout
once immediately, then exponential backoff
Request timed out likely due to temporary resource or network conditions. Please try again.
409 Conflict
not-ended
after terminating the stream
Stream has not ended. On-demand streams can not be deleted until the stream has terminated. To forcefully terminate a stream, see Terminating A Stream.
410 Gone
already-deleted
never
The specified stream has already been deleted.
410 Gone
resource-unavailable
never
The resources that hosted the specified stream are unavailable.
4XX
varies
never
Indicates an issue with the request itself.
503 Service Unavailable
capacity
once
The system is temporarily overloaded. Please try again later.
5XX
varies
once immediately, then exponential backoff
A transient server error.
Error Responses: Please be aware that some server errors 5XX and request validation errors 400 and 401 may result in an arbitrary response body not encoded in JSON.
Get Playlist Information
This API allows to get information for all the playlists of a live or on-demand stream.
Get Playlist Request
You can send a PUT request to the /pcast/stream/playlist endpoint as shown:
The Content-Length header is automatically populated by curl. If using another method to access the API, you must calculate and populate the Content-Length header.
Request Fields
Field
Description
applicationId (required)
Your Application ID
secret (required)
Your application secret
streamId (required)
The stream ID of the stream whose playlist URIs are requested
Get Playlist Response
The platform will return a successful response that contains a "status" field. The HTTP status code is set according to the "status" field.
bit rate of track(s) in the playlist. This is null when the bitrate is unknown or when there are tracks with different bitrates.
height
height of the track(s) in the playlist. This is null when the height is unknown or when there are tracks with different height.
framesPerSecond
frames per second (fps) of the track(s) in the playlist. This is null when the framesPerSecond value is unknown or when there are tracks with different frames per second.
Encoding: Stream ID may contain characters that are unsafe for URLs. Be sure to encode the StreamId in the URL path. For example, the URL encoding of `us-central#us-central` is `us-central%23us-central`
Request URI Parameters
Parameter
Description
streamToken (optional)
Streams protected with token-auth require a valid edge auth token to be provided. An edge auth token issued for the channel ID or alias will grant access to the playlist for the channel. Alternatively, if the origin stream ID is known, access can be restricted to just a stream itself.
Playlist API Status Codes
HTTP
Status
Retry
Description
200 OK
ok
never
Playlists were successfully retrieved.
400 Bad Request
varies
never
Indicates an issue with the request.
401 Unauthorized
unauthorized
never
The streaming platform was not able to authorize the provided credentials.
4XX
varies
never
Indicates an issue with the request.
503 Service Unavailable
capacity
once
The system is temporarily overloaded. Please try again later.