Skip to main content

 Web service API

How to use PageSeeder's Web service API

batch action

/members/{member}/groups/{group}/batch/{object}/{action} [POST]

com.pageseeder.action.RunBatchAction

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 – documents
  • xlink– 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

NameDescriptionRequiredTypeDefault value
idsThe comma-separated list of IDs representing the objectsyesstring
action.assignedtoID of assigned member for workflow or empty to remove (WF)nolongprevious workflow assigned member
action.comment-groupsThe comma-separated list of groups to add comments from current group to (MV)nostring
action.contentThe content as plain text of the version (VER, WF)conditionalstring
action.destination-guriidThe the destination folder guri id – required if no uriid (MV)conditionalstring
action.destination-uriidThe the destination folder uri id – required if no guriid (MV)conditionalstring
action.document-typeThe document type to save the schema under (US)nostring
action.dueWorkflow due date format is yyyy-MM-dd or empty to remove (WF)nostringprevious workflow due date
action.labelsA comma-separated list of labels to add to the version (AL, VER, RL, WF)conditionalstring
action.log-levelThe level of logging the script should output, can be info, verbose, warn, error, debug (PUB)nostring
action.notifyThe notification behavior which can be normal, announce, minimal, or silent  (VER/WF)nostringsilent
action.param.*Publish script parameters (PUB)nostring
action.priorityPriority for workflow e.g. 'High', 'Medium', 'Low' or empty to remove (WF)nostringprevious workflow priority
action.projectThe current project (PUB)conditionalstring
action.removexrefsWhether to remove image and outgoing xrefs from the archived documents (ARC)nostringfalse
action.schemaThe name of the schema (US/VAL)conditionalstring
action.search.filtersA comma-separated list of field:term pairs to use as filters (PUB)nostrings
action.search.questionThe question to search for (PUB)nostring
action.search.questionfieldsA comma-separated list of fields to search the question in (PUB)nostrings
action.search.rangesA comma-separated list of range searches (PUB)nostrings
action.statusStatus for workflow (WF)nostringprevious workflow status
action.targetThe ANT script target (PUB)conditionalstring
action.titleThe version number e.g.: 1.00 (VER)conditionalstring
action.typeThe type of script, can be export, process, publish (PUB)conditionalstring
action.uristatusComma-separated list of the status that the URI must have for the workflow to be added (WF)nostring

Action-specific parameters

Some parameters are only applicable to specific actions, use the following table as guide:

Action
ALaddlabel
VERaddversion
WFaddworkflow
ARCarchive
MVmove
PUBpublish
RLremovelabel
URusagereport
USusageschema
VALvalidate

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 on xlink objects where they are not the comment author.
  • contributor: for actions addworkflow, move, archive. Also addlabel, removelabel on uri objects and xlink objects where they are the comment author.
  • member: for actions validate, publish.
ActionReviewerContributorManagerApproverAdministrator
addlabelYes(1)YesYesYes
addversionYesYes
addworkflowYesYesYesYes
archiveYesYesYesYes
moveYesYesYesYes
publishYesYesYesYesYes
removelabelYes(1)YesYesYes
usagereportYes
usageschemaYes
validateYesYesYesYesYes

(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.

Created on , last edited on