Skip to main content
Skip table of contents

Scheduling requests [VC 21.3.1 GEN]

Some resources support that requests are scheduled for later processing. This is done by specifying the field schedule in the request header. The value should be an ISO-8601 compatible timestamp stating the earliest time the request should be processed.

If the specified timestamp already has occurred, the call will proceed as usual. Otherwise HTTP status code 202 (Accepted) will be returned together with the CRLF-delimited triple (timestamp, request id, request URI).

For example, retrieving all metadata fields at a later time:

NONE
GET /metadata-fields HTTP/1.1
Schedule: 2010-07-02T11:55:00+02:00
NONE
HTTP/1.1 202 Accepted

2010-07-02T11:55:00+02:00       802972  http://localhost:8080/API/scheduled-request/802972

States of scheduled requests

There are four states that a scheduled request can be in.

WAITING

The request has been scheduled and is waiting to be processed.

SUCCESS

The request has been processed successfully, by receiving status code 200 (OK).

CONNECTION_FAILURE

The request has been processed, but failed for unknown reasons.

BAD_REQUEST

The request has been processed, but received an unexpected status code.

Managing scheduled requests

List all scheduled requests

GET /scheduled-request

Retrieves all known scheduled requests for the current user.

Query Parameters:
  • state (string) – Retrieve requests belonging to a certain state.

Produces:

Example

NONE
GET /scheduled-request?state=SUCCESS
HTML/XML
<ScheduledRequestListDocument xmlns="http://xml.vidispine.com/schema/vidispine">
  <scheduledRequest>
    <id>802972</id>
    <user>admin</user>
    <state>SUCCESS</state>
    <date>2010-07-02T11:55:00.000+02:00</date>
    <created>2010-07-02T11:54:16.161+02:00</created>
    <executed>2010-07-02T11:55:36.762+02:00</executed>
    <request>
      <uri>http://localhost:8080/API/metadata-field</uri>
      <method>GET</method>
    </request>
    <response>
      <statusCode>200</statusCode>
      <hasBody>true</hasBody>
      <contentType>application/xml</contentType>
    </response>
  </scheduledRequest>
</ScheduledRequestListDocument>

Retrieve a scheduled request

GET /scheduled-request/(request-id)

Retrieves the request that matches the specified id.

Produces:

Example

NONE
GET /scheduled-request/802972
HTML/XML
<ScheduledRequestDocument xmlns="http://xml.vidispine.com/schema/vidispine">
  <id>802972</id>
  <user>admin</user>
  <state>SUCCESS</state>
  <date>2010-07-02T11:55:00.000+02:00</date>
  <created>2010-07-02T11:54:16.161+02:00</created>
  <executed>2010-07-02T11:55:36.762+02:00</executed>
  <request>
    <uri>http://localhost:8080/API/metadata-field</uri>
    <method>GET</method>
  </request>
  <response>
    <statusCode>200</statusCode>
    <hasBody>true</hasBody>
    <contentType>application/xml</contentType>
  </response>
</ScheduledRequestDocument>

Retrieve the response body

GET /scheduled-request/(request-id)/response

Retrieves the response body of the scheduled request. This can only be called if the state of the request is either SUCCESS or BAD_REQUEST. The content-type is the same that was returned when the request was processed.

Produces:
  • */* – The response body.

Example

NONE
GET /scheduled-request/802972/response
HTML/XML
<MetadataFieldListDocument xmlns="http://xml.vidispine.com/schema/vidispine">
  <field system="true">
    <name>durationTimeCode</name>
    <type>string-noindex</type>
  </field>
  <field system="true">
    <name>mimeType</name>
    <type>string-exact</type>
  </field>

...

</MetadataFieldListDocument>

Delete all scheduled requests

DELETE /scheduled-request/

Deletes all scheduled requests for the current user.

Example

NONE
DELETE /scheduled-request/
NONE
200 OK

Delete a scheduled request

DELETE /scheduled-request/(request-id)

Deletes the scheduled request with the specified id.

Example

NONE
DELETE /scheduled-request/802972
NONE
200 OK
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.