batch action search
API Support | Available since | Last updated | Output |
---|---|---|---|
5.9800 |
Description
This service runs batch action using search results.This service starts an Asynchronous process.
This service works in the same way as the batch action service but uses the search results to load the ids, using the psid
field from each result or the pstaskdefinitionid
field for tasks and workflows.
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
– documents, urls or foldersxlink
– comments, tasks or workflows
xlink
object only supports actions addlabel
and removelabel
.
urls
do not support actions move
or archive
.
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 |
---|---|---|---|---|
filters | A comma-separated list of field:term pairs to use as filters | no | strings | |
question | The question to search for | no | string | |
questionfields | A comma-separated list of fields to search the question in | no | strings | pstitle,pscontent |
ranges | A comma-separated list of range searches | no | strings | |
action.assignedto | ID of assigned member for workflow or empty to remove (addworkflow action only) | no | long | previous workflow assigned member |
action.comment-groups | The comma-separated list of groups to add comments from current group to (move action only) | no | string | |
action.content | The content as plain text of the version (addversion and addworkflow action only) | maybe | string | |
action.destination-guriid | The the destination folder guri id – required if no uriid (move only) | maybe | string | |
action.destination-uriid | The the destination folder uri id – required if no guriid (move only) | maybe | string | |
action.document-type | The document type to save the schema under (usageschema only) | no | string | |
action.due | The task due date and time in ISO-8601 format. e.g. 2010-10-25T18:00:00+11:00 - "" means remove (addworkflow only) | no | datetime | previous workflow due date |
action.labels | A comma-separated list of labels to add to the version (addlabel , removelabel , addversion and addworkflow only) | maybe | string | |
action.log-level | The level of logging the script outputs, can be info , verbose , warn , error , debug (publish only) | no | string | |
action.notify | The notification behavior normal|announce|minimal|silent (addversion and addworkflow only) | no | string | silent |
action.param.* | Publish script parameters (publish only) | no | string | |
action.priority | Priority for workflow e.g. High , Medium , Low – an empty values means remove (addworkflow only) | no | string | previous workflow priority |
action.project | The current project (publish only) | maybe | string | |
action.removexrefs | Whether to remove image and outgoing xrefs from the archived documents (archive only) | no | string | false |
action.schema | The name of the schema (usageschema and validate only) | maybe | string | |
action.search.filters | A comma-separated list of field:term pairs to use as filters (publish only) | no | strings | |
action.search.question | The question to search for (publish only) | no | string | |
action.search.questionfields | A comma-separated list of fields to search the question in (publish only) | no | strings | |
action.search.ranges | A comma-separated list of range searches (publish only) | no | strings | |
action.status | Status for workflow e.g. Initiated ,In Progress , Complete , Approved , Suspended , Terminated (addworkflow only) | no | string | previous workflow status |
action.target | The ANT script target (publish only) | maybe | string | |
action.title | The version number e.g.: 1.00 (addversion only) | maybe | string | |
action.type | The type of script, can be export , process , publish (publish only) | maybe | string | |
action.uristatus | Comma-separated list of the status that the URI must have for the workflow to be added (addworkflow only) | no | string |
Search parameters
The filters
, question
, questionfields
, questionoperator
and ranges
parameters specify the query to select the results to process.
See the search service for further information.
Action parameters
All the parameters starting with action.*
are parameter for the batch action.
They are defined in the batch action service.
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
,validate
. Alsoaddlabel
,removelabel
onuri
objects andxlink
objects where they are the comment author. - guest: for actions
publish
.
Action | Guest | 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 |
(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
0x1501 | If there is an invalid group specified |
---|---|
0x6502 | Missing catalog, re-index group |