List policy sets in a zone
List policy sets in a zone
client.zones.policySets.list(stringzoneID, PolicySetListParams { active, after, before, 11 more } params?, RequestOptionsoptions?): PolicySetListResponse { items, pagination }
GET/zones/{zone_id}/policy-sets
List policy sets in a zone
Parameters
zoneID: string
Returns
List policy sets in a zone
import KeycardAPI from '@keycardai/api';
const client = new KeycardAPI();
const policySets = await client.zones.policySets.list('zone_id');
console.log(policySets.items);{
"items": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": "created_by",
"name": "name",
"owner_type": "platform",
"scope_type": "zone",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id",
"archived_at": "2019-12-27T18:11:19.117Z",
"latest_version": 0,
"latest_version_id": "latest_version_id",
"updated_by": "updated_by",
"active": true,
"active_version": 0,
"active_version_id": "active_version_id",
"mode": "active",
"scope_target_id": "scope_target_id",
"shadow_version": 0,
"shadow_version_id": "shadow_version_id"
}
],
"pagination": {
"after_cursor": "x",
"before_cursor": "x",
"total_count": 0
}
}Returns Examples
{
"items": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": "created_by",
"name": "name",
"owner_type": "platform",
"scope_type": "zone",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id",
"archived_at": "2019-12-27T18:11:19.117Z",
"latest_version": 0,
"latest_version_id": "latest_version_id",
"updated_by": "updated_by",
"active": true,
"active_version": 0,
"active_version_id": "active_version_id",
"mode": "active",
"scope_target_id": "scope_target_id",
"shadow_version": 0,
"shadow_version_id": "shadow_version_id"
}
],
"pagination": {
"after_cursor": "x",
"before_cursor": "x",
"total_count": 0
}
}