Retrieve Document Role
Retrieve a specific role on a document and the users and groups assigned to it.
GET
/api/{version}/objects/documents/{doc_id}/roles/{role_name}Headers
Section link for Headers| Name | Description |
|---|---|
Accept | application/json (default) or application/xml |
URI Path Parameters
Section link for URI Path Parameters| Name | Description |
|---|---|
{doc_id} | The document id field value. |
{role_name} | The name of the role to retrieve. For example, owner__v. |
Request
Section link for Requestcurl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v26.1/objects/documents/245/roles/reviewer__vResponse
Section link for Response{
"responseStatus": "SUCCESS",
"responseMessage": "Document role retrieved",
"errorCodes": null,
"documentRoles": [
{
"name": "reviewer__v",
"label": "Reviewer",
"assignedUsers": [
25496,
26231
],
"assignedGroups": [
1,
2
],
"availableUsers": [
25496,
26231,
28874
],
"availableGroups": [
1,
2,
3
],
"defaultUsers": [
25496,
26231
],
"defaultGroups": [
1,
2
]
}
],
"errorType": null
}Response Details
Section link for Response DetailsOn SUCCESS, the response lists the following for the specific role retrieved:
| Name | Description |
|---|---|
name | The role name available to developers. For example, reviewer__v. |
label | The UI-friendly role label available to Admins in the Vault UI. For example, Reviewer. |
assignedUsers | List of the IDs of users assigned to this role |
assignedGroups | List of the IDs of groups assigned to this role |
availableUsers | List of the IDs of users available for this role |
availableGroups | List of the IDs of groups available to this role |
defaultUsers | List of the IDs of default users assigned to this role |
defaultGroups | List of the IDs of default groups assigned to this role |