Set the default policy schema for a zone
Set the default policy schema for a zone
client.zones.policySchemas.setDefault(stringversion, PolicySchemaSetDefaultParams { zone_id, body, xAPIVersion, xClientRequestID } params, RequestOptionsoptions?): SchemaVersionWithZoneInfo { is_default }
PATCH/zones/{zone_id}/policy-schemas/{version}
Set the default policy schema for a zone
Parameters
version: string
Returns
Set the default policy schema for a zone
import KeycardAPI from '@keycardai/api';
const client = new KeycardAPI();
const schemaVersionWithZoneInfo = await client.zones.policySchemas.setDefault('version', {
zone_id: 'zone_id',
});
console.log(schemaVersionWithZoneInfo);{
"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
}Returns Examples
{
"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
}