Skip to content

Retrieve Object Record Roles

Retrieve manually assigned roles on an object record and the users and groups assigned to them.

GET/api/{version}/vobjects/{object_name}/{id}/roles{/role_name}
NameDescription
Acceptapplication/json (default) or application/xml
NameDescription
{object_name}The object name.
{id}The id of the document, binder, or object record.
{/role_name}Optional: Include a role name to filter for a specific role. For example, owner__v.
curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v19.3/vobjects/campaign__c/OBE000000000412/roles
{
    "responseStatus": "SUCCESS",
    "data": [
        {
            "name": "approver__c",
            "users": [
                61583,
                61584,
                86488
            ],
            "groups": [
                3,
                1392631750101
            ],
            "assignment_type": "manual_assignment"
        }
      ]
    }

Even though the owner__v role is automatically assigned when you apply Custom Sharing Rules, the assignment_type for roles on objects is always manual_assignment.