Queue Management API
Release 1.11 introduced a Queue Management API that provides programmatic control for client applications to:
- Determine the number of items its processing queue, by processing state
- Get a list of all jobs in the queue, by processing state
- Remove jobs from its queue; by specific Job ID or based on a time range
Queue Summary Call
The method getContentConvertCounts returns the counts for all jobs by status. Status codes are only listed if one or more jobs exist in that state.
Possible Return Values: OK (200), BAD_CLIENT_APPLICATION_CREDENTIALS (501), GENERAL_ERROR (599)
Example Request
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:getContentConvertCountsRequest
xmlns:ns2="http://www.yospace.com/tundra/ContentService/">
<clientApplicationId>petshow</clientApplicationId>
<clientApplicationCredentials>Wf</clientApplicationCredentials>
</ns2:getContentConvertCountsRequest>
</soap:Body>
</soap:Envelope>
Example Response
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:getContentConvertCountsResponse
xmlns:ns2="http://www.yospace.com/tundra/ContentService/">
<contentConvertCount>
<count>12</count>
<jobStatus>0</jobStatus>
</contentConvertCount>
<contentConvertCount>
<count>2</count>
<jobStatus>1</jobStatus>
</contentConvertCount>
<contentConvertCount>
<count>3</count>
<jobStatus>4</jobStatus>
</contentConvertCount>
</ns2:getContentConvertCountsResponse>
</soap:Body>
</soap:Envelope>
Queued Jobs Call
The method getContentConvertsPerState all jobs within the queue with their current status.
Possible Return Values: OK (200), BAD_CLIENT_APPLICATION_CREDENTIALS (501), GENERAL_ERROR (599)
Example Request
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:getContentConvertsPerStateRequest
xmlns:ns2="http://www.yospace.com/tundra/ContentService/">
<clientApplicationId>petshow</clientApplicationId>
<clientApplicationCredentials>Wf</clientApplicationCredentials>
</ns2:getContentConvertsPerStateRequest>
</soap:Body>
</soap:Envelope>
Example Response
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:getContentConvertsPerStateResponse
xmlns:ns2="http://www.yospace.com/tundra/ContentService/">
<contentConvertsPerState>
<jobStatus>0</count>
<jobId>4832821</jobStatus>
</contentConvertsPerState>
<contentConvertsPerState>
<jobStatus>0</count>
<jobId>483728</jobStatus>
</contentConvertsPerState>
<contentConvertsPerState>
<jobStatus>2</count>
<jobId>483822</jobStatus>
</contentConvertsPerState>
</ns2:getContentConvertsPerStateResponse>
</soap:Body>
</soap:Envelope>
Remove Single Job from Queue Call
The method deleteContentConversion will accept a Job ID as a paramter and will remove this job from the queue provided that it has not entered the REQUESTED_FOR_PROCESSING or PROCESSING states.
Possible Return Values: OK (200), BAD_CLIENT_APPLICATION_CREDENTIALS (501), BAD_JOB_ID (508), BAD_JOB_STATE (518), CLIENT_APPLICATION_DOES_NOT_OWN_JOB (532), GENERAL_ERROR (599)
Example Request
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:deleteContentConversionRequest
xmlns:ns2="http://www.yospace.com/tundra/ContentService/">
<clientApplicationId>petshow</clientApplicationId>
<clientApplicationCredentials>Wf</clientApplicationCredentials>
<jobId>438214</jobId>
</ns2:deleteContentConversionRequest>
</soap:Body>
</soap:Envelope>
Example Response
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:deleteContentConversionResponse
xmlns:ns2="http://www.yospace.com/tundra/ContentService/">
<status>200</status>
</ns2:deleteContentConversionResponse>
</soap:Body>
</soap:Envelope>
Delete Multiple Jobs Call
Using the deleteContentConversions method, it is possible remove multiple jobs from the queue in a single call. You supply a timeframe and all jobs submitted within the timeframe are removed, provided they have not already begun processing (REQUESTED_FOR_PROCESSING or PROCESSING states).
The timeframe is specified using the deleteFrom and deleteTo parameters. The deleteTo parameter is optional; if you do not specify it, all jobs that were submitted after the deleteFrom timestamp to the present will be removed.
Dates are specified in the format as determined by xsd:dateTime which follows the form defined by Chapter 5.4 in ISO 8601, which is:
CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]
The time zone may be specified as Z (UTC) or (+|-)hh:mm. Time zones that aren't specified are considered undetermined.
Example valid timestamps are:
- 2009-10-26T21:32:52
- 2009-10-26T21:32:52+02:00
- 2009-10-26T19:32:52Z
- 2009-10-26T19:32:52+00:00
Possible Return Values: OK (200), BAD_CLIENT_APPLICATION_CREDENTIALS (501), GENERAL_ERROR (599)
Example Request
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:deleteContentConversionsRequest
xmlns:ns2="http://www.yospace.com/tundra/ContentService/">
<clientApplicationId>petshow</clientApplicationId>
<clientApplicationCredentials>Wf</clientApplicationCredentials>
<deleteFrom>2009-10-26T19:32:52Z</deleteFrom>
<deleteTo>2009-10-26T20:32:52Z</deleteTo>
</ns2:deleteContentConversionsRequest>
</soap:Body>
</soap:Envelope>
Example Response
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:deleteContentConversionsResponse
xmlns:ns2="http://www.yospace.com/tundra/ContentService/">
<status>200</status>
</ns2:deleteContentConversionsResponse>
</soap:Body>
</soap:Envelope>
