Skip to content

Remove Users & Groups from Roles on a Single Document

Remove users and groups from roles on a single document.

DELETE/api/{version}/objects/documents/{doc_id}/roles/{role_name_and_user_or_group}/{id}
NameDescription
Acceptapplication/json (default) or application/xml
NameDescription
{doc_id}The id value of the document from which to remove roles.
{role_name_and_user_or_group}The name of the role from which to remove the user or group followed by either user or group. The format is {role_name}.{user_or_group}. For example, consumer__v.user.
{id}The id value of the user or group to remove from the role.
curl -X DELETE -H "Authorization: {SESSION_ID}" \ https://myvault.veevavault.com/api/v26.1/objects/documents/1234/roles/consumer__v.user/1008313
{ "responseStatus": "SUCCESS", "responseMessage": "User/group deleted from document role", "updatedRoles": { "consumer__v": { "users": [ 1008313 ] } } }

On SUCCESS, the response lists the id of the user or group removed from the document role. On FAILURE, the response returns an error message describing the reason for the failure. For example, a user or group may not be removed if the role assignment is system-managed.