Setup

Download InfluxDB API Spec
Configure a new InfluxDB OSS v2 instance, including creating the initial user, organization, bucket, and API token.
GET /api/v2/setup

Check if database has default user, org, bucket

Returns true if no default user, organization, or bucket has been created.

Parameters

Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request GET \
  "http://localhost:8086/api/v2/setup" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

200 allowed true or false
allowed boolean
If true, the InfluxDB instance hasn’t had initial setup; false otherwise.
POST /api/v2/setup

Set up initial user, org and bucket

Post an onboarding request to set up initial user, org and bucket.

Parameters

Header parameters
Zap-Trace-Span string
OpenTracing span context

Request body required

Source to create
Content-Type: application/json
bucket required string
org required string
password string
retentionPeriodHrs integer
Retention period in nanoseconds for the new bucket. This key’s name has been misleading since OSS 2.0 GA, please transition to use retentionPeriodSeconds
retentionPeriodSeconds integer <int64>
token string
Authentication token to set on the initial user. If not specified, the server will generate a token.
username required string
Example request Ask AI about this
curl --request POST \
  "http://localhost:8086/api/v2/setup" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "bucket": "BUCKET",
  "org": "ORG",
  "password": "PASSWORD",
  "retentionPeriodHrs": 0,
  "retentionPeriodSeconds": 0,
  "token": "TOKEN",
  "username": "USERNAME"
}'

Responses

201 Created default user, bucket, org
auth string
bucket string
org string
user string
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.

Was this page helpful?

Thank you for your feedback!