Get policy
Returns policy (id) and definition with principals, actions, and objects for the name given in the query string.
{{host}}/v1/policy?policy={{policy}}- policystringRequired
Unique identifier of the policy in the URL.
example: all
- x-api-keyRequired
Your BigState API key.
*provide api key here* - Content-TypeRequired
MIME type of the request body.
application/json - AcceptRequired
MIME types the client can understand in the response.
application/json
See authentication headers here.
- 200Response body · object
Current policy: identifier plus a `definition` object with principals, actions, and objects.
- policystring
Unique identifier of this policy.
example: all - definitionobject
Rule lists: principals, actions, and objects.
- definition.principalsarray[string]
Principal patterns this policy applies to (e.g. `"*"` for all).
- definition.actionsarray[string]
Allowed actions or patterns.
- 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.
- 404
No policy exists for the given identifier.
- 400Response body · object
Bad request.
{"error": 6,"desc": "Invalid request"}- errornumber
Numeric error code. See the error codes reference for the full list.
- descstring
Human-readable description of the error.
Get policy
Fetch `policy` id and `definition` (principals, actions, objects) by identifier.
curl https://api.bigstate.dev/v1/policy?policy=all \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json'