Get group
Get group
client.zones.groups.retrieve(stringgroupID, GroupRetrieveParams { zoneId, expand } params, RequestOptionsoptions?): Group { id, created_at, external, 7 more }
GET/zones/{zoneId}/groups/{groupId}
Returns a group by ID. Pass expand[]=member_count for its member count and expand[]=roles for the identifiers of its assigned roles.
Parameters
groupID: string
Returns
Get group
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 group = await client.zones.groups.retrieve('groupId', { zoneId: 'zoneId' });
console.log(group.id);{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"external": true,
"identifier": "identifier",
"name": "name",
"organization_id": "organization_id",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id",
"member_count": 0,
"roles": [
"string"
]
}Returns Examples
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"external": true,
"identifier": "identifier",
"name": "name",
"organization_id": "organization_id",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id",
"member_count": 0,
"roles": [
"string"
]
}