Skip to main content
Monitoring & Collection/Scrape Collection

BulkImportScrapeTargets

Bulk import scrape targets from a list of host and port entries

POST/api/v1/monitoring/scrape-health/targets/bulk-import

Operation ID

BulkImportScrapeTargets

Since

1.0.0

Execution Mode

Synchronous

Auth Context

Auth Required

Auth Context

Send these values as request headers when calling this API.

AuthorizationstringRequired

Bearer Token

X-Tenant-IDstring

X-Tenant-ID

Request Inputs

application/json

Body Fields

  • entries
    ListRequired

    Entries for this resource

    Example: (nested array)

    • host
      String

      Hostname or IP address of the target

      Example: 192.168.1.20

    • port
      Integer

      Port number of the metrics endpoint

      Example: 9100

    • job
      String

      Prometheus job name for this target

      Example: node

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • total
    Integer

    Total number of entries submitted for import

    Example: 10

  • success
    Integer

    Number of entries successfully imported

    Example: 9

  • failed
    Integer

    Number of entries that failed to import

    Example: 1

  • errors
    List

    Errors for this resource

    Example: (nested array)

    • line
      Integer

      Row number in the import payload that caused the error

      Example: 5

    • reason
      String

      Human-readable reason for the import failure

      Example: duplicate endpoint