Sources
/api/v2/sourcesList all sources
Parameters
Query parameters
org
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/sources" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
links
objectself
string <uri>sources
object[]code
required
stringinternal 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
stringmessage
stringop
string/api/v2/sourcesCreate a source
Parameters
Header parameters
Zap-Trace-Span
stringRequest body required
application/jsondefault
booleandefaultRP
stringid
stringinsecureSkipVerify
booleanlanguages
string[]links
objectbuckets
stringhealth
stringquery
stringself
stringmetaUrl
string <uri>name
stringorgID
stringpassword
stringsharedSecret
stringtelegraf
stringtoken
stringtype
stringv1
, v2
, selfurl
string <uri>username
stringcurl --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
default
booleandefaultRP
stringid
stringinsecureSkipVerify
booleanlanguages
string[]links
objectbuckets
stringhealth
stringquery
stringself
stringmetaUrl
string <uri>name
stringorgID
stringpassword
stringsharedSecret
stringtelegraf
stringtoken
stringtype
stringv1
, v2
, selfurl
string <uri>username
stringcode
required
stringinternal 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
stringmessage
stringop
string/api/v2/sources/{sourceID}Retrieve a source
Parameters
Path parameters
sourceID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/sources/{sourceID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
default
booleandefaultRP
stringid
stringinsecureSkipVerify
booleanlanguages
string[]links
objectbuckets
stringhealth
stringquery
stringself
stringmetaUrl
string <uri>name
stringorgID
stringpassword
stringsharedSecret
stringtelegraf
stringtoken
stringtype
stringv1
, v2
, selfurl
string <uri>username
stringcode
required
stringinternal 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
stringmessage
stringop
stringcode
required
stringinternal 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
stringmessage
stringop
string/api/v2/sources/{sourceID}Update a Source
Parameters
Path parameters
sourceID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
application/jsondefault
booleandefaultRP
stringid
stringinsecureSkipVerify
booleanlanguages
string[]links
objectbuckets
stringhealth
stringquery
stringself
stringmetaUrl
string <uri>name
stringorgID
stringpassword
stringsharedSecret
stringtelegraf
stringtoken
stringtype
stringv1
, v2
, selfurl
string <uri>username
stringcurl --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
default
booleandefaultRP
stringid
stringinsecureSkipVerify
booleanlanguages
string[]links
objectbuckets
stringhealth
stringquery
stringself
stringmetaUrl
string <uri>name
stringorgID
stringpassword
stringsharedSecret
stringtelegraf
stringtoken
stringtype
stringv1
, v2
, selfurl
string <uri>username
stringcode
required
stringinternal 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
stringmessage
stringop
stringcode
required
stringinternal 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
stringmessage
stringop
string/api/v2/sources/{sourceID}Delete a source
Parameters
Path parameters
sourceID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"http://localhost:8086/api/v2/sources/{sourceID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
code
required
stringinternal 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
stringmessage
stringop
stringcode
required
stringinternal 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
stringmessage
stringop
string/api/v2/sources/{sourceID}/bucketsGet buckets in a source
Parameters
Path parameters
sourceID
required
stringQuery parameters
org
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/sources/{sourceID}/buckets" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
buckets
object[]links
stringcode
required
stringinternal 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
stringmessage
stringop
stringcode
required
stringinternal 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
stringmessage
stringop
string/api/v2/sources/{sourceID}/healthGet the health of a source
Parameters
Path parameters
sourceID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/sources/{sourceID}/health" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
checks
object[]commit
stringmessage
stringname
required
stringstatus
required
stringpass
, failversion
stringchecks
object[]commit
stringmessage
stringname
required
stringstatus
required
stringpass
, failversion
stringcode
required
stringinternal 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
stringmessage
stringop
stringWas this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.