Skip to main content
Version: 10.0

Role Resource

Description​

This resource describes the relevant permissions and allowed access for a given role. 

PUT /roles/:ID​

Update specific permissions of the given role.

PUT Parameters​

NameRequiredTypeDescriptionDefault Value
:IDYesURL ParameterThe numeric ID of the role resource.
nameNoJSON StringThe name of the role.
descriptionNoJSON StringThe description of the role.
featuresNoJSON ArrayAn array of feature objects, that match to permission values. See additional table for allowed values.
name JSON StringThe name of the feature. The feature is described in more detail in the permissions documentation.
privilege JSON StringThe privilege level of the feature. What this means to a given feature is described in more detail in the permissions documentation.

When updating feature values, omitting the value will attempt to set it to privilege level "none". For features that do not support this permission setting, this will cause the request to fail, so these values are marked as required in the following table.

NameAllowed Privilege ValuesRequired
group"ro", "rw", "none"No
mitigation_reporting"ro", "rw"Yes
mitigation_config"ro", "rw", "none"No
group_routing"ro", "rw", "none"No
zone_routing"ro", "rw", "none"No
group_admin"rw", "none"No
limit_resource"rw", "none"No
device"ro", "rw", "none"No
rweb"rw", "none"No

Example PUT Request​

PUT /roles/962
 
JSON Body:
{
"data": {
"name": "Test Group 3 read",
"description": "a role created for documentation",
"features": [
{
"name": "group",
"privilege": "ro"
},
{
"name": "mitigation_reporting",
"privilege": "ro"
},
{
"name": "mitigation_config",
"privilege": "ro"
},
{
"name": "group_routing",
"privilege": "ro"
},
{
"name": "zone_routing",
"privilege": "ro"
},
{
"name": "group_admin",
"privilege": "none"
},
{
"name": "device",
"privilege": "none"
},
{
"name": "rweb",
"privilege": "none"
}
]
}
} 

Example  PUT Response​

HTTP/1.1 200 OK 

DELETE /roles/:ID​

Delete the given role resource.

DELETE Parameters​

NameRequiredTypeDescriptionDefault Value
:IDYesURL ParameterThe numeric ID of the role resource. 

Example DELETE Request​

DELETE /roles/15 

Example DELETE Response​

 HTTP/1.1 200 OK