Skip to main content
Monitoring & Collection/Scrape Collection
POSTMonitoringSince 1.0SynchronousAuth Required

BulkImportScrapeTargets

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

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • entriesListRequired

    Entries for this resource

    Example: (nested array)

    • hostString

      Hostname or IP address of the target

      Example: 192.168.1.20

    • portInteger

      Port number of the metrics endpoint

      Example: 9100

    • jobString

      Prometheus job name for this target

      Example: node

Responses

200 OK

On success, this API returns the following response structure.

  • totalInteger

    Total number of entries submitted for import

    Example: 10

  • successInteger

    Number of entries successfully imported

    Example: 9

  • failedInteger

    Number of entries that failed to import

    Example: 1

  • errorsList

    Errors for this resource

    Example: (nested array)

    • lineInteger

      Row number in the import payload that caused the error

      Example: 5

    • reasonString

      Human-readable reason for the import failure

      Example: duplicate endpoint

Endpoint

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

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

Operation ID

BulkImportScrapeTargets

Permalink

Request Example

curl -X POST '{host}/api/v1/monitoring/scrape-health/targets/bulk-import' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"entries":"(nested array)"}'

Response Example

200
{
  "total": 10,
  "success": 9,
  "failed": 1,
  "errors": [
    {}
  ]
}

Change History

This API has no change history records yet.

View all change history