More Content Management

This section describes how to:

  • delete content, or variants of content, from yospaceCDS
  • add a new error domain
  • determine the status of a conversion job

Delete Requests

A delete request, supported with the appropriate submitter ID removes content from yospaceCDS. yospaceCDS queues the job on the server and issues a notification (success or failure, like uploads) to the call-back URL nominated in the request.

The delete requests are synchronous so no notification URLs are needed.

Types of Delete Requests

There are three types of deletion, in each case restricted to the specified content.

  • Content deletion
    A cascade-style delete that removes all content: the canonical data and all of its variants
  • Variant deletion
    Deletes the specified variant of the content
  • Canonical deletion
    Deletes the canonical content (but leaves any variants intact)

Each of the delete methods behaves slightly differently-see the following section for details. All three methods are initiated in the same way, except for the request fields that you include in the request

Content Deletion (Delete All)

If you choose to delete all content, then you are effectively removing all variants of the specified content from the system. This is similar to a classical “cascade delete,” because it deletes the canonical, uploaded content and all the variants that have been derived from it.

Delete Variant

You can specify a single variant to delete. Unlike “deleting all” described above, this only removes the nominated variant (which may be a particular format, for example) of the content.

Delete Canonical Content

You can remove the uploaded, canonical content. This leaves any variants of the content unaffected.

Delete Request Fields

The following fields should be included in the delete request:

Client Application ID & Credentials

Delete access to yospaceCDS is restricted in the same way as upload requests. See Client Application ID & Credentials for details.

Content ID

This is the reference that was provided when you originally uploaded the content. For content deletion, the original upload data is deleted, together with all conversions that were made from it. For variant deletion, the content ID, combined with the variant and conversion IDs, identifies which variant is to be removed.

Address Type

The Address Type field is only needed for variant deletion.

Currently the only address type supported is m.

Restricted Flag

The Restricted Flag field is only needed for variant deletion.

The flag’s value is either true or false.

Conversion ID

The Conversion ID field is only needed for variant deletion.

This is the unique ID for the conversion script that was used to create the variant you are deleting.

Variant ID

The Variant ID field is only needed for variant deletion.

This identifies the specific variant you want to delete. This ID was provided by yospaceCDS in its success notification when the conversion was performed

Delete Request Return Codes

Code Meaning
200 OK
The content was deleted.
501 Bad Credentials
Your client application isn’t recognised or authorised to delete content.
503 Bad Content ID
The CDS was unable to find the media content requested. Check that the ID matches the one YospaceCDS supplied when the content was originally uploaded or converted.
504 Bad Address Type
You used an unrecognised address type (normally this should be m).
528 Client Application Does Not Own the Content
The content can only be deleted by its owner.
599 General Error
The delete operation failed.

Example Delete Request and Response

This example deletes the content uploaded in the submit example earlier in this document.

<soap:Envelope
     xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
   
<ns2:contentDeleteRequest
       xmlns:ns2="http://www.yospace.com/tundra/ContentService/">
     
<clientApplicationId>petshow</clientApplicationId>
<clientApplicationCredentials>Wf</clientApplicationCredentials>
     
<contentIdentifier>1/2/3/4/adsd/petshow</contentIdentifier>
<addressType>m</addressType>
   
</ns2:contentDeleteRequest>
</soap:Body>
</soap:Envelope>

This example is deleting content using the content ID (as opposed to a specific variant). This will cause a cascade-style delete, which removes all the content (canonical and variant).

Note that the addressType field is set to m, indicating Managed Content. Currently this is the only addressType supported by CDS. New values of addressType may be added in future releases.  The addressType field is mandatory.

yospaceCDS replies with a deletion response indicating that the media has been successfully deleted:

<soap:Envelope
   
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
   
<ns2:contentDeleteResponse
        xmlns:ns2="http://www.yospace.com/tundra/ContentService/">
     
<status>200</status>
   
</ns2:contentDeleteResponse>
  </soap:Body>
</soap:Envelope>

Conversion Status Request

When you submit a request for a conversion (see Conversion Request), the conversion job is added to the job queue-it is scheduled but often will not begin immediately. You can send a conversion status request to yospaceCDS to discover how any job that is currently held in the queue is progressing.

It is important to understand that you cannot use this method to determine the status of a job that is no longer in the queue. A job that has successfully completed-or one that has been processed, but which failed to complete-will not return a status in response to a conversion status request. Instead, you'll receive a "bad ID" error, because yospaceCDS won't be able to find that job in the queue. Under normal circumstances, always check the notifications that you have received before using the status request-see Conversion Completion Notification for details.

Conversion Status Request Fields

The following three fields are all mandatory when submitting a conversion status request.

Client Application ID & Credentials

Status queries are restricted in the same way as upload requests. See Client Application ID & Credentials for details.

Job ID

The job ID uniquely identifies the conversion request. When you originally submitted the conversion request, yospaceCDS responded with a unique ID for that job—see Job ID.

Conversion Status Request Return Codes

yospaceCDS responds to the conversion status request with two values: one, status, indicates the success of the request itself, and the other, jobStatus, shows the current status of the job. The values of these return codes are shown below:

Status Code Meaning
200 OK
The status request was successful—the accompanying jobStatus value shows the actual status of the job you specified (see below).
508 Bad Job ID
The ID you provided did not match any jobs on the queue.
Note:
A successfully completed job (or one which was processed, but which failed to complete) will no longer be in the job queue, so requesting its status will result in this error (see discussion above).
599 General Error
The request failed.
jobStatus Code Meaning
0 Pending
The job belongs to a batch which has not yet started. The job will not be available for processing until a Start Batch request is issued, and its prerequisite jobs have completed.
1 Available For Processing
The job is in the queue, waiting to be processed.
2 Requested For Processing
The job has been requested by a processor and will be processed immediately.
3 Processing
A processor has begun execution of the job.
4 Job Succeeded, Still in Queue
Typically this indicates that the job has successfully completed but has not been removed from the queue because it is part of a batch which contains other jobs that have not yet completed.
5 Job Failed, Still in Queue
Typically this indicates that the job failed to complete, but has not been removed from the queue because it is part of a batch which contains other jobs that have not yet completed.
6 Job Succeeded Notification Failed
The job was successfully completed but the notification request failed to reach the success URL.
See page 23, Success and Failure Notification URLs for details.
7 Job Failed Notification Failed
The job failed to complete and the notification request failed to reach the failure URL.

Example Conversion Status Request and Response

The following request is querying the status of job 15189. This job ID was provided in the response to the initial conversion request.

<soap:Envelope
   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:getContentConvertStatusRequest
        xmlns:ns2="http://www.yospace.com/tundra/ContentService/">
     
<clientApplicationId>petshow</clientApplicationId>
<clientApplicationCredentials>Wf</clientApplicationCredentials>
     
<jobId>15189</jobId>
   
</ns2:getContentConvertStatusRequest>
</soap:Body>
</soap:Envelope>

The response looks like this:

<soap:Envelope
         xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
   
<ns2:getContentConvertStatusResponse
        xmlns:ns2="http://www.yospace.com/tundra/ContentService/">
     
<status>200</status>
<jobStatus>0</jobStatus>
   
</ns2:getContentConvertStatusResponse>
</soap:Body>
</soap:Envelope>

This indicates that the status query was successful (return code for status is 200, which is OK) and that job 15189 is still waiting to be processed (return code for jobStatus is 0).