Initiate Workflow Actions on Multiple Workflows
Use this request to initiate a workflow action on multiple workflows. This starts an asynchronous job whose status you can check with the Retrieve Job Status endpoint. Maximum 500 workflows per request.
/api/{version}/object/workflow/actions/{action}Headers
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/x-www-form-urlencoded |
Accept | application/json (default) or application/xml |
URI Path Parameters
Section link for URI Path Parameters| Name | Description |
|---|---|
action | The name of the workflow action. To get this value, Retrieve Bulk Workflow Actions. |
Body Parameters
Section link for Body ParametersIn the body of the request, add any fields required to initiate the action. To find which fields are required for an action, Retrieve Bulk Workflow Action Details.
Cancel Active Workflows: cancelworkflows
Section link for Cancel Active Workflows: cancelworkflows| Name | Description |
|---|---|
workflow_idsrequired | Input a comma-separated list of workflow_id__v field values. Maximum 500 workflows. |
cancellation_commentoptional | If this workflow requires a comment for cancellation, use this parameter to provide a comment. |
Reassign Workflow Tasks: reassigntasks
Section link for Reassign Workflow Tasks: reassigntasksNote that this action can reassign a maximum of 500 tasks.
| Name | Description |
|---|---|
current_task_assigneerequired | Input the user ID of the user whose tasks you wish to reassign. You cannot reassign specific tasks for a user, only all tasks currently assigned to a user. |
new_task_assigneerequired | Input the user ID of the user who will receive the newly assigned tasks. |
Cancel Workflow Tasks: canceltasks
Section link for Cancel Workflow Tasks: canceltasksWhen cancelling tasks, you can do so by user ID or task ID. Use one of the following parameters:
| Name | Description |
|---|---|
user_idsconditional | To cancel tasks by user ID, input a comma-separated list of the user IDs for the users whose tasks you wish to cancel. You cannot cancel specific tasks for a user, only all tasks currently assigned to a user. Maximum 100 user IDs per request. |
task_idsconditional | To cancel tasks by task ID, input a comma-separated list of the task IDs to cancel. You cannot cancel task IDs for a specific user, only all instances of the given task IDs. |
Replace Workflow Owner: replaceworkflowowner
Section link for Replace Workflow Owner: replaceworkflowowner| Name | Description |
|---|---|
new_workflow_ownerrequired | Input the ID of the user who will become the new workflow owner. For example, 54937. |
current_workflow_ownerrequired | Input the ID of the user who is the current workflow owner. For example, 87944. |
Request
Section link for Requestcurl -L -X POST -H "Authorization: {SESSION_ID}" \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'workflow_ids=2903,2904,2905' \
https://myvault.veevavault.com/api/v24.1/object/workflow/actions/cancelworkflowsResponse
Section link for Response{
"responseStatus": "SUCCESS",
"data": {
"job_id": 93601
}
}Response Details
Section link for Response DetailsOn SUCCESS, the response returns the job_id for the action, and the authenticated user will receive an email notification with details of any failures that occur. On FAILURE, the response returns an error type and message describing the reason for the failure. For example, the API returns INVALID_DATA if a task cannot be reassigned because the new task assignee is not in the appropriate role.