Overview
This operation allows you to add or edit a role.
ACL Authorization Flow
The user must be admin (users with admin or spatial-admin role) to be able to add a role.
HTTP PUT URL Format
The following format is used for HTTP PUT requests:
PUT DATA:{
{
"name": "GuestRole",
"namedResourcePermissions": ["READ", "WRITE"],
"datasetPermissions": ["INSERT", "UPDATE", "DELETE"],
"otherPermissions": {
"Platform.Service": ["CREATE", "MODIFY", "DELETE", "VIEW", "EXECUTE"],
"Resource Connection.Jdbc Driver": ["CREATE", "MODIFY", "DELETE"]
}
}
PUT HEADER: Content-Type:application/json
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | Specifies the name of the role. |
| namedResourcePermissions | String | No | Specifies the permissions the role will have on the named resources. |
| datasetPermissions | String | No | Specifies the permissions the role will have on the datasets. |
| otherPermissions | String | No | Specifies the permissions the role will have on other resources like connections or services. |
Returns
Returns 200 OK if the role was added successfully.
Example for PUT
Request URL
http://<server>:<port>/rest/Spatial/AccessControlService/role
Request Body
{
"name": "GuestRole",
"namedResourcePermissions": ["READ", "WRITE"],
"datasetPermissions": ["INSERT", "UPDATE", "DELETE"],
"otherPermissions": {
"Platform.Service": ["CREATE", "MODIFY", "DELETE", "VIEW", "EXECUTE"],
"Resource Connection.Jdbc Driver": ["CREATE", "MODIFY", "DELETE"]
}
}
Response
200 OK