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

ValidateScrapeCSV

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

Execution Availability

Try It Out

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

Request Inputs

Body Fields

  • rowsListRequired

    The rows value

    Example: (nested array)

    • rowInteger

      Row number in the CSV payload (1-based)

      Example: 1

    • hostString

      Hostname or IP of the scrape target

      Example: 192.168.1.30

    • portInteger

      Port of the metrics endpoint

      Example: 9100

    • jobNameString

      Prometheus job name

      Example: node

    • labelsString

      JSON-encoded label key-value pairs

      Example: {"env":"prod"}

Responses

200 OK

On success, this API returns the following response structure.

  • totalInteger

    Total number of rows in the payload

    Example: 50

  • validInteger

    Number of rows that passed validation

    Example: 48

  • invalidInteger

    Number of rows that failed validation

    Example: 2

  • duplicatesFoundInteger

    Number of duplicate entries detected in the payload

    Example: 1

  • errorsList

    Errors for this resource

    Example: (nested array)

    • rowInteger

      Row number where the error occurred

      Example: 3

    • fieldString

      Field name that failed validation

      Example: port

    • reasonString

      Human-readable reason for the validation failure

      Example: port must be between 1 and 65535

Endpoint

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

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

Operation ID

ValidateScrapeCSV

Permalink

Request Example

curl -X POST '{host}/api/v1/monitoring/scrape-configs/validate' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"rows":"(nested array)"}'

Response Example

200
{
  "total": 50,
  "valid": 48,
  "invalid": 2,
  "duplicatesFound": 1,
  "errors": [
    {}
  ]
}

Change History

This API has no change history records yet.

View all change history