Role

List roles

GET
List available user roles in an Organization.

Path parameters

organizationIdstringRequired
The Organization's ID.

Query parameters

includeDefaultRolesbooleanOptional
Whether to include default Astro roles in the returned list.
scopeTypesenumOptional
Filter the list of roles based on the scope of each role.
Allowed values: DEPLOYMENTWORKSPACEORGANIZATION
offsetintegerOptional
Offset for pagination.
limitintegerOptional
Limit for pagination.
sortsenumOptional
Sorting criteria, each criterion should conform to format 'fieldName:asc' or 'fieldName:desc'.

Response

This endpoint returns an object
limit
integer
The number of custom roles returned.
offset
integer
The offset of the custom roles.
roles
list of objects
The list of custom roles.
totalCount
integer
The total number of custom roles.
defaultRoles
list of objectsOptional
The list of default roles.
GET
1curl https://api.astronomer.io/iam/v1beta1/organizations/organizationId/roles \
2 -H "Authorization: Bearer <token>"
Response
1{
2 "limit": 1,
3 "offset": 1,
4 "roles": [
5 {
6 "createdAt": "createdAt",
7 "createdBy": {
8 "id": "clm8qv74h000008mlf08scq7k",
9 "apiTokenName": "my-token",
10 "avatarUrl": "https://avatar.url",
11 "fullName": "Jane Doe",
12 "username": "user1@company.com"
13 },
14 "id": "cluc9tapx000901qn2xrgqdmn",
15 "name": "Deployment_Viewer",
16 "restrictedWorkspaceIds": [
17 "restrictedWorkspaceIds"
18 ],
19 "scopeType": "DEPLOYMENT",
20 "updatedAt": "updatedAt",
21 "updatedBy": {
22 "id": "clm8qv74h000008mlf08scq7k",
23 "apiTokenName": "my-token",
24 "avatarUrl": "https://avatar.url",
25 "fullName": "Jane Doe",
26 "username": "user1@company.com"
27 },
28 "description": "Subject can only view deployments."
29 }
30 ],
31 "totalCount": 1,
32 "defaultRoles": [
33 {
34 "name": "Deployment_Viewer",
35 "permissions": [
36 "permissions"
37 ],
38 "scopeType": "DEPLOYMENT",
39 "description": "Subject can only view deployments."
40 }
41 ]
42}