Create or update policy
Creates or updates a policy named by the policy query parameter. The body lists principals, actions, and objects as string patterns (e.g. "*" for all). On success the API returns 204 No Content with an empty body.
{{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.
- Allow all principals, actions, objects{"principals": ["*"],"actions": ["*"],"objects": ["*"]}
- principalsarray[string]Required
Principal patterns this policy applies to (e.g. `"*"` for all).
- actionsarray[string]Required
Allowed actions or patterns.
- objectsarray[string]Required
Object name patterns this policy governs.
- 204Response body · no content
Policy was created or updated. No response body.
- 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. See the error codes reference for the full list.
- descstring
Human-readable description of the error.
Create or update policy
Set principals, actions, and object patterns for a policy identifier. Success: 204, no body.
curl https://api.bigstate.dev/v1/policy?policy=all \
--request POST \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"principals": [
"*"
],
"actions": [
"*"
],
"objects": [
"*"
]
}'