List policy schemas
zones.policy_schemas.list(strzone_id, PolicySchemaListParams**kwargs) -> PolicySchemaListResponse
GET/zones/{zone_id}/policy-schemas
List policy schemas
Parameters
zone_id: str
after: Optional[str]
Return items after this cursor (forward pagination). Use after_cursor from a previous response. Mutually exclusive with before.
before: Optional[str]
Return items before this cursor (backward pagination). Use before_cursor from a previous response. Mutually exclusive with after.
expand: Optional[List[Literal["total_count"]]]
Opt-in to additional response fields
Filter schemas by default status. When true, returns only the zone's default schema. When false, returns only non-default schemas. Omit to return all schemas.
limit: Optional[int]
Maximum number of items to return
maximum100
minimum1
sort: Optional[Literal["created_at"]]
Field to sort by.
x_api_version: Optional[str]
x_client_request_id: Optional[str]
formatuuid
Returns
List policy schemas
from keycardai_api import KeycardAPI
client = KeycardAPI()
policy_schemas = client.zones.policy_schemas.list(
zone_id="zone_id",
)
print(policy_schemas.items){
"items": [
{
"created_at": "2019-12-27T18:11:19.117Z",
"status": "active",
"updated_at": "2019-12-27T18:11:19.117Z",
"version": "version",
"archived_at": "2019-12-27T18:11:19.117Z",
"cedar_schema": "cedar_schema",
"cedar_schema_json": {},
"deprecated_at": "2019-12-27T18:11:19.117Z",
"is_default": true
}
],
"pagination": {
"after_cursor": "after_cursor",
"before_cursor": "before_cursor",
"total_count": 0
}
}Returns Examples
{
"items": [
{
"created_at": "2019-12-27T18:11:19.117Z",
"status": "active",
"updated_at": "2019-12-27T18:11:19.117Z",
"version": "version",
"archived_at": "2019-12-27T18:11:19.117Z",
"cedar_schema": "cedar_schema",
"cedar_schema_json": {},
"deprecated_at": "2019-12-27T18:11:19.117Z",
"is_default": true
}
],
"pagination": {
"after_cursor": "after_cursor",
"before_cursor": "before_cursor",
"total_count": 0
}
}