Telegrafs

Download InfluxDB API Spec
Create and manage Telegraf agent configurations that collect and write data to InfluxDB OSS v2.
GET /api/v2/telegrafs

List all Telegraf configurations

Parameters

Query parameters
orgID string
The organization ID the Telegraf config belongs to.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request GET \
  "http://localhost:8086/api/v2/telegrafs" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

200 A list of Telegraf configurations
configurations object[]
config string
description string
id string
labels object[]
id string
name string
orgID string
properties object
Key-value pairs associated with this label. To remove a property, send an update with an empty value ("") for the key.
Example: {"color":"ffb3b3","description":"this is a description"}
links object
Example: {"lables":"/api/v2/telegrafs/1/labels","members":"/api/v2/telegrafs/1/members","owners":"/api/v2/telegrafs/1/owners","self":"/api/v2/telegrafs/1"}
labels string <uri>
URI of resource.
members string <uri>
URI of resource.
owners string <uri>
URI of resource.
self string <uri>
URI of resource.
metadata object
buckets string[]
name string
orgID 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.
POST /api/v2/telegrafs

Create a Telegraf configuration

Parameters

Header parameters
Zap-Trace-Span string
OpenTracing span context

Request body required

Telegraf configuration to create
Content-Type: application/json
config string
description string
metadata object
buckets string[]
name string
orgID string
plugins object[]
alias string
config string
description string
name string
type string
Example request Ask AI about this
curl --request POST \
  "http://localhost:8086/api/v2/telegrafs" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "config": "CONFIG",
  "description": "DESCRIPTION",
  "metadata": {
    "buckets": [
      "BUCKETS"
    ]
  },
  "name": "NAME",
  "orgID": "ORGID",
  "plugins": [
    {
      "alias": "ALIAS",
      "config": "CONFIG",
      "description": "DESCRIPTION",
      "name": "NAME",
      "type": "TYPE"
    }
  ]
}'

Responses

201 Telegraf configuration created
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/telegrafs/{telegrafID}

Retrieve a Telegraf configuration

Parameters

Path parameters
telegrafID required string
The Telegraf configuration ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Accept string
Allowed values: application/toml , application/json , application/octet-stream
Default: application/toml
Example request Ask AI about this
curl --request GET \
  "http://localhost:8086/api/v2/telegrafs/{telegrafID}" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

200 Telegraf configuration details
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.
PUT /api/v2/telegrafs/{telegrafID}

Update a Telegraf configuration

Parameters

Path parameters
telegrafID required string
The Telegraf config ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context

Request body required

Telegraf configuration update to apply
Content-Type: application/json
config string
description string
metadata object
buckets string[]
name string
orgID string
plugins object[]
alias string
config string
description string
name string
type string
Example request Ask AI about this
curl --request PUT \
  "http://localhost:8086/api/v2/telegrafs/{telegrafID}" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "config": "CONFIG",
  "description": "DESCRIPTION",
  "metadata": {
    "buckets": [
      "BUCKETS"
    ]
  },
  "name": "NAME",
  "orgID": "ORGID",
  "plugins": [
    {
      "alias": "ALIAS",
      "config": "CONFIG",
      "description": "DESCRIPTION",
      "name": "NAME",
      "type": "TYPE"
    }
  ]
}'

Responses

200 An updated Telegraf configurations
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/telegrafs/{telegrafID}

Delete a Telegraf configuration

Parameters

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

Responses

204 Delete has been accepted
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/telegrafs/{telegrafID}/labels

List all labels for a Telegraf config

Parameters

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

Responses

200 A list of all labels for a Telegraf config
labels object[]
id string
name string
orgID string
properties object
Key-value pairs associated with this label. To remove a property, send an update with an empty value ("") for the key.
Example: {"color":"ffb3b3","description":"this is a description"}
links object
URI pointers for additional paged results.
next string <uri>
URI of resource.
prev string <uri>
URI of resource.
self required string <uri>
URI of resource.
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/telegrafs/{telegrafID}/labels

Add a label to a Telegraf config

Parameters

Path parameters
telegrafID required string
The Telegraf config ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context

Request body required

Label to add
Content-Type: application/json
labelID required string
A label ID. Specifies the label to attach.
Example request Ask AI about this
curl --request POST \
  "http://localhost:8086/api/v2/telegrafs/{telegrafID}/labels" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "labelID": "LABELID"
}'

Responses

201 The label added to the Telegraf config
label object
id string
name string
orgID string
properties object
Key-value pairs associated with this label. To remove a property, send an update with an empty value ("") for the key.
Example: {"color":"ffb3b3","description":"this is a description"}
links object
URI pointers for additional paged results.
next string <uri>
URI of resource.
prev string <uri>
URI of resource.
self required string <uri>
URI of resource.
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/telegrafs/{telegrafID}/labels/{labelID}

Delete a label from a Telegraf config

Parameters

Path parameters
telegrafID required string
The Telegraf config ID.
labelID required string
The label ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request DELETE \
  "http://localhost:8086/api/v2/telegrafs/{telegrafID}/labels/{labelID}" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

204 Delete has been accepted
404 Telegraf config 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/telegrafs/{telegrafID}/members

List all users with member privileges for a Telegraf config

Parameters

Path parameters
telegrafID required string
The Telegraf config ID.
Header parameters