open-vault/website/pages/docs/commands/token/capabilities.mdx
Jeff Escalante 4f87851926 [website] Link Cleaning (#8205)
* update dependencies

* remove hard-coded vaultproject.io on local links

* remove 'index.html' from internal links

* remove '.html' at end of internal links

* manual review cleanup

Co-authored-by: Calvin Leung Huang <cleung2010@gmail.com>
2020-01-22 12:05:41 -08:00

46 lines
1.2 KiB
Plaintext

---
layout: docs
page_title: token capabilities - Command
sidebar_title: <code>capabilities</code>
description: |-
The "token capabilities" command fetches the capabilities of a token for a
given path.
---
# token capabilities
The `token capabilities` command fetches the capabilities of a token for a given
path.
If a TOKEN is provided as an argument, this command uses the "/sys/capabilities"
endpoint and permission. If no TOKEN is provided, this command uses the
"/sys/capabilities-self" endpoint and permission with the locally authenticated
token.
## Examples
List capabilities for the local token on the "secret/foo" path:
```text
$ vault token capabilities secret/foo
read
```
List capabilities for a token on the "cubbyhole/foo" path:
```text
$ vault token capabilities 96ddf4bc-d217-f3ba-f9bd-017055595017 database/creds/readonly
deny
```
## Usage
The following flags are available in addition to the [standard set of
flags](/docs/commands) included on all commands.
### Output Options
- `-format` `(string: "table")` - Print the output in the given format. Valid
formats are "table", "json", or "yaml". This can also be specified via the
`VAULT_FORMAT` environment variable.