Retrieving a list of roles
Retrieve a collection of roles associated with a particular tenant.
Procedure
- In a REST client platform, add the authentication details of the tenant from where you
want to retrieve a list of roles.
//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/rolesYou can control and filter the output response by using the URL query parameters. In this URL request,
- If you want to skip some pages at the beginning of the collection in the response, append the query parameter ?skip=n to the URL request. Where n is the number of pages that you want to skip. The default value for n is 0.
- If you want to define the maximum page size to start from the n-th one, append ?limit=m to the URL request. Where m is the total number of records that you want to include in the response. The default value for m is 1000.
Method: GET
If the request is successful, you receive the response code for success.{ output: { "count": <tenant_role_count>, "objects": [{ "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>", }] } }