2019-05-01 21:11:23 +00:00
|
|
|
---
|
2020-09-01 15:14:13 +00:00
|
|
|
layout: commands
|
2020-04-07 18:55:19 +00:00
|
|
|
page_title: 'Commands: ACL Token List'
|
2019-05-01 21:11:23 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Consul ACL Token List
|
|
|
|
|
|
|
|
Command: `consul acl token list`
|
|
|
|
|
2023-01-25 16:52:43 +00:00
|
|
|
Corresponding HTTP API Endpoint: [\[GET\] /v1/acl/tokens](/consul/api-docs/acl/tokens#list-tokens)
|
2022-01-10 17:40:11 +00:00
|
|
|
|
2019-05-01 21:11:23 +00:00
|
|
|
The `acl token list` command lists all tokens. By default it will not show metadata.
|
|
|
|
|
2023-01-25 16:52:43 +00:00
|
|
|
The table below shows this command's [required ACLs](/consul/api-docs/api-structure#authentication). Configuration of
|
|
|
|
[blocking queries](/consul/api-docs/features/blocking) and [agent caching](/consul/api-docs/features/caching)
|
2022-01-10 21:44:56 +00:00
|
|
|
are not supported from commands, but may be from the corresponding HTTP endpoint.
|
|
|
|
|
|
|
|
| ACL Required |
|
|
|
|
| ------------ |
|
|
|
|
| `acl:read` |
|
|
|
|
|
2019-05-01 21:11:23 +00:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
Usage: `consul acl token list`
|
|
|
|
|
|
|
|
#### Command Options
|
|
|
|
|
2020-04-07 18:55:19 +00:00
|
|
|
- `-meta` - Indicates that token metadata such as the content hash and
|
|
|
|
Raft indices should be shown for each entry.
|
2019-05-01 21:11:23 +00:00
|
|
|
|
2020-04-07 18:55:19 +00:00
|
|
|
- `-format={pretty|json}` - Command output format. The default value is `pretty`.
|
2020-03-26 16:03:22 +00:00
|
|
|
|
2019-12-06 16:14:56 +00:00
|
|
|
#### Enterprise Options
|
|
|
|
|
2022-07-27 06:17:11 +00:00
|
|
|
@include 'http_api_partition_options.mdx'
|
|
|
|
|
2020-04-07 18:55:19 +00:00
|
|
|
@include 'http_api_namespace_options.mdx'
|
2019-12-06 16:14:56 +00:00
|
|
|
|
2022-07-27 06:17:11 +00:00
|
|
|
#### API Options
|
|
|
|
|
|
|
|
@include 'http_api_options_client.mdx'
|
|
|
|
|
|
|
|
@include 'http_api_options_server.mdx'
|
2021-12-15 01:55:21 +00:00
|
|
|
|
2019-05-01 21:11:23 +00:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
Default listing.
|
|
|
|
|
2020-05-19 18:32:38 +00:00
|
|
|
```shell-session
|
2019-05-01 21:11:23 +00:00
|
|
|
$ consul acl token list
|
|
|
|
AccessorID: 4d123dff-f460-73c3-02c4-8dd64d136e01
|
|
|
|
Description: Bootstrap Token (Global Management)
|
|
|
|
Local: false
|
|
|
|
Create Time: 2018-10-22 11:27:04.479026 -0400 EDT
|
|
|
|
Legacy: false
|
|
|
|
Policies:
|
|
|
|
00000000-0000-0000-0000-000000000001 - global-management
|
|
|
|
|
|
|
|
AccessorID: 00000000-0000-0000-0000-000000000002
|
|
|
|
Description: Anonymous Token
|
|
|
|
Local: false
|
|
|
|
Create Time: 0001-01-01 00:00:00 +0000 UTC
|
|
|
|
Legacy: false
|
|
|
|
Policies:
|
|
|
|
06acc965-df4b-5a99-58cb-3250930c6324 - node-services-read
|
|
|
|
|
|
|
|
AccessorID: 986193b5-e2b5-eb26-6264-b524ea60cc6d
|
|
|
|
Description: WonderToken
|
|
|
|
Local: false
|
|
|
|
Create Time: 2018-10-22 15:33:39.01789 -0400 EDT
|
|
|
|
Legacy: false
|
|
|
|
Policies:
|
|
|
|
06acc965-df4b-5a99-58cb-3250930c6324 - node-services-read
|
2022-01-04 20:44:43 +00:00
|
|
|
Service Identities:
|
|
|
|
wonderservice (Datacenters: all)
|
|
|
|
|
|
|
|
AccessorID: def4895d-eeb9-f78a-fbb9-2a15a568af31
|
|
|
|
Description: Node 1 agent token
|
|
|
|
Local: false
|
|
|
|
Create Time: 2020-12-22 04:19:30.552528733 +0000 UTC
|
|
|
|
Legacy: false
|
|
|
|
Node Identities:
|
|
|
|
node1 (Datacenter: dc1)
|
2019-05-01 21:11:23 +00:00
|
|
|
```
|