Remove Users and Groups from Roles on Multiple Documents
Remove users and groups from roles on a document or binder in bulk.
- The maximum CSV input file size is 1GB.
- The values in the input must be UTF-8 encoded.
- CSVs must follow the standard format.
- The maximum batch size is 1000.
DELETE
/api/{version}/objects/documents/roles/batchHeaders
Section link for Headers| Name | Description |
|---|---|
Content-Type | text/csv or application/x-www-form-urlencoded |
Accept | application/json (default) or application/xml |
Body Parameters
Section link for Body ParametersYou can add parameters in the request body, or upload them as a CSV file.
| Name | Description |
|---|---|
id | The document ID. |
role__v.users | A string of user id values to remove. |
role__v.groups | A string of group id values to remove. |
For example,
Request
Section link for Requestcurl -X DELETE -H "Authorization: {SESSION_ID}" \
-H "Content-Type: text/csv" \
-H "Accept: text/csv" \
--data-binary @"C:\Vault\Document Roles\remove_document_roles.csv" \
https://myvault.veevavault.com/api/v18.3/objects/documents/roles/batchResponse
Section link for Response{
"responseStatus": "SUCCESS",
"data": [
{
"responseStatus": "SUCCESS",
"id": 771,
"reviewer__v.groups": [
4411606
],
"reviewer__v.users": [
12124
]
},
{
"responseStatus": "SUCCESS",
"id": 772,
"reviewer__v.groups": [
4411606
],
"reviewer__v.users": [
12124
]
},
{
"responseStatus":"FAILURE",
"id":"773",
"errors":[
{
"type":"INVALID_DATA",
"message":"Error message describing why the users and groups were not removed from roles on this document."
}
]
}
]
}