List application role assignments
List application role assignments
client.zones.applications.roles.list(stringapplicationID, RoleListParams { zoneId, after, before, 2 more } params, RequestOptionsoptions?): RoleListResponse { items, pagination }
GET/zones/{zoneId}/applications/{applicationId}/roles
Returns the roles assigned to the specified application within the zone. The full result set is currently returned in a single page; the after/before/limit cursor parameters are reserved and not yet enforced, and pagination cursors are always null.
Parameters
applicationID: string
Returns
List application role assignments
import KeycardAPI from '@keycardai/api';
const client = new KeycardAPI({
apiKey: process.env['KEYCARD_API_API_KEY'], // This is the default and can be omitted
});
const roles = await client.zones.applications.roles.list('applicationId', { zoneId: 'zoneId' });
console.log(roles.items);{
"items": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"principal_id": "principal_id",
"principal_type": "principal_type",
"role_id": "role_id",
"role_identifier": "role_identifier",
"role_owner_type": "platform",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id",
"scope_id": "scope_id",
"scope_type": "scope_type"
}
],
"pagination": {
"after_cursor": "x",
"before_cursor": "x",
"total_count": 0
}
}Returns Examples
{
"items": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"principal_id": "principal_id",
"principal_type": "principal_type",
"role_id": "role_id",
"role_identifier": "role_identifier",
"role_owner_type": "platform",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id",
"scope_id": "scope_id",
"scope_type": "scope_type"
}
],
"pagination": {
"after_cursor": "x",
"before_cursor": "x",
"total_count": 0
}
}