Skip to main content
Monitoring & Collection/Scrape Collection

AddScrapeTarget

Register a new Prometheus scrape target for metrics collection

POST/api/v1/monitoring/scrape-targets

Operation ID

AddScrapeTarget

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

  • name
    StringRequired

    Display name for the new scrape target

    Example: node-exporter-host01

  • endpoint
    StringRequired

    HTTP endpoint URL to scrape

    Example: http://192.168.1.10:9100

  • metricsPath
    StringRequired

    Metrics path on the endpoint

    Example: /metrics

  • scrapeInterval
    IntegerRequired

    Scrape interval in seconds

    Example: 15

  • labels
    LinkedHashMapRequired

    Key-value labels attached to this resource

    Example: (nested object)

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • uuid
    String

    Unique identifier of the scrape target

    Example: target-001-abc

  • name
    String

    Display name of the scrape target

    Example: node-exporter-host01

  • endpoint
    String

    HTTP endpoint URL to scrape metrics from

    Example: http://192.168.1.10:9100

  • metricsPath
    String

    Path on the endpoint to fetch metrics (e.g. /metrics)

    Example: /metrics

  • scrapeInterval
    Integer

    Interval in seconds between scrapes

    Example: 15

  • labels
    LinkedHashMap

    Key-value labels attached to this resource

    Example: (nested object)

  • enabled
    Boolean

    Whether this scrape target is active

    Example: true

  • tenantUuid
    String

    UUID of the tenant this target belongs to

    Example: tenant-001-xyz

  • createdAt
    String

    Created at

    Example: 2026-01-15T08:00:00Z