Skip to content
Start here

Policies

List policies
client.zeroTrust.cws.policies.list(PolicyListParams { account_id, cursor, direction, 5 more } params, RequestOptionsoptions?): CursorPagination<Policy { id, created_at, entrypoint, 7 more } >
GET/accounts/{account_id}/cws/policies
Get a policy by ID
client.zeroTrust.cws.policies.get(stringpolicyID, PolicyGetParams { account_id } params, RequestOptionsoptions?): Policy { id, created_at, entrypoint, 7 more }
GET/accounts/{account_id}/cws/policies/{policy_id}
Create a new policy
client.zeroTrust.cws.policies.create(PolicyCreateParams { account_id, entrypoint, filter, 4 more } params, RequestOptionsoptions?): Policy { id, created_at, entrypoint, 7 more }
POST/accounts/{account_id}/cws/policies
Update a policy
client.zeroTrust.cws.policies.update(stringpolicyID, PolicyUpdateParams { account_id, entrypoint, filter, 4 more } params, RequestOptionsoptions?): Policy { id, created_at, entrypoint, 7 more }
PUT/accounts/{account_id}/cws/policies/{policy_id}
Delete a policy
client.zeroTrust.cws.policies.delete(stringpolicyID, PolicyDeleteParams { account_id } params, RequestOptionsoptions?): PolicyDeleteResponse { id }
DELETE/accounts/{account_id}/cws/policies/{policy_id}
ModelsExpand Collapse
Policy { id, created_at, entrypoint, 7 more }
id: string

Server-assigned UUID

formatuuid
created_at: string
formatdate-time
entrypoint: string

Non-function rule declared in rego_source. Evaluation uses data.<package_path>..

maxLength255
filter: string

Filter expression that determines whether this policy applies. Maximum 4096 UTF-8 bytes.

maxLength4096
minLength1
name: string

Human-readable name; unique per account

maxLength100
minLength1
package_path: string

Dotted path derived from rego_source. Begins with policy. and is unique per account.

maxLength1024
rego_source: string

Inline Rego source with a package beginning with “policy.” Maximum 16384 UTF-8 bytes.

maxLength16384
minLength1
tags: Record<string, string>

Tags attached to this policy

updated_at: string
formatdate-time
description?: string

Optional free-form description.

maxLength1024
PolicyDeleteResponse { id }
id: string
formatuuid