diff --git a/content/v2.0/security/secrets/manage-secrets.md b/content/v2.0/security/secrets/manage-secrets.md new file mode 100644 index 000000000..053f69e45 --- /dev/null +++ b/content/v2.0/security/secrets/manage-secrets.md @@ -0,0 +1,64 @@ +--- +title: Manage secrets +description: Manage secrets in InfluxDB with the API. +v2.0/tags: [secrets, security] +menu: + v2_0: + parent: Store secrets +weight: 201 +--- + + +The following API calls allow you to manage secrets: + + +### Add secrets to an organization + +```sh +curl --request PATCH \ + --url http://localhost:9999/api/v2/orgs//secrets \ + --header 'authorization: Token YOURAUTHTOKEN' \ + --header 'content-type: application/json' \ + --data '{ + "foo": "bar", + "hello": "world" +}' + +# should return 204 no content +``` +### Retrieve an organization's secrets + +```sh +curl --request GET \ + --url http://localhost:9999/api/v2/orgs//secrets \ + --header 'authorization: Token YOURAUTHTOKEN' + +# should return +# { +# "links": { +# "org": "/api/v2/orgs/031c8cbefe101000", +# "secrets": "/api/v2/orgs/031c8cbefe101000/secrets" +# }, +# "secrets": [] +# } +``` + +### Retrieve the added secrets + +```bash +curl --request GET \ + --url http://localhost:9999/api/v2/orgs//secrets \ + --header 'authorization: Token YOURAUTHTOKEN' + +# should return +# { +# "links": { +# "org": "/api/v2/orgs/031c8cbefe101000", +# "secrets": "/api/v2/orgs/031c8cbefe101000/secrets" +# }, +# "secrets": [ +# "foo", +# "hello" +# ] +# } +``` diff --git a/content/v2.0/security/secrets/use-vault.md b/content/v2.0/security/secrets/use-vault.md index 36b42b372..7b6a74b60 100644 --- a/content/v2.0/security/secrets/use-vault.md +++ b/content/v2.0/security/secrets/use-vault.md @@ -1,7 +1,7 @@ --- title: Store secrets in Vault -description: Manage authentication tokens in InfluxDB using the InfluxDB UI or the influx CLI. -v2.0/tags: [tokens, security] +description: Manage secrets in InfluxDB using the InfluxDB UI or the influx CLI. +v2.0/tags: [secrets, security] menu: v2_0: parent: Store secrets