A role gives a user access to resources within a Workspace. Roles are additive, and can combine to configure a custom policy for a Team Member or a Group. A policy is at least one role plus one resource applied to an individual user or group.
Returns a list of Roles available to apply to permissions for users and/or groups.
object (PaginationInput) Pagination for roles. This parameter exists in v1. Example: pagination=pagination.count=2 |
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap(api.iamRoles.listRoles()) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "roles": [
- {
- "id": "1WDUuRLxv84rrfCNUwvkrRtkxnS",
- "name": "Workspace Owner",
- "description": "Owners have full read and edit access to everything in the workspace, including Sources, Destinations, add-on products, and settings. Owners have full edit access to all Team Permissions."
}, - {
- "id": "1aEWAcU0fArxScocwH9xxLgW7r3",
- "name": "Minimal Workspace Access",
- "description": "Access to view the workspace. Cannot view any sub resources or make changes to the workspace."
}
], - "pagination": {
- "current": "MA==",
- "next": "Mg=="
}
}
}