Retrieving role details
Retrieve details of a particular role.
About this task
Complete the following steps:
Procedure
- In a REST client platform, add the authentication details of the tenant from where you
want to retrieve details of a specific role.
//In case of Instance API key Headers: { "x-instance-api-key": "instance_api_key" } // In case of MCSP or ISV token Headers: { "Authorization": "mcsp_or_isv_token" } - Make a GET request at the URL of the project.
URL syntax:
<domain>/apis/v1/rest/roles/:role_uidIn this URL request, /:role_uid is the ID of the role, the details of which you want to retrieve.
Method: GET
If the request is successful, you receive the response code for success.
{ output : { "name": <role_name>, "uid": <role_uid>, "tenant_uid": <project_tenant_uid>, "permissions": [ { "project_uid": "<project_uid>", "access_list": { "read": true, "write": true, "execute":true } } ], "created_at": "<role_created_at>", "updated_at": "<role_updated_at>", } }You can alternatively add the query parameter ?edit=true to the URL request
<domain>/apis/v1/rest/roles/:roleto retrieve brief details of a particular role. On appending the specified query parameter to the URL request, you receive the output in the following format:{ output : { "name": "<role_name>", "description": "<role_description>", "projects": [{ "<project_name>": ["r", "w", "e"] }] } }