Telegrafs
Create and manage Telegraf agent configurations that collect and write data to InfluxDB OSS v2.
GET
/api/v2/telegrafsList all Telegraf configurations
Parameters
Query parameters
orgID
stringThe organization ID the Telegraf config belongs to.
Header parameters
Zap-Trace-Span
stringOpenTracing 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
stringdescription
stringid
stringlabels
object[]id
stringname
stringorgID
stringproperties
objectKey-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
objectExample:
{"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
objectbuckets
string[]name
stringorgID
stringdefault
Unexpected error
code
required
stringcode 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 typeerr
stringStack of errors that occurred during processing of the request. Useful for debugging.
message
stringHuman-readable message.
op
stringDescribes the logical code operation when the error occurred. Useful for debugging.
POST
/api/v2/telegrafsCreate a Telegraf configuration
Parameters
Header parameters
Zap-Trace-Span
stringOpenTracing span context
Request body required
Telegraf configuration to create
Content-Type:
application/jsonconfig
stringdescription
stringmetadata
objectbuckets
string[]name
stringorgID
stringplugins
object[]alias
stringconfig
stringdescription
stringname
stringtype
stringExample 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
stringcode 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 typeerr
stringStack of errors that occurred during processing of the request. Useful for debugging.
message
stringHuman-readable message.
op
stringDescribes 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
stringThe Telegraf configuration ID.
Header parameters
Zap-Trace-Span
stringOpenTracing span context
Accept
stringAllowed values:
application/toml
, application/json
, application/octet-streamDefault:
application/tomlExample 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
stringcode 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 typeerr
stringStack of errors that occurred during processing of the request. Useful for debugging.
message
stringHuman-readable message.
op
stringDescribes 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
stringThe Telegraf config ID.
Header parameters
Zap-Trace-Span
stringOpenTracing span context
Request body required
Telegraf configuration update to apply
Content-Type:
application/jsonconfig
stringdescription
stringmetadata
objectbuckets
string[]name
stringorgID
stringplugins
object[]alias
stringconfig
stringdescription
stringname
stringtype
stringExample 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
stringcode 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 typeerr
stringStack of errors that occurred during processing of the request. Useful for debugging.
message
stringHuman-readable message.
op
stringDescribes 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
stringThe Telegraf configuration ID.
Header parameters
Zap-Trace-Span
stringOpenTracing 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
stringcode 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 typeerr
stringStack of errors that occurred during processing of the request. Useful for debugging.
message
stringHuman-readable message.
op
stringDescribes the logical code operation when the error occurred. Useful for debugging.
GET
/api/v2/telegrafs/{telegrafID}/labelsList all labels for a Telegraf config
Parameters
Path parameters
telegrafID
required
stringThe Telegraf config ID.
Header parameters
Zap-Trace-Span
stringOpenTracing 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
stringname
stringorgID
stringproperties
objectKey-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
objectURI 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
stringcode 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 typeerr
stringStack of errors that occurred during processing of the request. Useful for debugging.
message
stringHuman-readable message.
op
stringDescribes the logical code operation when the error occurred. Useful for debugging.
POST
/api/v2/telegrafs/{telegrafID}/labelsAdd a label to a Telegraf config
Parameters
Path parameters
telegrafID
required
stringThe Telegraf config ID.
Header parameters
Zap-Trace-Span
stringOpenTracing span context
Request body required
Label to add
Content-Type:
application/jsonlabelID
required
stringA 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
objectid
stringname
stringorgID
stringproperties
objectKey-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
objectURI 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
stringcode 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 typeerr
stringStack of errors that occurred during processing of the request. Useful for debugging.
message
stringHuman-readable message.
op
stringDescribes 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
stringThe Telegraf config ID.
labelID
required
stringThe label ID.
Header parameters
Zap-Trace-Span
stringOpenTracing 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
stringcode 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 typeerr
stringStack of errors that occurred during processing of the request. Useful for debugging.
message
stringHuman-readable message.
op
stringDescribes the logical code operation when the error occurred. Useful for debugging.
default
Unexpected error
code
required
stringcode 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 typeerr
stringStack of errors that occurred during processing of the request. Useful for debugging.
message
stringHuman-readable message.
op
stringDescribes the logical code operation when the error occurred. Useful for debugging.
GET
/api/v2/telegrafs/{telegrafID}/membersList all users with member privileges for a Telegraf config
Parameters
Path parameters
telegrafID
required
stringThe Telegraf config ID.