open-vault/website/source/docs/http/sys-policy.html.md

1.6 KiB

layout page_title sidebar_current description
http HTTP API: /sys/policy docs-http-auth-policy The `/sys/policy` endpoint is used to manage ACL policies in Vault.

/sys/policy

GET

Description
Lists all the available policies.
Method
GET
Parameters
None
Returns
```javascript
{
  "policies": ["root", "deploy"]
}
```

/sys/policy/

GET

Description
Retrieve the rules for the named policy.
Method
GET
URL
`/sys/policy/`
Parameters
None
Returns
```javascript
{
  "rules": "path..."
}
```

PUT

Description
Add or update a policy. Once a policy is updated, it takes effect immediately to all associated users.
Method
PUT
URL
`/sys/policy/`
Parameters
  • rules required The policy document.
Returns
`204` response code.

DELETE

Description
Delete the policy with the given name. This will immediately affect all associated users.
Method
DELETE
URL
`/sys/policy/`
Parameters
None
Returns
`204` response code.