Skip to main content
Monitoring & Collection/Scrape Collection

ValidateScrapeCSV

Validate a CSV import payload and return per-row validation errors without persisting data

POST/api/v1/monitoring/scrape-configs/validate

Operation ID

ValidateScrapeCSV

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

  • rows
    ListRequired

    The rows value

    Example: (nested array)

    • row
      Integer

      Row number in the CSV payload (1-based)

      Example: 1

    • host
      String

      Hostname or IP of the scrape target

      Example: 192.168.1.30

    • port
      Integer

      Port of the metrics endpoint

      Example: 9100

    • jobName
      String

      Prometheus job name

      Example: node

    • labels
      String

      JSON-encoded label key-value pairs

      Example: {"env":"prod"}

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • total
    Integer

    Total number of rows in the payload

    Example: 50

  • valid
    Integer

    Number of rows that passed validation

    Example: 48

  • invalid
    Integer

    Number of rows that failed validation

    Example: 2

  • duplicatesFound
    Integer

    Number of duplicate entries detected in the payload

    Example: 1

  • errors
    List

    Errors for this resource

    Example: (nested array)

    • row
      Integer

      Row number where the error occurred

      Example: 3

    • field
      String

      Field name that failed validation

      Example: port

    • reason
      String

      Human-readable reason for the validation failure

      Example: port must be between 1 and 65535