Scraper Targets
/api/v2/scrapersList all scraper targets
Parameters
Query parameters
name
stringid
arrayid and owner are specified, only id is used.orgID
stringorg
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/scrapers" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
configurations
object[]/api/v2/scrapersCreate a scraper target
Parameters
Header parameters
Zap-Trace-Span
stringRequest body required
application/jsonallowInsecure
booleanbucketID
stringname
stringorgID
stringtype
stringprometheusurl
string"http://localhost:9090/metrics"curl --request POST \
"http://localhost:8086/api/v2/scrapers" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"allowInsecure": false,
"bucketID": "BUCKETID",
"name": "NAME",
"orgID": "ORGID",
"type": "prometheus",
"url": "http://localhost:9090/metrics"
}'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
string/api/v2/scrapers/{scraperTargetID}Retrieve a scraper target
Parameters
Path parameters
scraperTargetID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/scrapers/{scraperTargetID}" \
--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
string/api/v2/scrapers/{scraperTargetID}Update a scraper target
Parameters
Path parameters
scraperTargetID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
application/jsonallowInsecure
booleanbucketID
stringname
stringorgID
stringtype
stringprometheusurl
string"http://localhost:9090/metrics"curl --request PATCH \
"http://localhost:8086/api/v2/scrapers/{scraperTargetID}" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"allowInsecure": false,
"bucketID": "BUCKETID",
"name": "NAME",
"orgID": "ORGID",
"type": "prometheus",
"url": "http://localhost:9090/metrics"
}'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
string/api/v2/scrapers/{scraperTargetID}Delete a scraper target
Parameters
Path parameters
scraperTargetID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"http://localhost:8086/api/v2/scrapers/{scraperTargetID}" \
--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
string/api/v2/scrapers/{scraperTargetID}/labelsList all labels for a scraper target
Parameters
Path parameters
scraperTargetID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/scrapers/{scraperTargetID}/labels" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
labels
stringlinks
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/scrapers/{scraperTargetID}/labelsAdd a label to a scraper target
Parameters
Path parameters
scraperTargetID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
application/jsonlabelID
required
stringcurl --request POST \
"http://localhost:8086/api/v2/scrapers/{scraperTargetID}/labels" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"labelID": "LABELID"
}'Responses
label
stringlinks
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/scrapers/{scraperTargetID}/labels/{labelID}Delete a label from a scraper target
Parameters
Path parameters
scraperTargetID
required
stringlabelID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"http://localhost:8086/api/v2/scrapers/{scraperTargetID}/labels/{labelID}" \
--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/scrapers/{scraperTargetID}/membersList all users with member privileges for a scraper target
Parameters
Path parameters
scraperTargetID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/scrapers/{scraperTargetID}/members" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
links
objectself
string <uri>users
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/scrapers/{scraperTargetID}/membersAdd a member to a scraper target
Parameters
Path parameters
scraperTargetID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
application/jsonid
required
stringname
stringcurl --request POST \
"http://localhost:8086/api/v2/scrapers/{scraperTargetID}/members" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"id": "ID",
"name": "NAME"
}'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
string/api/v2/scrapers/{scraperTargetID}/members/{userID}Remove a member from a scraper target
Parameters
Path parameters
userID
required
stringscraperTargetID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"http://localhost:8086/api/v2/scrapers/{scraperTargetID}/members/{userID}" \
--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
string/api/v2/scrapers/{scraperTargetID}/ownersList all owners of a scraper target
Parameters
Path parameters
scraperTargetID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/scrapers/{scraperTargetID}/owners" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
links
objectself
string <uri>users
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/scrapers/{scraperTargetID}/ownersAdd an owner to a scraper target
Parameters
Path parameters
scraperTargetID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
application/jsonid
required
stringname
stringcurl --request POST \
"http://localhost:8086/api/v2/scrapers/{scraperTargetID}/owners" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"id": "ID",
"name": "NAME"
}'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
string/api/v2/scrapers/{scraperTargetID}/owners/{userID}Remove an owner from a scraper target
Parameters
Path parameters
userID
required
stringscraperTargetID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"http://localhost:8086/api/v2/scrapers/{scraperTargetID}/owners/{userID}" \
--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
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.