In this article we provide examples of calls and responses relative to retrieving jobs and retrieving a specific task.
Retrieving jobs
Example of an API call when retrieving jobs using entryVendorTask.getJobs - Kaltura VPaaS API Documentation:
curl -X POST https://www.kaltura.com/api_v3/service/reach_entryvendortask/action/getJobs \
-d "format=1" \
-d "ks=$KALTURA_SESSION" \
-d "filter[objectType]=KalturaEntryVendorTaskFilter"
The ks value here is the app token generated using the vendor PID’s admin secret.
Example of a response when retrieving jobs:
{
"objects": [
{
"id": "364983352",
"partnerId": 4124832,
"vendorPartnerId": 1724132,
"createdAt": 1693206812,
"updatedAt": 1693206812,
"queueTime": 1693206812,
"entryId": "1_8i57m3ju",
"status": 1,
"reachProfileId": 187412,
"catalogItemId": 14482,
"price": 0,
"userId": "user@customer.com",
"accessKey": "zjJ8NDcyNDg0Mnwsbo2yKo0gqgbFqIYNOj0bwxnM1oBt6IBhhN40UZuRgvPAYLThl_7GnAl-A_hCT6FkmdU1tja_hOkVdraj1fa0mhK8HijR3l0aKVvct7tUN47h6brL0VcWmSBi-PIHZCB80O5lKdBEdjt_JOmmRoZOyZBNR3WSjuwT20fmwozFU6ZvLORwfhUKMLh5sus35cw2NnwiYEwqECbWd4gOydurdpxSZYC85lJVbuDSliFCMA==",
"version": 1,
"notes": "TESTING_VIDEO",
"dictionary": "kaltura\nhello\nworld",
"creationMode": 1,
"expectedFinishTime": 1693811612,
"serviceType": 2,
"serviceFeature": 1,
"turnAroundTime": -1,
"objectType": "KalturaEntryVendorTask"
},
],
"totalCount": 1,
"objectType": "KalturaEntryVendorTaskListResponse"
}
The vendor should store the access key returned with each task until this job is delivered.
The access key is necessary to retrieve task details, to download the assets which need to be processed and to upload deliverables.
Retrieving a task
Example of an API call when retrieving a task:
curl -X POST https://www.kaltura.com/api_v3/service/reach_entryvendortask/action/get \
-d "format=1" \
-d "ks=$KALTURA_SESSION" \
-d "id=364983352" \
-d "responseProfile[systemName]=reach_vendor"
The ks value here is the access key of the specific task, the access key is returned with the task as a response to getJobs.
Example of a response when retrieving a task:
{
"id": "364983352",
"partnerId": 4124832,
"vendorPartnerId": 1724132,
"createdAt": 1693206812,
"entryId": "1_8i57m3ju",
"status": 3,
"reachProfileId": 187412,
"catalogItemId": 14482,
"accessKey": "zjJ8NDcyNDg0Mnwsbo2yKo0gqgbFqIYNOj0bwxnM1oBt6IBhhN40UZuRgvPAYLThl_7GnAl-A_hCT6FkmdU1tja_hOkVdraj1fa0mhK8HijR3l0aKVvct7tUN47h6brL0VcWmSBi-PIHZCB80O5lKdBEdjt_JOmmRoZOyZBNR3WSjuwT20fmwozFU6ZvLORwfhUKMLh5sus35cw2NnwiYEwqECbWd4gOydurdpxSZYC85lJVbuDSliFCMA==
",
"version": 1,
"relatedObjects": {
"reach_vendor_catalog_item": {
"objects": [
{
"enableSpeakerId": false,
"serviceType": 2,
"serviceFeature": 1,
"turnAroundTime": 1800,
"engineType": "OpenCalaisReachVendor.OPEN_CALAIS",
"sourceLanguage": "English",
"allowResubmission": false,
"objectType": "KalturaVendorCaptionsCatalogItem"
}
],
"totalCount": 1,
"objectType": "KalturaVendorCatalogItemListResponse"
},
"reach_vendor_profile": {
"objects": [
{
"name": "ASR_Eng_Eng",
"defaultOutputFormat": 1,
"enableMetadataExtraction": true,
"enableSpeakerChangeIndication": false,
"enableAudioTags": false,
"enableProfanityRemoval": true,
"maxCharactersPerCaptionLine": 26,
"labelAdditionForMachineServiceType": "(Auto Generated)",
"labelAdditionForHumanServiceType": "",
"contentDeletionPolicy": 2,
"flavorParamsIds": "",
"vendorTaskProcessingRegion": 1,
"objectType": "KalturaReachProfile"
}
],
"totalCount": 1,
"objectType": "KalturaReachProfileListResponse"
}
},
"objectType": "KalturaEntryVendorTask"
}
Example of a response (error) when retrieving a task without using the access key:
{
"code": "ENTRY_VENDOR_TASK_NOT_FOUND",
"message": "Entry vendor task item with id provided not found [364983352]",
"objectType": "KalturaAPIException",
"args": {
"ID": "364983352"
}
}
Example of a response (error) when the access key is expired:
{
"code": "INVALID_KS",
"message": "Invalid KS \"EXPIRED\", Error \"-1,INVALID_STR\"",
"objectType": "KalturaAPIException",
"args": {
"KSID": "EXPIRED",
"ERR_CODE": "-1",
"ERR_DESC": "INVALID_STR"
}
}
Example of a response (error) when extending the access key for a non-processing task:
{
"code": "CANNOT_EXTEND_ACCESS_KEY",
"message": "Extending accessKey for non processing task is not allowed",
"objectType": "KalturaAPIException",
"args": []
}