Secrets

Download InfluxDB API Spec
Create and manage secrets (key-value pairs) for use in InfluxDB OSS v2 Flux scripts and tasks.
GET /api/v2/orgs/{orgID}/secrets

List all secret keys for an organization

Parameters

Path parameters
orgID required string
The organization ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request GET \
  "http://localhost:8086/api/v2/orgs/{orgID}/secrets" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

200 A list of all secret keys
default Unexpected error
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
PATCH /api/v2/orgs/{orgID}/secrets

Update secrets in an organization

Parameters

Path parameters
orgID required string
The organization ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context

Request body required

Secret key value pairs to update/add
Content-Type: application/json
Example request body
{
  "apikey": "abc123xyz"
}
Example request Ask AI about this
curl --request PATCH \
  "http://localhost:8086/api/v2/orgs/{orgID}/secrets" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{"apikey":"abc123xyz"}'

Responses

204 Keys successfully patched
default Unexpected error
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
DELETE /api/v2/orgs/{orgID}/secrets/{secretID}

Delete a secret from an organization

Parameters

Path parameters
orgID required string
The organization ID.
secretID required string
The secret ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request DELETE \
  "http://localhost:8086/api/v2/orgs/{orgID}/secrets/{secretID}" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

204 Keys successfully deleted
default Non 2XX error response from server.
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
POST /api/v2/orgs/{orgID}/secrets/delete

Delete secrets from an organization

Parameters

Path parameters
orgID required string
The organization ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context

Request body required

Secret key to delete
Content-Type: application/json
secrets string[]
Example request Ask AI about this
curl --request POST \
  "http://localhost:8086/api/v2/orgs/{orgID}/secrets/delete" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "secrets": [
    "example"
  ]
}'

Responses

204 Keys successfully patched
default Unexpected error
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.

Was this page helpful?

Thank you for your feedback!