---
title: "Scrape a node port for Prometheus exposition text"
method: POST
path: "/preview/nodes/{name}/scrapes"
tags: ["nodes"]
---

# Scrape a node port for Prometheus exposition text

`POST /preview/nodes/{name}/scrapes`

## Request

- Base URL: `https://autoresearch.sfcompute.com`
- URL: `https://autoresearch.sfcompute.com/preview/nodes/{name}/scrapes`
- Auth: HTTP bearer

Register a Prometheus endpoint on a node for the platform to scrape and retain: every serving engine exposes /metrics - one call here replaces the scrape-loop scaffolding. The platform scrapes the container-local port at your org's interval (default 30s), stamps {node} labels, and stores it queryably (query_metrics) under your org. Registrations survive stop/wake (scraping pauses while stopped) and die with the node; get_node shows each registration's last scrape health - a failing scrape on a live container is the dead-engine signal. Metrics bill on active series past the free tier: keep label cardinality low (identity in labels, data in values; never a request id or timestamp in a label).

## Path parameters

- `name` string, required: Node name (from `list_nodes`).

## Query parameters

- `workspace` string

## Request body

- object
  - `interval_seconds` integer, nullable: Scrape interval in seconds (default: your org's setting, 30s; floor 10s). Finer intervals mean more samples.
  - `path` string, nullable: Endpoint path (default "/metrics").
  - `port` integer, required: The container port serving Prometheus exposition text.

## Response `200`

The capability's JSON result.

- Result: The capability's result: the same object the MCP tool returns as structuredContent. Resources carry an `object` type discriminator and an immutable id; money is integer micro-dollars in `*_usd_micros` fields.
  - `object` string: The resource type, when the result is one resource.

## Other responses

- `400`: Malformed request: bad JSON, a parameter that does not parse, or a value outside its range. Code `invalid`.
- `401`: No bearer token, or one this API cannot verify. Code `unauthenticated`.
- `403`: Authenticated, but the token's scopes or the account's role do not reach this operation. The message names the scope word to request. Code `forbidden`.
- `404`: No such route. Code `not_found`; the body names the OpenAPI document.
- `422`: A well-formed request the platform declined: no such node, a cap reached, a state that forbids the move. The message says which, and what to do instead. Code `refused`.
- `429`: Over this door's per-customer budget. Wait `Retry-After` seconds. Code `rate_limited`.
- `500`: Our fault. Retry; if it persists, quote the request-id. Code `internal`.

---

[API](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api.md) · [All operations](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api/revisions/f88dcb70ac6c?raw)
