Skip to content

Commit

Permalink
Documentation for capabilities and capabilities-self APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalnayak committed Mar 5, 2016
1 parent 0f82724 commit d1474ee
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 0 deletions.
44 changes: 44 additions & 0 deletions website/source/docs/http/sys-capabilities-self.html.md
@@ -0,0 +1,44 @@
---
layout: "http"
page_title: "HTTP API: /sys/capabilities-self"
sidebar_current: "docs-http-auth-capabilities-self"
description: |-
The `/sys/capabilities-self` endpoint is used to fetch the capabilities of client token on a given path.
---

# /sys/capabilities-self

## POST

<dl>
<dt>Description</dt>
<dd>
Returns the capabilities of client token on the given path.
Client token is the Vault token with which this API call is made.
</dd>

<dt>Method</dt>
<dd>POST</dd>

<dt>Parameters</dt>
<dd>
<ul>
<li>
<span class="param">path</span>
<span class="param-flags">required</span>
Path on which the client token's capabilities will be checked.
</li>
</ul>
</dd>

<dt>Returns</dt>
<dd>

```javascript
{
"capabilities": ["read", "list"]
}
```

</dd>
</dl>
48 changes: 48 additions & 0 deletions website/source/docs/http/sys-capabilities.html.md
@@ -0,0 +1,48 @@
---
layout: "http"
page_title: "HTTP API: /sys/capabilities"
sidebar_current: "docs-http-auth-capabilities"
description: |-
The `/sys/capabilities` endpoint is used to fetch the capabilities of a token on a given path.
---

# /sys/capabilities

## POST

<dl>
<dt>Description</dt>
<dd>
Returns the capabilities of the token on the given path.
</dd>

<dt>Method</dt>
<dd>POST</dd>

<dt>Parameters</dt>
<dd>
<ul>
<li>
<span class="param">token</span>
<span class="param-flags">required</span>
Token for which capabilities are being queried.
</li>
<li>
<span class="param">path</span>
<span class="param-flags">required</span>
Path on which the token's capabilities will be checked.
</li>
</ul>
</dd>

<dt>Returns</dt>
<dd>

```javascript
{
"capabilities": ["read", "list"]
}
```

</dd>
</dl>
8 changes: 8 additions & 0 deletions website/source/layouts/http.erb
Expand Up @@ -69,6 +69,14 @@
<li<%= sidebar_current("docs-http-auth-policy") %>>
<a href="/docs/http/sys-policy.html">/sys/policy</a>
</li>

<li<%= sidebar_current("docs-http-auth-capabilities") %>>
<a href="/docs/http/sys-capabilities.html">/sys/capabilities</a>
</li>

<li<%= sidebar_current("docs-http-auth-capabilities-self") %>>
<a href="/docs/http/sys-capabilities-self.html">/sys/capabilities-self</a>
</li>
</ul>
</li>

Expand Down

0 comments on commit d1474ee

Please sign in to comment.