Overview
- AST’s CaptionSync RESTful API documentation provides information to web developers to integrate with CaptionSync via an HTTPS-based Application Programming Interface (API).
- The API uses a standard HTTPS POST url-encoded requests structure and it's designed to follow REST principles (though not using the GET, DELETE or PUT methods). The APIs consist of actions for querying, creating, updating and listing submissions and lists.
- All methods use JSON POST of parameters (except upload of files). All results are similarly in JSON (except download of files).
- The order of required parameters should follow the order shown in this document (particularly for the authentication method).
Revision History
Ver | Date | Modifications |
1.0 | 2016-06-18 | Initial production release |
1.1 | 2017-01-11 | Added PersistentNote and TransExpert options to submissions -> create and lists -> create methods. Added get_transcriber_expertise_options, get_persistent_notes, and get_integration_params methods to submissions. |
1.2 | 2017-04-20 | Corrected submissions -> get_transcriber_expertise_options, submissions -> create, submissions -> get_details and submissions -> get_smart_player_url typos. Added to lists -> get_details and submissions -> get_languages results. Clarified StatusURL. |
1.3 | 2017-09-12 | Updated prepaid credit text, changed submission description, changed list description to 250 characters. |
1.3.1 | 2018-08-07 | Expanded list url to be less than 1024 characters. |
2.1. get_languages
2.2. get_transcription_options
2.3. get_transcriber_expertise_options
2.4. get_persistent_notes
2.5. get_integration_params
2.6 list
2.7. create
2.8. add_media
2.9. add_transcript
2.10. update
2.11. cancel
2.12. get_details
2.13. get_results
2.14. get_smart_player_url
3.1. list
3.2. create
3.3. update
3.4. retry_fetching
3.5. get_details
1. Authentication
Authentication is accomplished using a standard token-based approach which requires three pieces of information; a PartnerType, a CustomerID, and the CustomerSecret:
- The PartnerType is a value suggested by you and agreed upon by us, and it usually indicates the name of your company or product, such as AlphaVideoServer.
- The CustomerID is the AST login ID (Username) for the CaptionSync account that you are accessing.
- We provide a CustomerSecret value for each CaptionSync user that has enabled the integration. Once the integration is in production, this is available to users on the Settings page for the integration in the CaptionSync web UI. During development, AST Support team can provide you with a CustomerSecret for your developer account.
The URL to authenticate is:
https://api.automaticsync.com/v1/authenticate
The JSON post would be formatted like:
{ "method": "authenticate",
"params": {
"PartnerType": "PodcastProducer",
"CustomerID": "myusername",
"CustomerSecret": "13a5938fec8fd760ee61e257a5a4db"
}
}
Response codes to the POST are:
201 | Authentication succeeded. Token created |
401 | Authentication failed |
500 | Request not properly formatted |
A successful response would look like:
HTTP/1.1 201 Created
{
"access_token": "AM_iyJgcpRwswbm9acZu3GCb2DkZArUrViAwvOpYgvIHA7
eqK-RLb3iaY3ia9rzNtlsG6pJFJ8XkD2c-51XIgl25pMOXtHUx0Q6aFbt3u58g",
"expires_in": "3600",
"token_type": "Bearer",
}
An unsuccessful response would contain error and error_description e.g.:
HTTP/1.1 401 Unauthorized
{
"error": "Access Denied",
"error_description": "The token request is not authorized for
the PartnerType, CustomerID, and CustomerSecret.",
}
2. Submissions
The following methods are available for submissions.
get_languages
get_transcription_options
get_transcriber_expertise_options
get_persistent_notes
get_integration_params
list
create
add_media
add_transcript
update
cancel
get_details
get_results
get_smart_player_url
A JSON POST is required to the following URL:
https://api.automaticsync.com/v1/submissions
with the Authorization header containing the access token determined in Section 1, e.g.
Authorization: Bearer AM_iyJgcpRwswbm9acZu3GCb2DkZArUrViAwvOpYgv
IHA7eqK-RLb3iaY3ia9rzNtlsG6pJFJ8XkD2c-51XIgl25pMOXtHUx0Q6aFbt3u58g
e.g.
{ "method": "list",
"params": {
"Status": "Failed, Rejected Audio",
"Created": "> 2015-08-10",
"Limit": "2"
"SortBy": "Created asc"
}
}
would return the 2 oldest failed submissions since 2015-08-10.
HTTP/1.1 200 OK
{
"submissions": [
{
"id":"1446766327jdoe",
"original_id": "",
"description": "ENG210 Lecture 13",
"media_file": "3181E45C-A853-4B2A-B031-DC905330676D.mp4",
"transcript_file": "1446766327jdoe.txt",
"language": "English",
"batch_id": "",
"trans_priority": "1 Business Day",
"duration": "34",
"app": "Captioning",
"status": "Failed",
"when_created": "2015-08-11 09:23:45"
},
{
"id": "1446782006ljdoe",
"original_id": "",
"description": "ENG210 Lecture 14",
"media_file": "496B1ADC-4FD5-444C-8550-C611CAE8B045.mp4",
"transcript_file": "",
"language": "English",
"batch_id": "",
"trans_priority": "2 Business Day",
"duration": "43",
"app": "Captioning",
"status": "Rejected Audio",
"when_created": "2015-08-12 19:12:02"
}
]
}
2.1. get_languages
This method is used to get the available languages for submissions or lists where transcription is required, or for submissions where a transcript is provided.
HaveTrans | This is the flag to specify if your own transcription will be provided or not (Y or N). The default is N. |
Returns:
200 | Languages are listed |
401 | Not authorized |
500 | Request not properly formatted |
A successful response would contain an array of languages that are available. e.g.:
HTTP/1.1 200 OK
{
"languages": [
{
"option":"English"
"iso_639-1": "EN",
"iso_639-2": "eng"
},
{
"option": "Spanish"
"iso_639-1": "ES",
"iso_639-2": "esp"
},
{
"option": "Mixed Spanish/English"
"iso_639-1": "ES-EN",
"iso_639-2": "mix"
},
{
"option": "French"
"iso_639-1": "FR",
"iso_639-2": "fra"
}
]
}
An unsuccessful response would contain error and error_description e.g.:
HTTP/1.1 500 Internal Server Error
{
"error": "Request not properly formatted",
"error_description": "This API call accepts only HasTrans
parameter."
}
2.2. get_transcription_options
This method is used to get the available transcription turnaround time options for the particular user.
Returns:
200 | Transcription options are listed |
401 | Not authorized |
500 | Request not properly formatted |
A successful response would contain an array of code and option that are available for this particular user. e.g.:
HTTP/1.1 200 OK
{
"transcription": [
{
"code":"L"
"option": "4 Business Day"
},
{
"code": "R"
"option": "1 Business Day"
},
]
}
An unsuccessful response would contain error and error_description e.g.:
HTTP/1.1 401 Unauthorized
{
"error": "Access Denied",
"error_description": "The token is not authorized to get
transcription options."
}
2.3. get_transcriber_expertise_options
This method is used to get available transcriber expertise areas for the particular user.
Returns:
200 | Transcriber expertise options are listed |
401 | Not authorized |
500 | Request not properly formatted |
A successful response would contain an array of id , is_selected and area that are available for this particular user. e.g.:
HTTP/1.1 200 OK
{
"expertise": [
{
"id": "15",
"is_selected": "Y",
"area": "Medicine"
},
{
"id": "16",
"is_selected": "Y",
"area": "Chemistry"
},
{
"id": "17",
"is_selected": "N",
"area": "Mathematics"
}
]
}
An unsuccessful response would contain error and error_description e.g.:
HTTP/1.1 401 Unauthorized
{
"error": "Access Denied",
"error_description": "The token is not authorized to get
transcriber expertise options."
}
2.4. get_persistent_notes
This method is used to get persistent notes to the transcriber for the particular user.
Returns:
200 | Persistent notes are listed |
401 | Not authorized |
500 | Request not properly formatted |
A successful response would contain an array of id , is_default and name that are available for this particular user. e.g.:
HTTP/1.1 200 OK
{
"persistent_notes": [
{
"id": "131",
"is_default": "N",
"name": "GeoTalk Host Names"
},
{
"id": "213",
"is_default": "N",
"name": "Chemistry Notes"
},
{
"id": "219",
"is_default": "Y",
"name": "Math Conventions"
}
]
}
An unsuccessful response would contain error and error_description e.g.:
HTTP/1.1 401 Unauthorized
{
"error": "Access Denied",
"error_description": "The token is not authorized to get
persistent notes."
}
2.5. get_integration_params
This method is used to get available additional name/value pairs of information for the selected integration for the particular user (beyond the shared secret required to get a token).
Returns:
200 | Name/value pairs are listed |
401 | Not authorized |
500 | Request not properly formatted |
A successful response would contain an array of name and value that are available for this particular user. e.g.:
HTTP/1.1 200 OK
{
"integration_params": [
{
"name": "ftp_server",
"value": "machine.organization.org"
},
{
"name": "ftp_user",
"value": "bob"
},
{
"name": "ftp_password",
"value": "foobar"
}
]
}
An unsuccessful response would contain error and error_description e.g.:
HTTP/1.1 401 Unauthorized
{
"error": "Access Denied",
"error_description": "The token is not authorized to get
integration parameters."
}
2.6. list
This method is used to find submissions for the current selected user within the scope of the session (i.e. the particular partner type). Multiple parameters are treated as a logical AND. At least one parameter must be specified.
Limit |
This is a maximum number of results to return. An offset may optionally prepended, e.g. If making calls in pages of 50, the third page of results would have an offset of 100, i.e. 100, 50 |
SortBy |
This is comma delimited list of the fields to sort on, e.g. status, duration, when_created, description |
Created |
This is a date in the ISO format of YYYY-MM-DD. Time may be optionally appended as HH:MM:SS. This time is to be interpreted as PT. |
MediaFile |
This is the filename of the media submitted or downloaded. |
IsOriginal |
The values of Y or N specify if the search should be constrained to just originals or just redos. |
Status |
This is a comma delimited list of the status to filter on, e.g. Failed, Rejected Audio |
BatchID |
This is the batch identifier used with the submission. |
Description |
This uses a like match parameter on the leading end to deal with Batch: or Redo: prefixes. |
Returns:
200 | Submissions are listed |
401 | Not authorized |
404 | No results found |
500 | Request not properly formatted |
A successful response would contain an array of id, original_id, description, media_file, transcript_file, language, batch_id, trans_priority, duration, app, status, and when_created data for each submission.
A successful response would look like:
HTTP/1.1 200 OK
{
"submissions": [
{
"id": "1446782006ljdoe",
"original_id": "",
"description": "ENG210 Lecture 10",
"media_file": "496B1ADC-4FD5-444C-8550-C611CAE8B045.mp4",
"transcript_file": "1446782006ljdoe.txt",
"language": "English",
"batch_id": "",
"trans_priority": "2 Business Day",
"duration": "43",
"app": "Captioning",
"status": "Succeeded",
"when_created": "2015-08-11 21:02:58"
}
]
}
2.7. create
This method is used to create a new submission where the media file (and optionally transcript file) will be later posted.
App |
This can be one of the valid application types associated with your account: e.g. Captioning, Transcription, or Production. If not present, the submission will inherit the default set via the web UI. |
BatchID |
This is the optional batch identifier to be used with the submission. Numerous submissions can be grouped together under a batch identifier for reporting and collecting of results (all results for a particular batch are zipped together for retrieval via SFTP or the web UI). Keep in mind that the batch identifier needs to be nicely named -- no spaces, punctuation, or high ASCII characters, please. |
Description |
If present, this will be the description presented to the user in lieu of the basename of the media file. The database field is 255 characters in length – anything beyond 255 characters will be truncated. |
Language |
This can be one of the valid languages associated with your account: English, Spanish, Mixed Spanish/English, French or German. If not present, the submission will inherit the default set via the web UI. |
Rush |
This is the flag to specify which transcription SLA should be used. Normally the default priority associated with the account is used to determine the SLA. This can be used to override that default. Note that the account must allow the selected SLA level and for prepaid accounts, sufficient prepaid credits must be present. The permitted SLAs for the user can be found via the submissions->get_transcription_options method. Presently values may include L (4 Business Day), T (2 Business Day), R (1 Business Day), H (8 Hour), as well as a more generic Y (default expedited transcription for account), and N (default non expedited transcription for account). This does not apply if you are providing your own transcript. |
HaveTrans |
This is the flag to specify if your own transcription will be provided or not (Y or N). The default is N. |
Transcriber |
This is the name of the 3rd part transcription entity for the submission request to be sent to. Only applicable if there is more than one transcriber associated with the account. If not present, the submission will inherit the default transcriber set via the web UI. This is rarely used. |
Notes |
These are notes to help the transcriber regarding the spelling of proper names, speaker ID formats, etc. If there are enabled Persistent Notes to the Transcriber configured on your account, these will be added to each submission first, followed by the content in Notes. This does not a apply if you are providing your own transcript. |
PersistentNote |
This specifies the integer ID of the persistent note to the transcriber to be used, or 0 if no persistent note to be used (overriding any default). If not present, the default from the web UI is used to determine the persistent note to the transcriber (if any). The existing notes for the user can be found via the submissions->get_persistent_notes method. This does not a apply if you are providing your own transcript. |
TransExpert |
This specifies the integer ID(s) of the transcriber expertise area to be used, or 0 if no persistent note to be used (overriding any default). If not present, the default from the web UI is used to determine the transcriber expertise area (if any). If more than one is passed they should comma delimited. The transcriber expertise areas for the user can be found via the submissions->get_transcriber_expertise_options method.
|
Offset |
This is used to specify offset timecode for broadcast outputs for Captioning submissions in the format hh:mm:ss:ff. If not present, the default offset timecode associated with the account is used. If present for any application type other than Captioning, it will be ignored. |
ResultReview |
This is the flag to specify if extra charge Result Review should be added to this submission (Y or N).
If present for any application type other than Captioning, it will be ignored. If not present, the Result Review default set via the web UI will be used. |
CustReview |
This is the flag to specify if the process should wait for the customer to approve the transcript before any |
PO |
This is the purchase order number for the submission for accounts set up as requiring purchase orders. If not present, the submission will inherit the default or most recently used valid purchase order for the account via the web UI. Keep in mind that the purchase order number needs to be nicely named -- no spaces, punctuation, or high ASCII characters please. |
CallBack |
This tells AST where to send results files back to via HTTP or HTTPS POST with a Content-Transfer- AST needs to approve your PartnerType in conjunction with the CallBack for any result posting to take place. This callback URL needs to be properly encoded e.g. %20 for SPACE. This also needs to be less than 512 characters in length. If you need more than one result type returned for the submission and/or you need to differentiate between different types of result files posted back (e.g. a caption file and transcript file) an additional {fileType} macro also needs to be present in the callback URL so that different posts can be completed for each result file. This could result in posts URLs like: https://67.34.4.22/bio1/closedCaptioning?id=1283232 The specific file types of the macro expansion (e.g., closedCaptioning, transcript, etc.) will need to be configured by AST. |
StatusURL |
This tells AST where to send status information back via HTTP or HTTPS POST with a Content-Transfer-Encoding of binary for a particular submission. This call back URL needs to be properly encoded e.g. %20 for SPACE. In addition, XML encoding may be required. For example The tag also needs to be less than 512 characters in length. The status information will be directly posted back to the specified URL as a raw POST with a MIME type of text/xml (note that there will not be any form URL encoding). The information will be presented in the following manner: <StatusUpdate> The status callback will be sent as soon as a fatal error occurs, but in general as far enough into the ingest processing to know that it is on track to succeed. For example if an error occurs when attempting to extract audio from the media file, the status callback will be sent at that point. Otherwise the system will not send the status callback until the file has been fetched, audio processing has been completed and an AST ID has been assigned. Type The tag will be one of Initial or Update. A status callback of the type of Update will only occur where a submission which was successfully ingested, subsequently fails or is rejected (the result will be FAILURE). Result The tag will be one of IN_PROCESS, NOT_INGESTED, or FAILURE. A status callback with a result of FAILURE will only occur where a submission, which was successfully ingested, subsequently fails or is rejected (the type will be Update). e.g. The transcriber tells us there is just silence in the audio: <StatusUpdate> ASTid If the submission was successfully ingested, this tag will reference the unique AST ID that has been assigned to the submission (also known as "submission_id"). The tag will not be present for the Result of NOT_INGESTED. ASTstatus If the submission was successfully ingested, this tag will reference the current status of the submission. Possible statuses include "Awaiting Transcription" and "Rejected Audio". The tag will not be present for the Result of NOT_INGESTED. ErrDetail The tag will only be present for the Result of NOT_INGESTED and FAILURE. e.g. <StatusUpdate> It is important to consider the possibility that the callback itself fails and no status information about the list item is received (e.g. 500 Internal Server Error). If no status information is received, it is important not to make assumptions about the status, rather further investigation is required. |
Returns:
201 | Submission created |
401 | Not authorized |
500 | Request not properly formatted |
A successful response would return the new_id of the submission created. e.g.:
HTTP/1.1 201 Created
{
"new_id": "1446782006ljdoe"
}
An unsuccessful response would contain error and error_description e.g.:
HTTP/1.1 401 Unauthorized
{
"error": "Access Denied",
"error_description": "The token is not authorized to create
a submission."
}
2.8. add_media
This method is used to upload a media file to be associated with a previously specified
submission. The media needs to be one of .M4A, .M4B, .M4V, .WAV, .MP3, .RM, .RA,
.WMV, .WMA, .FLV, .MP4, .F4V, .ASF, .AVI, .MPG, .M2T, .MTS, .AIFF, or .MOV.
X-ASTid | This is the AST ID of the submission to associate the media file with. |
filename | This is media file to be associated with the submission. |
With this method however the two parameters need to be passed in the headers (as well as the method header) instead of via JSON. e.g.
Authorization: Bearer AM_iyJgcpRwswbm9acZu3GCb2DkZArUrViAwvOpYgv
IHA7eqK-RLb3iaY3ia9rzNtlsG6pJFJ8XkD2c-51XIgl25pMOXtHUx0Q6aFbt3u58g
Content-Type: multipart/form-data; boundary=$boundary
Content-Length: 5332767
X-ASTid: 1446782006ljdoe
filename: 496B1ADC-4FD5-444C-8550- C611CAE8B045.mp4
method: add_media
Returns:
201 | Media uploaded |
401 | Not authorized |
404 | AST ID not found |
500 | Request not properly formatted |
A successful response would return the uploaded_id to which media was added. e.g.:
HTTP/1.1 201 OK
{
"uploaded_id": "1446782006ljdoe"
}
2.9. add_transcript
This method is used to upload a transcript file to be associated with a previously specified submission. The media needs to be .TXT.
X-ASTid | This is the AST ID of the submission to associate the media file with. |
filename | This is transcript file to be associated with the submission. |
With this method however the two parameters need to be passed in the headers (as well as the method header) instead of via JSON. e.g.
Authorization: Bearer AM_iyJgcpRwswbm9acZu3GCb2DkZArUrViAwvOpYgv
IHA7eqK-RLb3iaY3ia9rzNtlsG6pJFJ8XkD2c-51XIgl25pMOXtHUx0Q6aFbt3u58g
Content-Type: multipart/form-data; boundary=$boundary
Content-Length: 8362767
X-ASTid: 1446782006ljdoe
filename: 496B1ADC-4FD5-444C-8550- C611CAE8B045.txt
method: add_transcript
Returns:
201 | Transcript uploaded |
401 | Not authorized |
404 | AST ID not found |
500 | Request not properly formatted |
A successful response would return the uploaded_id to which media was added. e.g.:
HTTP/1.1 201 OK
{
"uploaded_id": "1446782006ljdoe"
}
2.10. update
Prior to transcription commencing some values of the submission may be changed. The
following parameters may be updated via this method. At least one parameter and the
ASTid must be supplied.
ASTid | This is the AST ID of the submission to update. |
App |
The application can be changed: e.g. Captioning, Transcription, or Production. |
Description |
The description presented to the user in lieu of the basename of the media file can be changed. The database field is 255 characters in length – anything beyond 255 characters will be truncated. |
Language |
The language can be changed: English, Spanish, Mixed Spanish/English, French or German. |
ResultReview |
The flag to specify if extra charge Result Review should be added to this submission (Y or N) can be changed.
If present for any application type other than Captioning, it will be ignored. |
Rush |
This is the flag to specify which transcription SLA should be used. Normally the default priority associated with the account is used to determine the SLA. This can be used to override that default. Note that the account must allow the selected SLA level and for Prepaid accounts, sufficient prepaid credits must be present. The permitted SLAs for the user can be found via the submissions->get_transcription_options method. Presently values may include L (4 Business Day), T (2 Business Day), R (1 Business Day), H (8 Hour), as well as a more generic Y (default expedited transcription for account), and N (default non expedited transcription for account). This does not apply if you are providing your own transcript. |
Notes |
Notes to help the transcriber regarding the spelling of proper names, speaker ID formats, etc. can be changed. If there are enabled Persistent Notes to the Transcriber configured on your account, these will be added to each submission first, followed by the content in Notes. |
Offset |
The offset timecode for broadcast outputs for Captioning submissions in the format hh:mm:ss:ff can be changed. |
Returns:
200 | Submission updated |
401 | Not authorized |
404 | AST ID not found |
409 | Update no longer permitted |
500 | Request not properly formatted |
A successful response would return the updated_id of the submission updated. e.g.:
HTTP/1.1 200 OK
{
"updated_id": "1446782006ljdoe"
}
An unsuccessful response would contain error and error_description e.g.:
HTTP/1.1 409 Conflict
{
"error": "AST ID can no longer be updated",
"error_description": "The submission 1233434354test can no
longer be updated."
}
2.11. cancel
Prior to transcription commencing, a submission may be cancelled. This method is used
to cancel.
ASTid | This is the AST ID of the submission to cancel. |
Returns:
200 | Submission cancelled |
401 | Not authorized |
404 | AST ID not found |
409 | Cancel no longer permitted |
500 | Request not properly formatted |
A successful response would return the cancelled_id of the submission updated. e.g.:
HTTP/1.1 200 OK
{
"cancelled_id": "1446782006ljdoe"
}
An unsuccessful response would contain error and error_description e.g.:
HTTP/1.1 409 Conflict
{
"error": "AST ID can no longer be cancelled",
"error_description": "The submission 1233434354test can no
longer be canceled."
}
2.12. get_details
This is used to get detailed info about a particular submission.
ASTid | This is the AST ID of the submission to get details for. |
Returns:
200 | Details are provided |
401 | Not authorized |
404 | AST ID not found |
500 | Request not properly formatted |
A successful response would contain submission id, original_id, description, media_file, transcript_file, language, batch_id, purchase_order, trans_priority, duration, video_encoding_type, list_item_id, callback_url, callback_result, app, status, captions_billable, transcription_billable, video_encoding_billable, result_desc, notes_to_transcriber, when_created, when_updated, when_transcribed, and result_files_requested data:
HTTP/1.1 200 OK
{
"submission": [
{
"id": "1446782006ljdoe",
"original_id": "",
"description": "ENG210 Lecture 10",
"media_file": "496B1ADC-4FD5-444C-8550-C611CAE8B045.mp4",
"transcript_file": "1446782006ljdoe.txt",
"language": "English",
"batch_id": "",
"purchase_order": "",
"trans_priority": "2 Business Day",
"duration": "43",
"video_encoding_type": "none",
"list_item_id": "14569",
"callback_url": "https://podcastproducer.org/?item=496B1ADC-
4FD5-444C-8550-C611CAE8B045",
"callback_result": "200",
"app": "Captioning",
"status": "Succeeded",
"captions_billable": "Y",
"transcription_billable": "Y",
"video_encoding_billable": "N",
"result_desc": "Sync succeeded.",
"notes_to_transcriber": "",
"when_created": "2015-08-10 19:12:02",
"when_updated": "2015-08-11 21:02:58",
"when_transcribed": "2015-08-11 21:00:05",
"result_files_requested": "vtt,adb.dfxp,vtt,scc"
}
]
}
2.13. get_results
This method is used to get the results for a particular submission.
ASTid | This is the AST ID of the submission to get results. |
ResultType | The extension of the results needed. e.g vtt |
Returns:
200 | Results forthcoming |
401 | Not authorized |
404 | AST ID not found |
409 | Submission not ready or result type not available |
500 | Request not properly formatted |
A successful response returns the result file with the standard download headers
rather than JSON encoded results. e.g.:
HTTP/1.1 200 OK
Content-type: application/octet-stream
Content-Disposition: attachment; filename="496B1ADC-4FD5-444C-
8550-C611CAE8B045.vtt"
Content-Transfer-Encoding: BASE64
An unsuccessful response would contain error and error_description e.g.:
HTTP/1.1 409 Conflict
{
"error": "Result type not requested in submission",
"error_description": "scc was not one of the outputs requested
in submission 1233434354test."
}
2.14. get_smart_player_url
This method is used to get a AST Smart Player URL for a specified submission. The
submission of interest must have been submitted via List of URLs and the media file
must be MP4, MP3, M4V or F4V.
ASTid | This is the AST ID of the submission to generate a link to AST's Smart Player. |
Returns:
200 | Smart Player URL is provided |
401 | Not authorized |
404 | AST ID not found |
409 | Submission not eligible for Smart Player |
500 | Request not properly formatted |
A successful response would return the smart_player_url of the submission of interest. e.g.:
HTTP/1.1 200 OK
{
"smart_player_url": "
http://smartplayer.captionsync.com/play.php?vid=1233434354test_789AE1"
}
An unsuccessful response would contain error and error_description e.g.:
HTTP/1.1 409 Conflict
{
"error": "Submission does not have list of URLs with correct media",
"error_description": "The submission 1233434354test cannot have
a Smart Player URL generated as it was not submitted via
List of URLs and/or the media is not MP4, MP3, M4V or F4V."
}
3. List of URLs
The following methods are available for List of URLs.
list
create
update
retry_fetching
get_detail
A JSON POST is required to the following URL:
https://api.automaticsync.com/v1/lists
with the Authorization header containing the access token determined in Section 1, e.g.
Authorization: Bearer AM_iyJgcpRwswbm9acZu3GCb2DkZArUrViAwvOpYgv
IHA7eqK-RLb3iaY3ia9rzNtlsG6pJFJ8XkD2c-51XIgl25pMOXtHUx0Q6aFbt3u58g
e.g.
{ "method": "create",
"params": {
"Description": "List of ENG 210 videos",
"Rush": "Y",
"App": "Transcription",
"ListItem": [
{
"URL": "https://podcastproducer.org/lectures/4FD5-444C-8550-
C611C.mp4"
},
{
"URL": "https://podcastproducer.org/lectures/4B2A-B031-DC93-
89CC1.mp4"
}
]
}
would create a new list of URLs with two items with rush transcription for Transcription Only.
HTTP/1.1 200 OK
{
"new_list_id": "44678"
}
3.1. list
This method is used to find lists for the current selected user within the scope of the session (i.e. the particular partner type). Multiple parameters are treated as a logical AND. At least one parameter must be specified.
Limit | This is a maximum number of results to return. An offset may optionally prepended, e.g. If making calls in pages of 50, the third page of results would have an offset of 100, i.e. 100, 50 |
SortBy |
This is comma delimited list of the fields to sort on. language, app, when_created, description |
Created |
This is a date in the ISO format of YYYY-MM-DD. |
URL | This is the URL to media submitted. |
Description | This uses a like match parameter on the trailing end to deal with datestamp suffixes appended for uniqueness. |
Returns:
200 | Lists are provided |
401 | Not authorized |
404 | No results found |
500 | Request not properly formatted |
A successful response would contain an array of list_id, description, language, trans_priority, app, and when_created data for the list and list_item_id , url , status_code, checked, is_good, callback_url and status_url for each list item.
A successful response would look like:
HTTP/1.1 200 OK
{
"lists": [
{
"list_id": "44678",
"description": "ENG210 Lectures",
"list_items": [
{
"list_item_id": "192678",
"url": "https://podcastproducer.org/lectures/4FD5-444C-
8550-C611C.mp4"
"status_code": "200",
"checked": "Y",
"is_good": "Y",
"callback_url": "https://podcastproducer.org/?item=
496B1ADC-4FD5-444C-8550-C611CAE8B045",
"status_url": "https://podcastproducer.org/status/?item=
8850-C611CAE8B045"
},
{
"list_item_id": "192679",
"url": "https://podcastproducer.org/lectures/4B2A-B031-
DC93-89CC1.mp4"
"status_code": "404",
"checked": "Y",
"is_good": "Y",
"callback_url": "https://podcastproducer.org/?item=
496B1ADC-4FD5-444C-8550-C68989E",
"status_url": "https://podcastproducer.org/status/?item=
8850-C68989E"
}
],
"language": "English",
"trans_priority": "2 Business Day",
"app": "Captioning",
"when_created": "2015-08-11 21:02:58"
}
]
}
3.2. create
This method is used to create a new List of URLs with the follow parameters.
App |
This can be one of the valid application types associated with your account:e.g. Captioning, Transcription, or Production. If not present, the submission will inherit the default set via the web UI. |
Description |
This is used for your tracking purposes and will be presented to the user to describe the list. If you select This description needs to be unique, though CaptionSync will try to robustly rename the description by appending timestamps if it is not. The database field is 250 characters in length – anything beyond 250 characters will be truncated. |
Notes |
These are notes to help the transcriber regarding spelling of proper names, speaker ID formats, etc. If there are enabled Persistent Notes to the Transcriber configured on your account, these will be added to each list item first, followed by the content in Notes. |
PersistentNote |
This specifies the integer ID of the persistent note to the transcriber to be used, or 0 if no persistent note to The existing notes for the user can be found via the submissions->get_persistent_notes method. |
TransExpert |
This specifies the integer ID(s) of the transcriber expertise area to be used, or 0 if no persistent note to The transcriber expertise areas for the user can be found via the submissions->get_transcriber_expertise_options method. |
Language |
This can be one of the valid languages associated with your account: e.g. English, French, Spanish, or Mixed Spanish/English. If not present, the list items will inherit the default set via the web UI. |
Rush |
This is the flag to specify which transcription SLA should be used. Normally the default priority associated with the account is used to determine the SLA. This can be used to override that default. Note that the account must allow the selected SLA level, and for Prepaid accounts, sufficient prepaid credits must be present. The permitted SLAs for the user can be found via the submissions->get_transcription_options method. Presently values may include L (4 Business Day), T (2 Business Day), R (1 Business Day), H (8 Hour), as well as a more generic Y (default expedited transcription for account), and N (default non expedited transcription for account). |
ResultReview |
This is the flag to specify if extra charge Result Review should be added to the submissions in this list (Y or N).The default is N. Note that for Prepaid accounts, sufficient prepaid credits must be present. If present for any application type other than Captioning, it will be ignored. If not present, the Result Review default set via the web UI will be used. |
Batch |
This is the flag to specify that the list items should be grouped together as a batch for reporting and |
Offset |
This is used to specify offset timecode for broadcast outputs for Captioning application types in the format hh:mm:ss:ff. If not present, the default offset timecode associated with the account is used. If present for any application type other than Captioning, it will be ignored. |
PO |
This is the purchase order number for the list for accounts set up as requiring purchase orders. If not present, the list will inherit the default or most recently used valid purchase order for the account via the web UI. Keep in mind that the purchase order number needs to be nicely named -- no spaces, punctuation, or high ASCII characters please. |
ListItem | Each list item must have a URL parameter and may optionally have a CallBack , Basename, and StatusURL parameters. At least one ListItem is required. |
URL |
This tells AST where to get the media file from, and what type it is. In general the URL needs to This URL needs to be properly encoded e.g. %20 for SPACE. This needs to be less than 1024 characters in length. |
CallBack |
This tells AST where to send results files back to via HTTP or HTTPS POST with a Content-Transfer-Encoding of binary. This needs to be present with an approved PartnerType, otherwise this will be ignored. AST needs to approve your PartnerType in conjunction with the CallBack for any result posting to take place. This callback URL needs to be properly encoded e.g. %20 for SPACE. This also needs to be less than 512 characters in length. If you need more than one result type returned for the submission and/or you need to differentiate between different types of result files posted back (e.g. a caption file and transcript file) an additional {fileType} macro also needs to be present in the callback URL so that different posts can be completed for each result file. This could result in posts URLs like: https://67.34.4.22/bio1/closedCaptioning?id=1283232 The specific file types of the macro expansion (e.g., closedCaptioning, transcript, etc.) will need to be configured by AST. Alternatively, the type of results files can be handled by different MIME types, which will need to be configured by AST. |
Basename |
This tells AST how to name the media file basename (which is used as a description in the submission It needs to be nicely named and less than 128 characters -- no spaces, punctuation, or high ASCII characters please. |
StatusURL |
This tells AST where to send status information back via HTTP or HTTPS POST with a Content-Transfer-Encoding of binary for a particular list item. This call back URL needs to be properly encoded e.g. %20 for SPACE. In addition, XML encoding may be required. For example The tag also needs to be less than 512 characters in length. The status information will be directly posted back to the specified URL as a raw POST with a MIME type of text/xml (note that there will not be any form URL encoding). The information will be presented in the following manner: <StatusUpdate> The status callback will be sent as soon as a fatal error occurs, but in general as far enough into the ingest processing to know that it is on track to succeed. For example if a 404 error occurs when attempting to fetch the media file, the status callback will be sent at that point. Otherwise the system will not send the status callback until the file has been fetched, audio processing has been completed and an AST ID has been assigned. Type The tag will be one of Initial or Update. A status callback of the type of Update will only occur where a submission which was successfully ingested, subsequently fails or is rejected (the result will be FAILURE). Result The tag will be one of IN_PROCESS, NOT_INGESTED, or FAILURE. A status callback with a result of FAILURE will only occur where a submission, which was successfully ingested, subsequently fails or is rejected (the type will be Update). e.g. The transcriber tells us there is just silence in the audio: <StatusUpdate> ASTid If the submission was successfully ingested, this tag will reference the unique AST ID that has been assigned to the submission. The tag will not be present for the Result of NOT_INGESTED. ASTstatus If the submission was successfully ingested, this tag will reference the current status of the submission. Possible statuses include "Awaiting Transcription" and "Rejected Audio". The tag will not be present for the Result of NOT_INGESTED. ErrDetail The tag will only be present for the Result of NOT_INGESTED and FAILURE. e.g. <StatusUpdate> It is important to consider the possibility that the callback itself fails and no status information about the list item is received (e.g. 500 Internal Server Error). If no status information is received, it is important not to make assumptions about the status, rather further investigation is required. |
Returns:
201 | List created |
401 | Not authorized |
500 | Request not properly formatted |
A successful response would return the new_list_id of the List of URLs created. e.g.:
HTTP/1.1 200 OK
{
"new_list_id": "46782"
}
An unsuccessful response would contain error and error_description e.g.:
HTTP/1.1 401 Unauthorized
{
"error": "Access Denied",
"error_description": "The token is not authorized to create a
List of URLs."
}
3.3. update
Prior to transcription commencing some values of the list may be changed. The following parameters may be updated via this method. At least one parameter and the List ID must be supplied.
Listid | This is the List of URLs ID to update. |
App |
The application can be changed: e.g. Captioning, Transcription, or Production. |
Description | The description presented to the user in lieu of the basename of the media file can be changed. The database field is 255 characters in length – anything beyond 255 characters will be truncated. |
Language |
The language can be changed: e.g. English, French, Spanish, or Mixed Spanish/English. |
ResultReview |
The flag to specify if extra charge Result Review can be changed for submissions in this list (Y or N). Note that for Prepaid accounts, sufficient prepaid credits must be present. If present for any application type other than Captioning, it will be ignored. |
Batch |
The flag to specify that the list items should be grouped together as a batch for reporting and collecting of results can be changed (all results for a particular batch are zipped together for retrieval via SFTP or the web UI and will use the cleansed value of Description as the batch identifier). Values are (Y or N). If not present, the list items will not be grouped together as a batch. |
Rush |
This is the flag to specify which transcription SLA should be used. Normally the default priority associated with the account is used to determine the SLA. This can be used to override that default. Note that the account must allow the selected SLA level and for Prepaid accounts, sufficient prepaid credits must be present. The permitted SLAs for the user can be found via the submissions->get_transcription_options method. Presently values may include L (4 Business Day), T (2 Business Day), R (1 Business Day), H (8 Hour), as well as a more generic Y (default expedited transcription for account), and N (default non expedited transcription for account). |
Notes |
Notes to help the transcriber regarding the spelling of proper names, speaker ID formats, etc. can be changed. If there are enabled Persistent Notes to the Transcriber configured on your account, these will be added to each submission first, followed by the content in Notes. |
Offset |
This is used to specify offset timecode for broadcast outputs for Captioning application types in the format hh:mm:ss:ff can be changed. |
Returns:
200 | List updated |
401 | Not authorized |
404 | List ID not found |
409 | Update no longer permitted |
500 | Request not properly formatted |
A successful response would return the updated_list_id of the list updated. e.g.:
HTTP/1.1 200 OK
{
"updated_list_id": "44678"
}
An unsuccessful response would contain error and error_description e.g.:
HTTP/1.1 40404 Not Found
{
"error": "List to update not found",
"error_description": "List ID 44678 was not found to be updated."
}
3.4. retry_fetching
This method is used to retry fetching URLs for a specified list where the client had insufficient prepaid balance or the URL was not yet ready to be retrieved. This method will not work for the case where the URL is incorrect as the URLs cannot be changed, only retried.
ListID | This is the List ID of the List of URLs to retry fetching. |
Returns:
200 | List set to be refetched |
401 | Not authorized |
404 | List ID not found |
409 | No eligible list items for refetching |
500 | Request not properly formatted |
A successful response would return the list_id_to_retry of the list. e.g.:
HTTP/1.1 200 OK
{
"list_id_to_retry": "44678"
}
3.5. get_details
This is used to get detailed info about a particular List of URLs.
Listid | This is the List ID of the List of URLs to get details for. |
Returns:
200 | Details are provided |
401 | Not authorized |
404 | AST ID not found |
500 | Request not properly formatted |
A successful response would contain the list's list_id, description, language, app, batch_id, purchase_order, trans_priority, video_encoding_type, notes_to_transcriber, when_created, when_updated, result_files_requested, plus an array of list_item_id , url , status_code, checked, is_good, callback_url, status_url of the list items and an array of submissions of the list items submission_id, original_id, description, status, duration and language:
HTTP/1.1 200 OK
{
"list":
{
"list_id": "44678",
"description": "ENG210 Lectures",
"language": "English",
"app": "Captioning",
"batch_id": "",
"purchase_order": "",
"trans_priority": "2 Business Day",
"video_encoding_type": "none",
"notes_to_transcriber": "",
"when_created": "2015-08-10 19:12:02",
"when_updated": "2015-08-11 21:02:58",
"result_files_requested": "vtt,adb.dfxp,vtt,scc"
"list_items": [
{
"list_item_id": "89878",
"url": "https://podcastproducer.org/lectures/4FD5-444C-
8550-C611C.mp4"
"status_code": "200",
"checked": "Y",
"is_good": "Y",
"callback_url": "https://podcastproducer.org/?item=
496B1ADC-4FD5-444C-8550-C611CAE8B045",
"status_url": "https://podcastproducer.org/status/?item=
8850-C611CAE8B045",
"submissions": [
{
"submission_id": "1233434354test",
"original_id": "",
"description": "ENG210 Lecture 10",
"status": "Failed",
"duration": "23"
"language": "English"
},
{
"submission_id": "13487834354test",
"original_id": "1233434354test",
"description": "Redo: NG210 Lecture 10",
"status": "Succeeded",
"duration": "23"
"language": "English"
}
]
},
{
"list_item_id": "89879",
"url": "https://podcastproducer.org/lectures/4B2A-B031-
DC93-89CC1.mp4"
"status_code": "200",
"checked": "Y",
"is_good": "N",
"callback_url": "https://podcastproducer.org/?item=
496B1ADC-4FD5-444C-8550-C611CAE8B045",
"status_url":
"https://podcastproducer.org/status/?item=496B1ADC-
4FD5-444C-8550-C611CAE8B045"
}
]
}
}
Note that this article corresponds to "RESTful API v1.3.1.pdf".
Comments
0 comments
Please sign in to leave a comment.