Create Restrictions Set

To create a restrictions set, use the following request:

POST /restrictions/sets.xml
POST /restrictions/sets.json

XML Request Example

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

JSON Request Example

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

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