Retrieve Workflows
Retrieve all workflows for a specific object and object record or from a specific workflow participant.
GET
/api/{version}/objects/objectworkflowsHeaders
Section link for Headers| Name | Description |
|---|---|
Accept | application/json (default) or application/xml |
Query Parameters
Section link for Query Parameters| Name | Description |
|---|---|
object__v, record_id__v | To retrieve all workflows configured on an object, include the Vault object name__v and object record id field values as object__v={name__v}&record_id__v={id}. These two parameters are required when the participant parameter is not used. |
participant | To retrieve all workflows available to a particular user, include the user id field value as participant={id}. To retrieve your own workflows, set this value to participant=me(). This parameter is required when the object__v and record_id__v parameters are not used. |
status__v | To retrieve all workflows with specific statuses, include one or more status name__v field values. For example: status__v=active__v, status__v=active__v,completed__v. |
offset | This parameter is used to paginate the results. It specifies the amount of offset from the first record returned. Vault returns 200 records per page by default. If you are viewing the first 200 results (page 1) and want to see the next page, set this to offset=201. |
page_size | This parameter is used to paginate the results. It specifies the size number of records to display per page. Vault returns 200 records per page by default. You can set this value lower or as high as 1000 records per page. For example: page_size=1000. |
loc | When localized (translated) strings are available, retrieve them by including loc=true. |
Request
Section link for Requestcurl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v21.2/objects/objectworkflows?object__v=product__v&record_id__v=00P07551Response
Section link for Response{
"responseStatus": "SUCCESS",
"responseDetails": {
"total": 1,
"offset": 0,
"page_size": 200,
"object": {
"name": "objectworkflows",
"label": "Object Workflow",
"url": "/api/v21.2/objects/objectworkflows?object__v=product__v&record_id__v=00P07551",
"label_plural": "Object Workflows"
}
},
"data": [
{
"id": 701,
"label__v": "Review",
"status__v": [
"active__v"
],
"object__v": "product__v",
"record_id__v": "00P07551",
"initiator__v": 52212,
"started_date__v": "2016-04-28T15:07:52.000Z",
"due_date__v": "2016-05-12T10:00:00.000Z",
"completed_date__v": "2016-05-10T14:01:17.000Z"
},
{
"id": 801,
"label__v": "Approve",
"status__v": [
"active__v"
],
"object__v": "product__v",
"record_id__v": "00P07551",
"initiator__v": 46916,
"started_date__v": "2016-05-12T19:22:15.000Z"
}
]
}Response Details
Section link for Response DetailsOn SUCCESS, the response lists all object workflows matching the query parameters. Each workflow may include the following fields:
id- The workflow ID.label__v- The workflow label as seen in the UI.status__v- The current status of the workflow.object__v- The name of the object using the workflow.record_id__v- The ID of the object record using the workflow.initiator__v- The ID of the user who started the workflow. This is the workflow owner.started_date__v- The date and time when the workflow was started.completed_date__v- The date and time when the workflow was completed.cancelled_date__v- The date and time when the workflow was cancelled.