Skip to content
POST/api/{version}/configuration/role_assignment_rule
NameDescription
Content-Typeapplication/json or text/csv
Acceptapplication/json (default) or application/xml or text/csv

Before submitting this request, prepare a JSON or CSV input file with the following information:

NameDescription
name__vThe name__v field values of the lifecycle and role to which the override rule is being added.
name__vThe name__v field values of the allowed and default groups who will be assigned to the role when the override condition is met.
idThe id or name__v field values of the object records which define the override condition.
user_name__vThe user_name__v field values of the allowed and default users who will be assigned to the role when the override condition is met.

Note the following scope and limitations:

  • This request can only be used to specify the override rules (conditions, users, and groups). It cannot be used to configure the default rules.
  • The input may include override rules for multiple lifecycles and roles.
  • Each role may be configured with multiple override rules.

Create an override rule on the editor__c role of the general_lifecycle__c with the following override conditions, users, and groups:

lifecycle__vrole__vproduct__v.name__vcountry__v.name__vallowed_users__vallowed_groups__vallowed_default_users__vallowed_default_groups__v
general_lifecycle__ceditor__cCholeCapUnited States"etta@veevapharm.com,finn@veevapharm.com,greg@veevapharm.com,hope@veevapharm.com""cholecap_us_docs_group__c,cholecap_us_research_group__c,cholecap_us_compliance_group__c,cholecap_us_product_management_group__c"etta@veevapharm.comcholecap_us_docs_group__c
[ { "lifecycle__v": "general_lifecycle__c", "role__v": "editor__c", "product__v.name__v": "CholeCap", "country__v.name__v": "United States", "allowed_users__v": [ "etta@veepharm.com", "finn@veepharm.com", "greg@veepharm.com", "hope@veepharm.com" ], "allowed_groups__v": [ "cholecap_us_docs_group__c", "cholecap_us_research_group__c", "cholecap_us_compliance_group__c", "cholecap_us_product_management_group__c" ], "allowed_default_users__v": [ "etta@veepharm.com" ], "allowed_default_groups__v": [ "cholecap_us_docs_group__c" ] } ]

In this example:

  • The input file format is set to JSON.
  • The response format is not set and will default to JSON.
  • The path/name of the JSON input file is specified.
curl -X POST -H "Authorization: {SESSION_ID}" \ -H "Content-Type: application/json" \ --data-binary @"C:\Vault\Override Rules\create-lifecycle-role-override-rules.json" \ https://myvault.veevavault.com/api/v21.2/configuration/role_assignment_rule
{ "responseStatus": "SUCCESS", "data": [ { "responseStatus": "SUCCESS" } ] }

For each override rule specified in the input, the response includes a SUCCESS or FAILURE message.