2015-04-19 05:39:43 +00:00
|
|
|
---
|
|
|
|
layout: "http"
|
|
|
|
page_title: "HTTP API: /sys/policy"
|
|
|
|
sidebar_current: "docs-http-auth-policy"
|
|
|
|
description: |-
|
|
|
|
The `/sys/policy` endpoint is used to manage ACL policies in Vault.
|
|
|
|
---
|
|
|
|
|
|
|
|
# /sys/policy
|
|
|
|
|
|
|
|
## GET
|
|
|
|
|
|
|
|
<dl>
|
2015-04-22 23:47:11 +00:00
|
|
|
<dt>Description</dt>
|
|
|
|
<dd>
|
|
|
|
Lists all the available policies.
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>Method</dt>
|
|
|
|
<dd>GET</dd>
|
|
|
|
|
|
|
|
<dt>Parameters</dt>
|
|
|
|
<dd>
|
|
|
|
None
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>Returns</dt>
|
|
|
|
<dd>
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
{
|
|
|
|
"policies": ["root", "deploy"]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
</dd>
|
2015-04-19 05:39:43 +00:00
|
|
|
</dl>
|
|
|
|
|
|
|
|
## PUT
|
|
|
|
|
|
|
|
<dl>
|
2015-04-22 23:47:11 +00:00
|
|
|
<dt>Description</dt>
|
|
|
|
<dd>
|
|
|
|
Add or update a policy. Once a policy is updated, it takes effect
|
|
|
|
immediately to all associated users.
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>Method</dt>
|
|
|
|
<dd>PUT</dd>
|
|
|
|
|
|
|
|
<dt>URL</dt>
|
|
|
|
<dd>`/sys/policy/<name>`</dd>
|
|
|
|
|
|
|
|
<dt>Parameters</dt>
|
|
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<span class="param">rules</span>
|
|
|
|
<span class="param-flags">required</span>
|
|
|
|
The policy document.
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>Returns</dt>
|
2015-04-24 18:06:50 +00:00
|
|
|
<dd>`204` response code.
|
2015-04-22 23:47:11 +00:00
|
|
|
</dd>
|
2015-04-19 05:39:43 +00:00
|
|
|
</dl>
|
|
|
|
|
|
|
|
## DELETE
|
|
|
|
|
|
|
|
<dl>
|
2015-04-22 23:47:11 +00:00
|
|
|
<dt>Description</dt>
|
|
|
|
<dd>
|
|
|
|
Delete the policy with the given name. This will immediately
|
|
|
|
affect all associated users.
|
|
|
|
</dd>
|
2015-04-19 05:39:43 +00:00
|
|
|
|
2015-04-22 23:47:11 +00:00
|
|
|
<dt>Method</dt>
|
|
|
|
<dd>DELETE</dd>
|
2015-04-19 05:39:43 +00:00
|
|
|
|
2015-04-22 23:47:11 +00:00
|
|
|
<dt>URL</dt>
|
|
|
|
<dd>`/sys/policy/<name>`</dd>
|
2015-04-19 05:39:43 +00:00
|
|
|
|
2015-04-22 23:47:11 +00:00
|
|
|
<dt>Parameters</dt>
|
|
|
|
<dd>None
|
|
|
|
</dd>
|
2015-04-19 05:39:43 +00:00
|
|
|
|
2015-04-22 23:47:11 +00:00
|
|
|
<dt>Returns</dt>
|
2015-04-24 18:06:50 +00:00
|
|
|
<dd>`204` response code.
|
2015-04-22 23:47:11 +00:00
|
|
|
</dd>
|
2015-04-19 05:39:43 +00:00
|
|
|
</dl>
|