Edit Restrictions Set

Use the following API call to edit a restrictions set:

PUT /restrictions/sets/:id.xml
PUT /restrictions/sets/:id.json

XML Request example

curl -i -X PUT http://onapp.test/restrictions/sets/4.xml -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass -d '<restrictions_set><label>new_label</label><role_ids type="array"><role_id>2</role_id></role_ids><resource_ids type="array"><resource_id>2</resource_id></resource_ids></restrictions_set>'

JSON Request example

curl -i -X PUT http://onapp.test/restrictions/sets/4.json -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass -d '{"restrictions_set":{"label":"new_label","role_ids":[2],"resource_ids":[2]}}'

Where:

label - give the label of the restrictions set

role_ids - the array of the role IDs you wish to assign to the restrictions set:

role_id - ID of the role you wish to assign to the restrictions set

resource_ids - the array of resource IDs you wish to limit under the restrictions set:

resource_id - ID of the resource you wish to limit under the restrictions set