Tasks¶
Overview¶
Task requests can be used to set and retrieve Task information using GET
and PUT
request types.
POST
and DELETE
are not supported and sending a message of either of these types will result in a 501 Not Implemented Error message.
For more about these request types and their uses see the Request Formats and Responses documentation.
Requests and Responses¶
List of possible requests for Tasks.
For all PUT
requests it is possible to return a 400 Bad Request error message if the message body is empty or if no command key is provided.
All requests may return a 400 Bad request error message if no Job ID is provided or a 500 Internal Server Error if the Job ID provided does not correspond to any Job in the Repository.
Get Task IDs¶
Gets all the Task IDs for the Job that corresponds to the Job ID provided.
URL: |
http://hostname:portnumber/api/tasks?IdOnly=true&JobID=validJobID |
Request Type: |
GET |
Message Body: |
N/A |
Response: |
JSON object containing all the Task IDs for the Job. |
Possible Errors: |
500 Internal Server Error: An exception occurred within the Deadline code. |
Get Task¶
Gets the Task that correspond to the Task ID provided for the Job that corresponds to the Job ID provided.
URL: |
http://hostname:portnumber/api/tasks?TaskID=oneValidTaskID&JobID=validJobID |
Request Type: |
GET |
Message Body: |
N/A |
Response: |
JSON object containing the Task information for the requested Task. |
Possible Errors: |
|
Get All Tasks¶
Gets the Tasks for the Job that corresponds to the Job ID provided.
URL: |
http://hostname:portnumber/api/tasks?JobID=validJobID |
Request Type: |
GET |
Message Body: |
N/A |
Response: |
JSON object containing the Task information for all the Job Tasks. |
Possible Errors: |
500 Internal Server Error: An exception occurred within the Deadline code. |
Requeue Tasks¶
Requeues the Tasks that correspond to the Task IDs provided for the Job that corresponds to the Job ID provided. If no Task IDs are provided, all Job Tasks will be requeued.
URL: |
http://hostname:portnumber/api/tasks |
Request Type: |
PUT |
Message Body: |
|
Response: |
“Success” |
Possible Errors: |
|
Complete Tasks¶
Completes the Tasks that correspond to the Task IDs provided for the Job that corresponds to the Job ID provided. If no Task IDs are provided, all Job Tasks will be completed.
URL: |
http://hostname:portnumber/api/tasks |
Request Type: |
PUT |
Message Body: |
|
Response: |
“Success” |
Possible Errors: |
|
Suspend Tasks¶
Suspend the Tasks that correspond to the Task IDs provided for the Job that corresponds to the Job ID provided. If no Task IDs are provided, all Job Tasks will be suspended.
URL: |
http://hostname:portnumber/api/tasks |
Request Type: |
PUT |
Message Body: |
|
Response: |
“Success” |
Possible Errors: |
|
Fail Tasks¶
Fails the Tasks that correspond to the Task IDs provided for the Job that corresponds to the Job ID provided. If no Task IDs are provided, all Job Tasks will be failed.
URL: |
http://hostname:portnumber/api/tasks |
Request Type: |
PUT |
Message Body: |
|
Response: |
“Success” |
Possible Errors: |
|
Resume Failed Tasks¶
Resumes the Failed Tasks that correspond to the Task IDs provided for the Job that corresponds to the Job ID provided. If no Task IDs are provided, all Job failed Tasks will be resumed.
URL: |
http://hostname:portnumber/api/tasks |
Request Type: |
PUT |
Message Body: |
|
Response: |
“Success” |
Possible Errors: |
|
Pend Tasks¶
Pends the Tasks that correspond to the Task IDs provided for the Job that corresponds to the Job ID provided. If no Task IDs are provided, all Job Tasks will be pended.
URL: |
http://hostname:portnumber/api/tasks |
Request Type: |
PUT |
Message Body: |
|
Response: |
“Success” |
Possible Errors: |
|
Release Pending Tasks¶
Releases the pending Tasks that correspond to the Task IDs provided for the Job that corresponds to the Job ID provided. If no Task IDs are provided, all Job Pending Tasks will be released.
URL: |
http://hostname:portnumber/api/tasks |
Request Type: |
PUT |
Message Body: |
|
Response: |
“Success” |
Possible Errors: |
|
Task Property Values¶
Values for some Task properties are represented by numbers. Those properties and their possible values are listed below.
- Stat (Status)
1 = Unknown
2 = Queued
3 = Suspended
4 = Rendering
5 = Completed
6 = Failed
8 = Pending