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
| Name | Required | Type | Description | Default Value |
|---|---|---|---|---|
| :ID | Yes | URL Parameter | The numeric ID of the role resource. | |
| name | No | JSON String | The name of the role. | |
| description | No | JSON String | The description of the role. | |
| features | No | JSON Array | An array of feature objects, that match to permission values. See additional table for allowed values. | |
| name | JSON String | The name of the feature. The feature is described in more detail in the permissions documentation. | ||
| privilege | JSON String | The 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.
| Name | Allowed Privilege Values | Required |
|---|---|---|
| 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
| Name | Required | Type | Description | Default Value |
|---|---|---|---|---|
| :ID | Yes | URL Parameter | The numeric ID of the role resource. |
Example DELETE Request
DELETE /roles/15
Example DELETE Response
HTTP/1.1 200 OK