batch action
API Support | Available since | Last updated | Output |
---|---|---|---|
5.9800 | 5.9800 | xml, json |
Description
Run a batch action on a specified list of objects. This service starts an Asynchronous process.
To run a batch action based on a search query, use the batch action search results service instead.
The type of object and action are defined in the URL as explained as follows.
Object
The {object}
URL parameters defines type of object to run the action on, can be:
uri
– documentsxlink
– comments, tasks or workflows
xlink
object only supports actions addlabel
and removelabel
.
Action
The {action}
URL parameter defines the name of the action to run against the specified object type.
It can be one of:
addlabel
removelabel
addversion
addworkflow
move
archive
usageschema
usagereport
validate
publish
Parameters
Name | Description | Required | Type | Default |
---|---|---|---|---|
ids | The comma-separated list of IDs representing the objects | yes | string | |
action.assignedto | ID of assigned member for workflow or empty to remove (WF) | no | long | previous workflow assigned member |
action.comment-groups | The comma-separated list of groups to add comments from current group to (MV) | no | string | |
action.content | The content as plain text of the version (VER, WF) | conditional | string | |
action.destination-guriid | The the destination folder guri id – required if no uriid (MV) | conditional | string | |
action.destination-uriid | The the destination folder uri id – required if no guriid (MV) | conditional | string | |
action.document-type | The document type to save the schema under (US) | no | string | |
action.due | Workflow due date and time in ISO-8601 format. e.g. 2010-10-25T18:00:00+11:00 - "" means remove (WF) | no | datetime | previous workflow due date |
action.labels | A comma-separated list of labels to add to the version (AL, VER, RL, WF) | conditional | string | |
action.log-level | The level of logging the script should output, can be info , verbose , warn , error , debug (PUB) | no | string | |
action.notify | The notification behavior which can be normal , announce , minimal , or silent (VER/WF) | no | string | silent |
action.param.* | Publish script parameters (PUB) | no | string | |
action.priority | Priority for workflow e.g. 'High', 'Medium', 'Low' or empty to remove (WF) | no | string | previous workflow priority |
action.project | The current project (PUB) | conditional | string | |
action.removexrefs | Whether to remove image and outgoing xrefs from the archived documents (ARC) | no | string | false |
action.schema | The name of the schema (US/VAL) | conditional | string | |
action.search.filters | A comma-separated list of field:term pairs to use as filters (PUB) | no | strings | |
action.search.question | The question to search for (PUB) | no | string | |
action.search.questionfields | A comma-separated list of fields to search the question in (PUB) | no | strings | |
action.search.ranges | A comma-separated list of range searches (PUB) | no | strings | |
action.status | Status for workflow (WF) | no | string | previous workflow status |
action.target | The ANT script target (PUB) | conditional | string | |
action.title | The version number e.g.: 1.00 (VER) | conditional | string | |
action.type | The type of script, can be export , process , publish (PUB) | conditional | string | |
action.uristatus | Comma-separated list of the status that the URI must have for the workflow to be added (WF) | no | string |
Action-specific parameters
Some parameters are only applicable to specific actions, use the following table as guide:
Action | |
---|---|
AL | addlabel |
VER | addversion |
WF | addworkflow |
ARC | archive |
MV | move |
PUB | publish |
RL | removelabel |
UR | usagereport |
US | usageschema |
VAL | validate |
ids
This parameter is a comma-separated list of IDs of each of the objects to process.
All the specified IDs are for objects of the same type, based on the {object}
URL parameter. For example, URI ID when the object type is uri
. Comment ID or task definition IDs when the object type is xlink
.
Action parameters
All the parameters starting with action.*
are parameter for the batch action.
Workflow parameters
The action.assignedto
, action.due
, action.priority
, and action.status
only apply to the addworkflow
action. They have no effect when used with different actions.
When any of them is not specified, the corresponding document workflow value is left unchanged. For example, if the action.priority
is not specified, the priority of the matching workflows is left unchanged.
An empty value can be used for the action.assignedto
, action.due
, and action.priority
parameters to remove the value. For example, if action.priority
is specified but empty, the matching workflows no longer have a priority value.
Permission
The minimum permission depends on the action and the object as follows:
- administrator: for actions
usageschema
,usagereport
. - approver: for action
addversion
. - manager: for actions
addlabel
,removelabel
onxlink
objects where they are not the comment author. - contributor: for actions
addworkflow
,move
,archive
. Alsoaddlabel
,removelabel
onuri
objects andxlink
objects where they are the comment author. - member: for actions
validate
,publish
.
Action | Reviewer | Contributor | Manager | Approver | Administrator |
---|---|---|---|---|---|
addlabel | Yes(1) | Yes | Yes | Yes | |
addversion | Yes | Yes | |||
addworkflow | Yes | Yes | Yes | Yes | |
archive | Yes | Yes | Yes | Yes | |
move | Yes | Yes | Yes | Yes | |
publish | Yes | Yes | Yes | Yes | Yes |
removelabel | Yes(1) | Yes | Yes | Yes | |
usagereport | Yes | ||||
usageschema | Yes | ||||
validate | Yes | Yes | Yes | Yes | Yes |
(1) On xlink objects, contributors can only add or remove labels if they are the author of the comment.
Response
<batch-action name="[action]" object="[object]" ids="[ids]"> [<thread ...> ... </thread>| <check> <publish id="[job ID]"> <parameters> ... </parameters> <status>in-progress</status> <message logged="false" type="in-progress" target="starting" progress="0">Publish Job started</message> </publish> </check>] </batch-action>
Error Handling
No specific errors expected for this service.