Task group reference [VC 21.3.1 GEN]
Task groups can be used to control the resources that a specific job should use.
Task groups
List all task groups
-
GET
/task-group
Retrieves all task groups that have been defined in the system.
Produces: -
application/xml, application/json – TaskGroupListDocument
Role: _administrator
-
Update or create a task group
-
PUT
/task-group/
(group-name) Updates or creates the task group with the given name.
Accepts: -
application/xml, application/json – TaskGroupDocument
Produces: -
application/xml, application/json – TaskGroupDocument
Role: _administrator
-
Example
PUT /task-group/imports HTTP/1.1
Accept: application/xml
Content-Type: application/xml
<TaskGroupDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<job>
<type>PLACEHOLDER_IMPORT</type>
</job>
<transcoder>
<id>VX-1</id>
</transcoder>
</TaskGroupDocument>
<TaskGroupDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<name>imports</name>
<job>
<type>PLACEHOLDER_IMPORT</type>
</job>
<transcoder>
<id>VX-1</id>
</transcoder>
</TaskGroupDocument>
Create or update a task group
-
PUT
/task-group/
(group-name) Creates or updates the task group with the given name.
This request is identical to the above, except that the task group parameters are specified using query parameters instead of using a TaskGroupDocument.
Query Parameters: -
priority (string) – The priority of the task group.
-
transcoder (string[]) – The id of the transcoder(s) to include in the group.
-
job (string[]) –
The job criteria(s). One of:
-
type:{type}
- Jobs of this type. -
priority:{priority}
- Jobs with this priority. -
user:{username}
- Jobs created by this user. -
group:{groupname}
- Jobs created by a user in this group. -
data:{key}[={value}]
- Jobs with this job data.
-
-
metadata (string[]) – Any key-value metadata to set on the group. Format is
{key}={value}
.
Produces: -
application/xml, application/json – TaskGroupDocument
Role: _administrator
-
Example
PUT /task-group/imports?job=type:PLACEHOLDER_IMPORT&transcoder=VX-1 HTTP/1.1
Accept: application/xml
<TaskGroupDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<name>imports</name>
<job>
<type>PLACEHOLDER_IMPORT</type>
</job>
<transcoder>
<id>VX-1</id>
</transcoder>
</TaskGroupDocument>
Retrieve a task group
-
GET
/task-group/
(group-name) Retrieves the task group document for a task group with a specific name.
Produces: -
application/xml, application/json – TaskGroupDocument
Role: _administrator
-
Delete a task group
-
DELETE
/task-group/
(group-name) Deletes the task group.
Note that this only deletes the task group. It will not remove any transcoders or other resources that are in the group.
Role: _administrator
Delete all task groups
-
DELETE
/task-group
Deletes all task groups.
Note that this only deletes the task groups. It will not remove any transcoders or other resources that are in the groups.
Role: _administrator
Task group transcoders
Add a transcoder to a task group
-
PUT
/task-group/
(group-name)/transcoder/
(transcoder-id) Adds the transcoder to the specified task group.
Role: _administrator
Remove a transcoder from a task group
-
DELETE
/task-group/
(group-name)/transcoder/
(transcoder-id) Removes a transcoder from the specified task group.
Role: _administrator
Key-value metadata
Task groups support key-value metadata.