Create Override Rules
POST
/api/{version}/configuration/role_assignment_ruleHeaders
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/json or text/csv |
Accept | application/json (default) or application/xml or text/csv |
Body Parameters
Section link for Body ParametersBefore submitting this request, prepare a JSON or CSV input file with the following information:
| Name | Description |
|---|---|
name__v | The name__v field values of the lifecycle and role to which the override rule is being added. |
name__v | The name__v field values of the allowed and default groups who will be assigned to the role when the override condition is met. |
id | The id or name__v field values of the object records which define the override condition. |
user_name__v | The 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.
Example CSV & JSON Input Files
Section link for Example CSV & JSON Input FilesCreate an override rule on the editor__c role of the general_lifecycle__c with the following override conditions, users, and groups:
lifecycle__v | role__v | product__v.name__v | country__v.name__v | allowed_users__v | allowed_groups__v | allowed_default_users__v | allowed_default_groups__v |
|---|---|---|---|---|---|---|---|
general_lifecycle__c | editor__c | CholeCap | United 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.com | cholecap_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"
]
}
]Request Details
Section link for Request DetailsIn 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.
Request
Section link for Requestcurl -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/v18.3/configuration/role_assignment_ruleResponse
Section link for Response{
"responseStatus": "SUCCESS",
"data": [
{
"responseStatus": "SUCCESS"
}
]
}Response Details
Section link for Response DetailsFor each override rule specified in the input, the response includes a SUCCESS or FAILURE message.