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

AddScrapeTarget

Register a new Prometheus scrape target for metrics collection

Execution Availability

Try It Out

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

Request Inputs

Body Fields

  • nameStringRequired

    Display name for the new scrape target

    Example: node-exporter-host01

  • endpointStringRequired

    HTTP endpoint URL to scrape

    Example: http://192.168.1.10:9100

  • metricsPathStringRequired

    Metrics path on the endpoint

    Example: /metrics

  • scrapeIntervalIntegerRequired

    Scrape interval in seconds

    Example: 15

  • labelsLinkedHashMapRequired

    Key-value labels attached to this resource

    Example: (nested object)

Responses

200 OK

On success, this API returns the following response structure.

  • uuidString

    Unique identifier of the scrape target

    Example: target-001-abc

  • nameString

    Display name of the scrape target

    Example: node-exporter-host01

  • endpointString

    HTTP endpoint URL to scrape metrics from

    Example: http://192.168.1.10:9100

  • metricsPathString

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

    Example: /metrics

  • scrapeIntervalInteger

    Interval in seconds between scrapes

    Example: 15

  • labelsLinkedHashMap

    Key-value labels attached to this resource

    Example: (nested object)

  • enabledBoolean

    Whether this scrape target is active

    Example: true

  • tenantUuidString

    UUID of the tenant this target belongs to

    Example: tenant-001-xyz

  • createdAtString

    Created at

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

Endpoint

POST/api/v1/monitoring/scrape-targets

/api/v1/monitoring/scrape-targets

Operation ID

AddScrapeTarget

Permalink

Request Example

curl -X POST '{host}/api/v1/monitoring/scrape-targets' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"name":"node-exporter-host01","endpoint":"http://192.168.1.10:9100","metricsPath":"/metrics","scrapeInterval":15,"labels":"(nested object)","enabled":true,"tenantUuid":"tenant-001-xyz"}'

Response Example

200
{
  "uuid": "target-001-abc",
  "name": "node-exporter-host01",
  "endpoint": "http://192.168.1.10:9100",
  "metricsPath": "/metrics",
  "scrapeInterval": 15,
  "labels": null,
  "enabled": true,
  "tenantUuid": "tenant-001-xyz"
}

Change History

This API has no change history records yet.

View all change history