/approval-policiesList Approval Policies
Lists the project's approval policies (apo_...), oldest first.
Each policy applies to one collection and one write operation, and carries a predicate and an action: auto_approve lets a matching write skip review, queue sends it for approval.
When a write needs review, the matching policies are checked oldest first and the first match decides.
Any member with read access to the project can list them.
The list isn't paginated.
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | Success | |
| 401 | K9O_SESSION_EXPIRED | The caller's session token is expired or invalid; re-authenticate to continue. |
| 403 | K9O_ACCESS_DENIED | The caller does not hold the minimum required role to list approval policies for this project. |
| data * | object[] | The project's approval policies, oldest first. |
| id * | string | The policy id ( |
| collection * | string | The collection whose writes the policy applies to. |
| operation * | "insert" | "update" | "delete" | The kind of write the policy applies to. |
| predicate * | object | The condition, as a JSON predicate: Operators: A string that starts with
Any other value is a literal. |
| action * | "auto_approve" | "queue" | What happens to a matching write: Policies for the same collection and operation are tried oldest first, and the first whose predicate matches decides. |
| authoredBy * | string | The id of the user who created the policy ( |
| createdAt * | string <date-time> | When the policy was created. |
| meta * | any |
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.approvalPolicies.list()Showing example in TypeScript
{
"data": [
{
"id": "string",
"collection": "string",
"operation": "insert",
"action": "auto_approve",
"authoredBy": "string",
"createdAt": "string"
}
]
}