GET Audio Assets
Overview
The following table contains information about the GET
method in regards to retrieving the assets of an audio.
GET Audio Assets | |
---|---|
Method | GET |
URL or Endpoint | /api/v1/projectId /audios/audioId /assets |
Headers | Authorization |
Parameters | audioId, projectId, anyStatus |
Body | Not Applicable |
The description of the URL parameters is as follows:
URL Parameter Name | Mandatory | Type | Description |
---|---|---|---|
projectId | Yes | string | Unique Id of the project |
audioId | Yes | string | Unique Id of the audio |
anyStatus | No | bool | Audio status value |
Request Body
The GET
method doesn't contain a request body.
Response
{
"success": true,
"errors": [],
"messages": [],
"result": {
"originalFile": "{originalFile}",
"thumbnail": null,
//If audio contains chapters, the URL of the VTT File will apear like this:
"chaptersVtt": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/hls/chapter.vtt",
"streamResponse": {
"keyId": null,
"contentId": "",
"progress": 100,
"progressTillReadiness": null,
"status": "Complete",
"encodingProcessRemainingTime": 0,
"encodingProcessFinishTime": "2024-06-10T12:12:30.9299262Z",
"streams": [
{
"assetType": "Audio",
"streamType": "hls",
"root": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/hls/master_file.m3u8",
"qualityTypes": [
{
"id": "{audioId}",
"mediaType": "Audio",
"qualityType": "320kbps",
"streamUrl": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/hls/320kbps/audio/index.m3u8",
"statusDescription": "Complete",
"status": "Complete",
"duration": 19.722449,
"size": 318946,
"width": 0,
"height": 0,
"bitrate": 0,
"audioCodec": null,
"audioBitrate": 0,
"audioSampleRate": 0,
"progress": 100
},
{
"id": "{audioId}",
"mediaType": "Audio",
"qualityType": "192kbps",
"streamUrl": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/hls/192kbps/audio/index.m3u8",
"statusDescription": "Complete",
"status": "Complete",
"duration": 19.722449,
"size": 475349,
"width": 0,
"height": 0,
"bitrate": 0,
"audioCodec": null,
"audioBitrate": 0,
"audioSampleRate": 0,
"progress": 100
},
{
"id": "{audioId}",
"mediaType": "Audio",
"qualityType": "128kbps",
"streamUrl": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/hls/128kbps/audio/index.m3u8",
"statusDescription": "Complete",
"status": "Complete",
"duration": 19.722449,
"size": 318946,
"width": 0,
"height": 0,
"bitrate": 0,
"audioCodec": null,
"audioBitrate": 0,
"audioSampleRate": 0,
"progress": 100
}
]
},
{
"assetType": "Audio",
"streamType": "mp3",
"root": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/mp3/master_file.gjp4",
"qualityTypes": [
{
"id": "{audioId}",
"mediaType": "Audio",
"qualityType": "192kbps",
"streamUrl": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/mp3/192kbps.mp3",
"statusDescription": "Complete",
"status": "Complete",
"duration": 19.722449,
"size": 474101,
"width": 0,
"height": 0,
"bitrate": 0,
"audioCodec": null,
"audioBitrate": 0,
"audioSampleRate": 0,
"progress": 100
},
{
"id": "{audioId}",
"mediaType": "Audio",
"qualityType": "128kbps",
"streamUrl": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/mp3/128kbps.mp3",
"statusDescription": "Complete",
"status": "Complete",
"duration": 19.722449,
"size": 316113,
"width": 0,
"height": 0,
"bitrate": 0,
"audioCodec": null,
"audioBitrate": 0,
"audioSampleRate": 0,
"progress": 100
},
{
"id": "{audioId}",
"mediaType": "Audio",
"qualityType": "320kbps",
"streamUrl": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/mp3/320kbps.mp3",
"statusDescription": "Complete",
"status": "Complete",
"duration": 19.722449,
"size": 316113,
"width": 0,
"height": 0,
"bitrate": 0,
"audioCodec": null,
"audioBitrate": 0,
"audioSampleRate": 0,
"progress": 100
}
]
},
{
"assetType": "Audio",
"streamType": "flac",
"root": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/flac/master_file.gjp4",
"qualityTypes": [
{
"id": "{audioId}",
"mediaType": "Audio",
"qualityType": "128kbps",
"streamUrl": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/flac/128kbps.flac",
"statusDescription": "Complete",
"status": "Complete",
"duration": 19.722449,
"size": 1251220,
"width": 0,
"height": 0,
"bitrate": 0,
"audioCodec": null,
"audioBitrate": 0,
"audioSampleRate": 0,
"progress": 100
},
{
"id": "{audioId}",
"mediaType": "Audio",
"qualityType": "192kbps",
"streamUrl": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/flac/192kbps.flac",
"statusDescription": "Complete",
"status": "Complete",
"duration": 19.722449,
"size": 1251220,
"width": 0,
"height": 0,
"bitrate": 0,
"audioCodec": null,
"audioBitrate": 0,
"audioSampleRate": 0,
"progress": 100
},
{
"id": "{audioId}",
"mediaType": "Audio",
"qualityType": "320kbps",
"streamUrl": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/flac/320kbps.flac",
"statusDescription": "Complete",
"status": "Complete",
"duration": 19.722449,
"size": 1251220,
"width": 0,
"height": 0,
"bitrate": 0,
"audioCodec": null,
"audioBitrate": 0,
"audioSampleRate": 0,
"progress": 100
}
]
}
]
}
},
"resultInfo": null,
"statusCode": 200
}
Information about the fields that appear when you receive the response are displayed in the table below.
Field Name | Type | Description |
---|---|---|
success | bool | If the response is successful it will return true. Otherwise will return false |
errors | array[string] | Indicates if there was an error |
messages | array[string] | Returns the response message from back-end |
result | array[Object] | Returns the response object |
originalFile | string | A unique identifier for the original audio file |
thumbnail | string | URL of the default thumbnail image of the audio |
chaptersVTT | string | URL of the VTT file for chapters |
streamResponse | array[Object] | Returns the stream response as an array of objects. |
keyId | string | Id of the key |
contentId | string | Id of the content |
progress | integer($int32) | Overall progress of the encoding process |
progressTillReadiness | integer($int32) | Progress until the audio is ready |
status | string | Current status of the encoding process |
encodingProcessRemainingTime | integer($int32) | Time remaining for encoding to complete |
EncodingProcessFinishTime | Date | Timestamp of when the encoding finished |
streams | array[Object] | Returns the streams as an array of objects. |
assetType | string | Type of media |
streamType | string | Format of the stream |
root | string | The URL of the root. |
qualityTypes | array[Object] | Returns the quality types as an array of quality types. |
id | string | Unique identifier for this particular quality |
mediaType | string | Type of the media |
qualityType | string | Describes the quality of the stream |
streamUrl | string | URL to access specific quality stream |
statusDescription | string | Description of the current status |
status | string | Status of the quality stream |
duration | double | Duration of the stream in seconds |
size | integer($int32) | Size of the stream file in bytes |
width | integer($int32) | Width of the audio in pixels |
height | integer($int32) | Height of the audio in pixels |
bitrate | integer($int32) | Bitrate of the stream in bits per seconds |
audioCodec | string | Codec used for the audio stream |
audioBitrate | integer($int32) | Bitrate of the audio stream in Hz. |
audioSampleRate | integer($int32) | Sample rate of the audio stream in Hz |
progress | integer($int32) | Progress of encoding for quality type |
resultInfo | string | Returns extra information about the result |
statusCode | integer($int32) | Returns the HTTP Status Code |
If the action is successful, the service sends back an HTTP 200 or 201 response.
Errors
For information about the errors that are common to all actions, see Common Errors:
HTTP Status Code 400: Bad Request
HTTP Status Code 401: Unauthorized
HTTP Status Code 403: Forbidden
HTTP Status Code 404: Result Not Found
HTTP Status Code 500: Internal Server Error
HTTP Status Code 503: Backend Fetch Failed