Sources

Download InfluxDB API Spec
Manage data sources configured in InfluxDB OSS v2.
GET /api/v2/sources

List all sources

Parameters

Query parameters
org string
The name of the organization.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request GET \
  "http://localhost:8086/api/v2/sources" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

200 A list of sources
links object
self string <uri>
sources object[]
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.
POST /api/v2/sources

Create a source

Parameters

Header parameters
Zap-Trace-Span string
OpenTracing span context

Request body required

Source to create
Content-Type: application/json
default boolean
defaultRP string
id string
insecureSkipVerify boolean
languages string[]
links object
buckets string
health string
query string
self string
metaUrl string <uri>
name string
orgID string
password string
sharedSecret string
telegraf string
token string
type string
Allowed: v1 , v2 , self
url string <uri>
username string
Example request Ask AI about this
curl --request POST \
  "http://localhost:8086/api/v2/sources" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "default": false,
  "defaultRP": "DEFAULTRP",
  "id": "ID",
  "insecureSkipVerify": false,
  "languages": [
    "example"
  ],
  "links": {},
  "metaUrl": "METAURL",
  "name": "NAME",
  "orgID": "ORGID",
  "password": "PASSWORD",
  "sharedSecret": "SHAREDSECRET",
  "telegraf": "TELEGRAF",
  "token": "TOKEN",
  "type": "v1",
  "url": "URL",
  "username": "USERNAME"
}'

Responses

201 Created Source
default boolean
defaultRP string
id string
insecureSkipVerify boolean
languages string[]
links object
buckets string
health string
query string
self string
metaUrl string <uri>
name string
orgID string
password string
sharedSecret string
telegraf string
token string
type string
Allowed: v1 , v2 , self
url string <uri>
username string
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.
GET /api/v2/sources/{sourceID}

Retrieve a source

Parameters

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

Responses

200 A source
default boolean
defaultRP string
id string
insecureSkipVerify boolean
languages string[]
links object
buckets string
health string
query string
self string
metaUrl string <uri>
name string
orgID string
password string
sharedSecret string
telegraf string
token string
type string
Allowed: v1 , v2 , self
url string <uri>
username string
404 Source not found
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.
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/sources/{sourceID}

Update a Source

Parameters

Path parameters
sourceID required string
The source ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context

Request body required

Source update
Content-Type: application/json
default boolean
defaultRP string
id string
insecureSkipVerify boolean
languages string[]
links object
buckets string
health string
query string
self string
metaUrl string <uri>
name string
orgID string
password string
sharedSecret string
telegraf string
token string
type string
Allowed: v1 , v2 , self
url string <uri>
username string
Example request Ask AI about this
curl --request PATCH \
  "http://localhost:8086/api/v2/sources/{sourceID}" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "default": false,
  "defaultRP": "DEFAULTRP",
  "id": "ID",
  "insecureSkipVerify": false,
  "languages": [
    "example"
  ],
  "links": {},
  "metaUrl": "METAURL",
  "name": "NAME",
  "orgID": "ORGID",
  "password": "PASSWORD",
  "sharedSecret": "SHAREDSECRET",
  "telegraf": "TELEGRAF",
  "token": "TOKEN",
  "type": "v1",
  "url": "URL",
  "username": "USERNAME"
}'

Responses

200 Created Source
default boolean
defaultRP string
id string
insecureSkipVerify boolean
languages string[]
links object
buckets string
health string
query string
self string
metaUrl string <uri>
name string
orgID string
password string
sharedSecret string
telegraf string
token string
type string
Allowed: v1 , v2 , self
url string <uri>
username string
404 Source not found
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.
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/sources/{sourceID}

Delete a source

Parameters

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

Responses

204 Delete has been accepted
404 View not found
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.
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.
GET /api/v2/sources/{sourceID}/buckets

Get buckets in a source

Parameters

Path parameters
sourceID required string
The source ID.
Query parameters
org string
The name of the organization.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request GET \
  "http://localhost:8086/api/v2/sources/{sourceID}/buckets" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

200 A source
buckets object[]
links string
404 Source not found
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.
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.
GET /api/v2/sources/{sourceID}/health

Get the health of a source

Parameters

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

Responses

200 The source is healthy
checks object[]
commit string
message string
name required string
status required string
Allowed: pass , fail
version string
503 The source is not healthy
checks object[]
commit string
message string
name required string
status required string
Allowed: pass , fail
version string
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!