DELETE imcc/v1/import/record/
Delete an import record(s) task. You can only delete an import task with the same user access token used to create it. Note that you can only stop the import if it hasn't already started.
Resource URL
https://{MEDIACONTROLCENTRE_HOST}[:PORT]/imcc/v1/import/record/
Resource Information
Response formats | XML |
Requires authentication? | Yes (user context only) |
Required scope | modifyUsersData |
Parameters
GUID
required
GUID of import record task.
Response
Returns state of the import task prior to deletion or standard error response on failure.
Note that if the import was already in progress then records will still be added/updated but then the task will be removed.
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 DELETE https://{MEDIACONTROLCENTRE_HOST}[:PORT]/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="1" Type="2">
<Progress>10.5</Progress>
</DatabaseJob>
</Response>