Add captions to an existing video resource.
Get a Video’s captions
Code | Description |
---|---|
400 | Bad Request: body has wrong syntax or unable to handle request |
401 | Unauthorized: auth_token omitted or authentication failed |
403 | Forbidden: This action cannot be performed |
404 | Not Found: The requested resource could not be found |
406 | Not Acceptable: Accept or Content-Type headers must be application/json, text/csv or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
422 | Unprocessable Entity: body has wrong attributes |
RESPONSE Content-Type: application/json [ { "srt_url": "//cdn.vidyard.com/transcriptions/BeQAX/i-UTPAWS.srt", "vtt_url": "//cdn.vidyard.com/transcriptions/BeQAX/Yut9l8z4.vtt", "txt_url": "//cdn.vidyard.com/transcriptions/BeQAX/Yut9l8z4.txt", "language": "en", "id": 1011, "status": "complete", "created_at": 1442297000, "updated_at": 1442297001, "formatted_language_name": "English (en)", "localized_language_name": "English", "is_default": true, "notes": "Transcription request notes", "srt_download_url": "//vidyard.s3.amazonaws.com/transcriptions/BeQAX/i-UTPAWS.srt", "vtt_download_url": "//vidyard.s3.amazonaws.com/transcriptions/BeQAX/Yut9l8z4.vtt", "txt_download_url": "//vidyard.s3.amazonaws.com/transcriptions/BeQAX/Yut9l8z4.txt", }, { "srt_url": "//cdn.vidyard.com/transcriptions/BeQAX/i-UTPAWS.srt", "vtt_url": "//cdn.vidyard.com/transcriptions/BeQAX/Yut9l8z4.vtt", "txt_url": "//cdn.vidyard.com/transcriptions/BeQAX/Yut9l8z4.txt", "language": "fr", "id": 1011, "status": "complete", "created_at": 1442297000, "updated_at": 1442297001, "formatted_language_name": "Francais (fr)", "localized_language_name": "Francais", "is_default": false, "notes": "", "srt_download_url": "//vidyard.s3.amazonaws.com/transcriptions/BeQAX/z-X1PAWS.srt", "vtt_download_url": "//vidyard.s3.amazonaws.com/transcriptions/BeQAX/Yut7l8z4.vtt", "txt_download_url": "//vidyard.s3.amazonaws.com/transcriptions/BeQAX/Yut9l8z4.txt", } ]
Param name | Description |
---|---|
auth_token optional |
API token needed to authorize requests Validations:
|
language optional |
Optional two letter language code used to return the first caption with the matching language code. Validations:
|
order_by optional |
The attribute to order the list by Validations:
|
direction optional |
When the direction to order the list Validations:
|
Get a caption by id
Code | Description |
---|---|
400 | Bad Request: body has wrong syntax or unable to handle request |
401 | Unauthorized: auth_token omitted or authentication failed |
403 | Forbidden: This action cannot be performed |
404 | Not Found: The requested resource could not be found |
406 | Not Acceptable: Accept or Content-Type headers must be application/json, text/csv or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
422 | Unprocessable Entity: body has wrong attributes |
REQUEST Content-Type: application/json { "srt_url": "//cdn.vidyard.com/transcriptions/BeQAX/i-UTPAWS.srt", "vtt_url": "//cdn.vidyard.com/transcriptions/BeQAX/Yut9l8z4.vtt", "txt_url": "//cdn.vidyard.com/transcriptions/BeQAX/Yut9l8z4.txt", "language": "en", "id": 1011, "status": "complete", "formatted_text": "The quick brown fox\njumped over the lazy dog.", "plain_text": "The quick brown fox jumped over the lazy dog.", "created_at": 1442297000, "updated_at": 1442297001, "formatted_language_name": "English (en)", "localized_language_name": "English", "is_default": true, "notes": "Transcription request notes", "srt_download_url": "//vidyard.s3.amazonaws.com/transcriptions/BeQAX/i-UTPAWS.srt", "vtt_download_url": "//vidyard.s3.amazonaws.com/transcriptions/BeQAX/Yut9l8z4.vtt", "txt_download_url": "//vidyard.s3.amazonaws.com/transcriptions/BeQAX/Yut9l8z4.txt", }
Param name | Description |
---|---|
auth_token optional |
API token needed to authorize requests Validations:
|
Add an SRT or VTT file to an existing video resource.
The URL specified in ‘srt_url’ or ‘vtt_url’ will be fetched and the response body used for the SRT or VTT file.
If no ‘srt_url’ or ‘vtt_url’ is specified an empty VTT file will be created.
The initial response will be a 201 Created if successful with the status of the caption set to ‘in_progress’.
It is the caller’s responsibility to check that the SRT or VTT was fetched successfully.
If retrieval of the SRT or VTT file fails the caption will still return a 201 but an error will be set on the caption with an appropriate message.
Code | Description |
---|---|
401 | Unauthorized: auth_token omitted or authentication failed |
403 | Forbidden: This action cannot be performed |
406 | Not Acceptable: Accept or Content-Type headers must be application/json, text/csv or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
422 | Unprocessable Entity: body has wrong attributes |
404 | Not Found: The requested resource could not be found |
400 | Bad Request: body has wrong syntax or unable to handle request |
REQUEST Content-Type: application/json caption: { srt_url: "s3://...", vtt_url: "s3://...", language: "en", is_default: true } RESPONSE 201 (Created) { "id": 1011, "srt_url": "//cdn.vidyard.com/transcriptions/BeQAX/i-UTPAWS.srt", "vtt_url": "//cdn.vidyard.com/transcriptions/BeQAX/Yut9l8z4.vtt", "txt_url": "//cdn.vidyard.com/transcriptions/BeQAX/Yut9l8z4.txt", "language": "en", "status": "complete", "formatted_text": "The quick brown fox\njumped over the lazy dog.", "plain_text": "The quick brown fox jumped over the lazy dog.", "created_at": 1442297000, "updated_at": 1442297001, "formatted_language_name": "English (en)", "localized_language_name": "English", "is_default": true, "notes": "", "srt_download_url": "//vidyard.s3.amazonaws.com/transcriptions/BeQAX/i-UTPAWS.srt", "vtt_download_url": "//vidyard.s3.amazonaws.com/transcriptions/BeQAX/Yut9l8z4.vtt", "txt_download_url": "//vidyard.s3.amazonaws.com/transcriptions/BeQAX/Yut9l8z4.txt", "creator_type": "Automatic", }
Param name | Description |
---|---|
auth_token optional |
API token needed to authorize requests Validations:
|
caption optional |
Validations:
|
caption[srt_url] optional |
SRT URL Validations:
|
caption[vtt_url] optional |
VTT URL Validations:
|
caption[language] optional |
Language of caption Validations:
|
caption[source_language] optional |
Language of caption source Validations:
|
caption[is_default] optional |
Set the default caption for the video Validations:
|
caption[creator_type] optional |
Type of creator of captions Validations:
|
Update a caption file
Code | Description |
---|---|
401 | Unauthorized: auth_token omitted or authentication failed |
403 | Forbidden: This action cannot be performed |
406 | Not Acceptable: Accept or Content-Type headers must be application/json, text/csv or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
422 | Unprocessable Entity: body has wrong attributes |
404 | Not Found: The requested resource could not be found |
400 | Bad Request: body has wrong syntax or unable to handle request |
REQUEST Content-Type: application/json caption_file: { language: "fr" } RESPONSE 200 { "language": "fr" }
Param name | Description |
---|---|
auth_token optional |
API token needed to authorize requests Validations:
|
caption optional |
Validations:
|
caption[language] optional |
Language code Validations:
|
caption[content] optional |
VTT content Validations:
|
caption[error_message] optional |
Set error message of caption Validations:
|
caption[is_default] optional |
Set the default caption for the video Validations:
|
caption[vtt_url] optional |
VTT URL Validations:
|
caption[creator_type] optional |
Type of caption Validations:
|
Get caption VTT content
Code | Description |
---|---|
401 | Unauthorized: auth_token omitted or authentication failed |
403 | Forbidden: This action cannot be performed |
406 | Not Acceptable: Accept or Content-Type headers must be application/json, text/csv or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
422 | Unprocessable Entity: body has wrong attributes |
404 | Not Found: The requested resource could not be found |
400 | Bad Request: body has wrong syntax or unable to handle request |
REQUEST Content-Type: application/json RESPONSE 200 { "content": "WEBVTT\n\n00:00:01.200 --> 00:00:03.360\nIf there is unrest" }
Param name | Description |
---|---|
auth_token optional |
API token needed to authorize requests Validations:
|
Update a caption file
Code | Description |
---|---|
401 | Unauthorized: auth_token omitted or authentication failed |
403 | Forbidden: This action cannot be performed |
406 | Not Acceptable: Accept or Content-Type headers must be application/json, text/csv or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
422 | Unprocessable Entity: body has wrong attributes |
404 | Not Found: The requested resource could not be found |
400 | Bad Request: body has wrong syntax or unable to handle request |
REQUEST Content-Type: application/json RESPONSE 200 { "status": "draft" }
Param name | Description |
---|---|
auth_token optional |
API token needed to authorize requests Validations:
|
Update a caption file
Code | Description |
---|---|
401 | Unauthorized: auth_token omitted or authentication failed |
403 | Forbidden: This action cannot be performed |
406 | Not Acceptable: Accept or Content-Type headers must be application/json, text/csv or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
422 | Unprocessable Entity: body has wrong attributes |
404 | Not Found: The requested resource could not be found |
400 | Bad Request: body has wrong syntax or unable to handle request |
REQUEST Content-Type: application/json RESPONSE 200 { "status": "published" }
Param name | Description |
---|---|
auth_token optional |
API token needed to authorize requests Validations:
|
Delete a caption
Code | Description |
---|---|
400 | Bad Request: body has wrong syntax or unable to handle request |
401 | Unauthorized: auth_token omitted or authentication failed |
403 | Forbidden: This action cannot be performed |
404 | Not Found: The requested resource could not be found |
406 | Not Acceptable: Accept or Content-Type headers must be application/json, text/csv or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
422 | Unprocessable Entity: body has wrong attributes |
Param name | Description |
---|---|
auth_token optional |
API token needed to authorize requests Validations:
|