Update Access Control Rule
This request updates an access control rule, targeted by secure ID.
| patch | /accesscontrol/rules/{rule_sid} |
| put | /accesscontrol/rules/{rule_sid} |
Sample
A sample PATCH request to update the Access Control Rule object, targeted by secure ID, with the values in the request body:
curl -X PATCH \
'https://api.carrierx.com/core/v2/accesscontrol/rules/c9109b54-13f2-4157-ba23-2984b3a207dc' \
-H 'Content-Type: application/json' \
--data-binary '{"operation":"exact"}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'
Response
200 status code with a serialized copy of the updated Access Control Rule object:
{
"entries": [
"1800",
"1615"
],
"field": "to",
"name": "N/A",
"operation": "exact",
"quantifier": "any",
"read_only": false,
"rule_sid": "c9109b54-13f2-4157-ba23-2984b3a207dc"
}
An Access Control Rule object can be updated using either a PATCH or PUT request.
-
A
PATCHrequest can be used to update one or more attribute values. When using aPATCHrequest, only the attributes specified in the request payload will be updated, all other attributes and values will remain the same. The access control rule secure ID is passed in the query URL, and the values to be modified are passed in the request body. -
A
PUTrequest can be used to update an entire Access Control Rule object. The access control rule secure ID is passed in the query URL, and the entire Access Control Rule object is passed in the request body.
Note, while all the fields must be present in a PUT request, not all the attribute values may be modified after the initial creation, because when created, some of them become read-only.
Required Scopes
To update an Access Control Rule object, the partner must have one of the following scopes enabled:
accesscontrol.manageaccesscontrol.update
Path Arguments
| Parameter | Data Type | Description |
|---|---|---|
| rule_sid required | string | The access control rule secure ID. |
Body Arguments
JSON representation of the fields and values to be updated.
Fields that can be modified are:
entriesfieldnameoperationquantifier
Note that read_only must be set to false in order to be able to update an Access Control Rule.
Refer to this table to view all fields that appear in the Access Control Rule object.