List policies
A policy is an authorization rule that controls which principals may perform which actions on matching resources. Policies connect identities to allowed operations on objects and other API resources.
Returns policy records, optionally filtered by the glob-style pattern query parameter. Each record contains policy and a nested definition with principals, actions, and objects.
Start with next=0, then pass the response's next value to retrieve another page. A response value of -1 means there are no more pages.
Use Get a policy for one identifier or Create or update a policy to save a definition. If a request returns 400, verify the cursor and pattern; for 401 or 403, check the x-api-key header and access.
{{host}}/v1/policy/match?next=0&pattern={{pattern}}- nextnumberRequired
Pagination cursor (required): use `0` for the first page; thereafter use the value returned by the previous response as the `next` query parameter. The response body returns the cursor for the next page. A value of `-1` means there is no further page — you have the last page of data.
example: 0 - patternstringOptional
Optional glob-style pattern to filter.
Values
- pattern
- *pattern
- pattern*
- *pattern*
example: *
- x-api-keyRequired
Your BigState API key.
{{apiKey}} - Content-TypeRequired
MIME type of the request body.
application/json - AcceptRequired
MIME types the client can understand in the response.
application/json
Need a session token? See Token sign in.
- 200Response body · object
Success. Returns a pagination cursor and matching policies; each row has `policy` and nested `definition` (principals, actions, objects).
- nextnumber
Pagination cursor (required): use `0` for the first page; thereafter use the value returned by the previous response as the `next` query parameter. The response body returns the cursor for the next page. A value of `-1` means there is no further page — you have the last page of data.
example: 0 - policiesarray[object]
Policies that matched the pattern on this page.
- policies[0].policystring
Unique identifier of this policy.
example: all - policies[0].definitionobject
Rule lists: principals, actions, and objects.
- policies[0].definition.principalsarray[string]
Principal patterns this policy applies to (e.g. `"*"` for all).
- policies[0].definition.actionsarray[string]
Allowed actions or patterns.
- policies[0].definition.objectsarray[string]
Object name patterns this policy governs.
- 401
Unauthorized.
- 403
Access denied. The caller does not have sufficient rights to perform this operation.
- 400Response body · object
Bad request.
{"error": 6,"desc": "Invalid request"}- errornumber
Numeric error code. Use the response `desc` field for the human-readable explanation.
- descstring
Human-readable description of the error.
List policies
List policies with optional glob pattern; each row has `policy` and nested `definition` (paginated with `next`).
curl https://api.bigstate.dev/v1/policy/match?next=0&pattern=* \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json'