2020-02-10 22:42:18 +00:00
|
|
|
---
|
|
|
|
title: View secret keys
|
|
|
|
description: View secret keys using the `influx` CLI or the InfluxDB API.
|
2020-07-29 16:02:10 +00:00
|
|
|
influxdb/v2.0/tags: [secrets, security]
|
2020-02-10 22:42:18 +00:00
|
|
|
menu:
|
2020-07-28 22:34:16 +00:00
|
|
|
influxdb_2_0:
|
2020-02-10 22:42:18 +00:00
|
|
|
parent: Manage secrets
|
|
|
|
weight: 302
|
2021-08-19 18:37:21 +00:00
|
|
|
aliases:
|
|
|
|
- /influxdb/v2.0/security/secrets/manage-secrets/view/
|
2020-02-10 22:42:18 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
View secret keys using the `influx` command line interface (CLI) or the InfluxDB API.
|
|
|
|
|
2021-08-19 17:32:22 +00:00
|
|
|
- [View secret keys using the influx CLI](#view-secret-keys-using-the-influx-cli)
|
|
|
|
- [View secret keys using the InfluxDB API](#view-secret-keys-using-the-influxdb-api)
|
|
|
|
|
2020-02-10 22:42:18 +00:00
|
|
|
## View secret keys using the influx CLI
|
2020-08-31 19:47:22 +00:00
|
|
|
Use the [`influx secret list` command](/influxdb/v2.0/reference/cli/influx/secret/list/)
|
2020-02-10 22:42:18 +00:00
|
|
|
to list your organization's secret keys.
|
|
|
|
|
|
|
|
```sh
|
2020-02-11 15:29:35 +00:00
|
|
|
influx secret list
|
2020-02-10 22:42:18 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## View secret keys using the InfluxDB API
|
|
|
|
Use the `GET` request method and the InfluxDB `/orgs/{orgID}/secrets` API endpoint
|
|
|
|
to view your organization's secrets keys.
|
|
|
|
|
|
|
|
**Include the following:**
|
|
|
|
|
2020-08-31 19:47:22 +00:00
|
|
|
- Your [organization ID](/influxdb/v2.0/organizations/view-orgs/#view-your-organization-id) in the request URL
|
2021-08-10 17:08:35 +00:00
|
|
|
- Your [API token](/influxdb/v2.0/security/tokens/view-tokens/) in the `Authorization` header
|
2020-02-10 22:42:18 +00:00
|
|
|
|
|
|
|
<!-- -->
|
|
|
|
```sh
|
2020-10-26 23:01:09 +00:00
|
|
|
curl --request GET http://localhost:8086/api/v2/orgs/<org-id>/secrets \
|
2021-10-26 18:23:44 +00:00
|
|
|
--header 'Authorization: Token YOUR_API_TOKEN'
|
2020-02-10 22:42:18 +00:00
|
|
|
```
|