GET imcc/v1/import/record/
Retrieve progress of an import record(s) task. You can only retrieve progress of an import task with the same user access token used to create it.
Resource URL
https://{MEDIACONTROLCENTRE_HOST}[:PORT]/imcc/v1/import/record/
Resource Information
Response formats | XML |
Requires authentication? | Yes (user context only) |
Required scope | readUsersData |
Parameters
GUID
required
GUID of import record task.
Response
Returns progress of the import task or standard error response on failure.
Note that DatabaseJob State can be:- 0 - Waiting, 1 - Processing, 2 - Completed, 3 - Failed.
DatabaseJob Type will always be 2 for import record tasks.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<DatabaseJob GUID="" State="2" Type="2">
<Progress></Progress><!-- Progress for this task as a percentage-->
<Error>
<Message></Message><!-- Error message filled in if there's a failure -->
<Details></Details><!-- Further error details if there are any -->
</Error>
<Import><!-- Note that even if the import fails this may include details of any records which were successfully imported -->
<NumRecords></NumRecords><!-- Number of records which are being added/updated-->
<ImagenRecords>
<ImagenRecord ID=""><!-- list of ImagenRecords that have been added/updated with their ID and any added/modified MediaObjects-->
<MediaObjects>
<MediaObject ID="" />
<StoreJob ID="" /><!-- ID of ingest job created when the media object was imported-->
</MediaObjects>
</ImagenRecord>
</ImagenRecords>
</Import>
<FailedImport>
<NumRecords></NumRecords><!-- Number of records which failed to import-->
<FailedImagenRecords>
<ImagenRecord ID=""><!-- list of ImagenRecords that failed to import-->
<ImportErrorCode></ImportErrorCode><!-- Error code -->
<ImportError></ImportError><!-- Details of why this record failed to import -->
<MediaObjects>
<MediaObject ID="" />
</MediaObjects>
</ImagenRecord>
</FailedImagenRecords>
</FailedImport>
</DatabaseJob>
</Response>
Example Request
curl -i -H "X-Imagen-API-Key: {APPLICATION API KEY}" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-X GET https://mediacontrolcentre/imcc/v1/import/record/A7162165-CDEB-5E4E-A8AC-22AFF389C9C4
Example Result
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<DatabaseJob GUID="A7162165-CDEB-5E4E-A8AC-22AFF389C9C4" State="2" Type="2">
<Progress>100</Progress>
<Import>
<NumRecords>3</NumRecords>
<ImagenRecords>
<ImagenRecord ID="123456">
<MediaObjects>
<MediaObject ID="125" />
</MediaObjects>
</ImagenRecord>
<ImagenRecord ID="123457">
<MediaObjects>
<MediaObject ID="126" />
</MediaObjects>
</ImagenRecord>
<ImagenRecord ID="123458" />
</ImagenRecords>
</Import>
</DatabaseJob>
</Response>