Update a role
This endpoint is used to update an existing role.
PUT /openapi/v1/roles/{role_id}
Parameters: The request URL contains the following parameters
Name |
Type |
Description |
---|---|---|
role_id |
string |
Uniquely identifies the role. |
The JSON request body contains the following parameters
Name |
Type |
Description |
---|---|---|
name |
string |
User specified name for the role. |
description |
string |
User specified description for the role. |
The requesting user must have access to the provided scope. A role without a scope is called a ‘Service Provider Role’ and only site admin may update them.
Response object: The updated role object with the specified ID.
Sample python code
role_id = '<role-id>'
req_payload = {
'name': 'Role Name',
'description': 'Role Description',
}
restclient.put('/roles/%s' % role_id, json_body=json.dumps(req_payload))