POST Preview collection changes
/api/v1/monitors/{id}/collection/plan
Uses stable source identities. Each changed field is applied in server acceptance order; unrelated fields and measurement history remain intact. Repeat the same operation_id and body after a lost response. Names, descriptions, activation and collection intervals synchronize. Executables and arguments remain in the locally approved policy.
On this page
Access and permissions
Uses stable source identities. Each changed field is applied in server acceptance order; unrelated fields and measurement history remain intact. Repeat the same operation_id and body after a lost response. Names, descriptions, activation and collection intervals synchronize. Executables and arguments remain in the locally approved policy.
Browser session: __Host-mb_session cookie.
Machine management credentials in Authorization: Bearer. Check the permissions (scopes) required by the operation.
When using a browser session for a mutation, send the current CSRF token in X-CSRF-Token with the same-site cookie. OAuth consent uses its documented form field.
Parameters and headers
| Field | Location | Type and limits | Required | Meaning |
|---|---|---|---|---|
| id | Path | string; {"format":"uuid"} | Yes | Resource UUID from the path. It must exist and be accessible to the acting identity. |
Request body
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | CollectionMutation | Yes | — |
| $.operation_id | string; {"format":"uuid"} | Yes | — |
| $.changes | array<CollectionChange>; {"minItems":1,"maxItems":200} | Yes | — |
| $.changes[] | CollectionChange | Yes | — |
| $.changes[].source_id | string; {"minLength":1,"maxLength":400,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9_./:-]{0,399}$"} | Yes | — |
| $.changes[].component_id | string | No | — |
| $.changes[].parameter_key | string | No | — |
| $.changes[].name | string; {"minLength":1,"maxLength":128} | No | — |
| $.changes[].description | string; {"maxLength":512} | No | — |
| $.changes[].enabled | boolean | No | — |
| $.changes[].interval_seconds | integer; {"minimum":1,"maximum":86400} | No | — |
| $.changes[] (anyOf 1) | JSON | No | — |
| $.changes[] (anyOf 2) | JSON | No | — |
| $.changes[] (anyOf 3) | JSON | No | — |
| $.changes[] (anyOf 4) | JSON | No | — |
Responses
application/json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | CollectionPlan | Yes | — |
| $.snapshot | CollectionSnapshot | Yes | — |
| $.snapshot.enabled | boolean | Yes | — |
| $.snapshot.can_write | boolean | Yes | — |
| $.snapshot.revision | integer | Yes | — |
| $.snapshot.applied_revision | integer | Yes | — |
| $.snapshot.reported_at | string | null; {"format":"date-time"} | Yes | — |
| $.snapshot.sources | array<CollectionSource>; {"maxItems":200} | Yes | — |
| $.snapshot.sources[] | CollectionSource | Yes | — |
| $.snapshot.sources[].source_id | string; {"minLength":1,"maxLength":400,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9_./:-]{0,399}$"} | Yes | — |
| $.snapshot.sources[].component_id | string | Yes | — |
| $.snapshot.sources[].parameter_key | string | Yes | — |
| $.snapshot.sources[].kind | string; {"enum":["gauge","counter","boolean","enum"]} | Yes | — |
| $.snapshot.sources[].unit | string; {"maxLength":32} | Yes | — |
| $.snapshot.sources[].name | string; {"minLength":1,"maxLength":128} | Yes | — |
| $.snapshot.sources[].description | string; {"maxLength":512} | Yes | — |
| $.snapshot.sources[].interval_seconds | integer; {"minimum":1,"maximum":86400} | Yes | — |
| $.snapshot.sources[].available | boolean | Yes | — |
| $.snapshot.sources[].origin | string; {"enum":["catalog","custom","external"]} | Yes | — |
| $.snapshot.sources[].series_id | string | null; {"format":"uuid"} | Yes | — |
| $.snapshot.sources[].enabled | boolean | Yes | — |
| $.snapshot.sources[].revision | integer | Yes | — |
| $.snapshot.sources[].changed_by | string; {"enum":["profile","website","agent","registration"]} | Yes | — |
| $.snapshot.sources[].changed_at | string; {"format":"date-time"} | Yes | — |
| $.snapshot.sources[].status | string; {"enum":["pending","ready","warming_up","unsupported","permission_denied","failed","component_missing","disabled","external"]} | Yes | — |
| $.snapshot.profile_revision | integer | Yes | — |
| $.snapshot.profile | ServerProfile | Yes | — |
| $.snapshot.profile.components | array<object>; {"maxItems":200} | null | Yes | Discovered or explicitly selected server components. |
| $.snapshot.profile.components (anyOf 1) | array<object>; {"maxItems":200} | No | — |
| $.snapshot.profile.components (anyOf 1)[] | object | Yes | — |
| $.snapshot.profile.components (anyOf 1)[].address | string | No | — |
| $.snapshot.profile.components (anyOf 1)[].family | string | No | — |
| $.snapshot.profile.components (anyOf 1)[].id | string | Yes | UUID of this resource. Keep the returned identifier for subsequent operations. |
| $.snapshot.profile.components (anyOf 1)[].kind | string | Yes | Resource kind or measurement type selected from the listed values. |
| $.snapshot.profile.components (anyOf 1)[].label | string; {"maxLength":128,"minLength":1} | Yes | Display name for the component. |
| $.snapshot.profile.components (anyOf 1)[].local_ref | string | No | — |
| $.snapshot.profile.components (anyOf 1)[].name | string | No | Human-readable resource name. Follow the listed length limit. |
| $.snapshot.profile.components (anyOf 1)[].path | string; {"maxLength":1024} | No | — |
| $.snapshot.profile.components (anyOf 1)[].port | integer | No | — |
| $.snapshot.profile.components (anyOf 1)[].project | string | No | — |
| $.snapshot.profile.components (anyOf 1)[].protocol | string | No | — |
| $.snapshot.profile.components (anyOf 1)[].text_languages | object | No | — |
| $.snapshot.profile.components (anyOf 1)[].timeout_seconds | integer | No | — |
| $.snapshot.profile.components (anyOf 1)[].translations | object; {"additionalProperties":false} | No | — |
| $.snapshot.profile.components (anyOf 1)[].translations.de | object | No | — |
| $.snapshot.profile.components (anyOf 1)[].translations.en | object | No | — |
| $.snapshot.profile.components (anyOf 1)[].transport | string | No | — |
| $.snapshot.profile.components (anyOf 1)[].filesystem_identity | string; {"maxLength":256} | No | Agent-reported volume identity. Keep it unchanged to prevent a replacement volume from continuing another volume’s history. |
| $.snapshot.profile.components (anyOf 1)[].disk_identity | string; {"maxLength":256} | No | — |
| $.snapshot.profile.components (anyOf 2) | null | No | — |
| $.snapshot.profile.selections | array<object>; {"maxItems":200} | null | Yes | Selected component/parameter pairs and sampling intervals. |
| $.snapshot.profile.selections (anyOf 1) | array<object>; {"maxItems":200} | No | — |
| $.snapshot.profile.selections (anyOf 1)[] | object | Yes | — |
| $.snapshot.profile.selections (anyOf 1)[].component_id | string | Yes | Stable identifier of the selected or discovered component. |
| $.snapshot.profile.selections (anyOf 1)[].interval_seconds | integer; {"maximum":86400,"minimum":0} | Yes | Sampling or check interval in seconds within the stated bounds. |
| $.snapshot.profile.selections (anyOf 1)[].parameter_key | string | Yes | Stable parameter identifier from the server catalog. |
| $.snapshot.profile.selections (anyOf 2) | null | No | — |
| $.snapshot.profile.version | JSON; {"const":2} | Yes | — |
| $.snapshot.profile.overview | object; {"additionalProperties":false} | No | Explicit targets for the six-chart server overview; select all required readings. |
| $.snapshot.profile.overview.system_id | string; {"maxLength":128} | Yes | — |
| $.snapshot.profile.overview.filesystem_id | string; {"maxLength":128} | Yes | — |
| $.snapshot.profile.overview.disk_id | string; {"maxLength":128} | Yes | — |
| $.snapshot.profile.overview.network_id | string; {"maxLength":128} | Yes | — |
| $.snapshot.profile.overview.platform | string; {"enum":["linux","darwin","windows"]} | No | Platform of the automatic overview. Only supported metrics are selected; undetected disk or network targets stay empty. |
| $.snapshot.profile.filesystem_discovery | object; {"additionalProperties":false} | No | Optional local filesystem discovery with a base interval of at least 10 seconds. New Server/NAS setups enable it. Existing profiles require explicit activation. Manually disabled measurements are preserved. |
| $.snapshot.profile.filesystem_discovery.mode | string; {"enum":["off","local"]} | Yes | — |
| $.snapshot.profile.filesystem_discovery.interval_seconds | integer; {"minimum":10,"maximum":86400} | Yes | — |
| $.snapshot.profile.system_discovery | object; {"additionalProperties":false} | No | — |
| $.snapshot.profile.system_discovery.mode | string; {"enum":["off","local"]} | Yes | — |
| $.snapshot.profile.system_discovery.interval_seconds | integer; {"minimum":10,"maximum":86400} | Yes | — |
| $.snapshot.profile.disk_io_interval_seconds | integer; {"minimum":1,"maximum":86400} | No | — |
| $.snapshot.profile.global_interval_seconds | integer; {"minimum":1,"maximum":86400} | No | Explicit global sampling choice. Each source still applies its platform minimum; individual fast rows never imply this choice. |
| $.snapshot.bindings | array<object>; {"maxItems":200} | Yes | — |
| $.snapshot.bindings[] | object | Yes | — |
| $.snapshot.bindings[].component_id | string | Yes | Stable identifier of the selected or discovered component. |
| $.snapshot.bindings[].interval_seconds | integer | Yes | Sampling or check interval in seconds within the stated bounds. |
| $.snapshot.bindings[].parameter_key | string | Yes | Stable parameter identifier from the server catalog. |
| $.snapshot.bindings[].series_id | string | Yes | UUID of the measurement series belonging to the authorized device. |
| $.snapshot.update_job | string; {"format":"uuid"} | No | — |
| $.snapshot.delivery_diagnostics | boolean | No | — |
| $.snapshot.resource_inventory | boolean | No | — |
| $.alarm_ids | array<string; {"format":"uuid"}>; {"maxItems":200} | Yes | — |
| $.alarm_ids[] | string; {"format":"uuid"} | Yes | — |
| $.derived_series_ids | array<string; {"format":"uuid"}>; {"maxItems":200} | Yes | — |
| $.derived_series_ids[] | string; {"format":"uuid"} | Yes | — |
| $.series_slots | integer | Yes | — |
| $.series_limit | integer | Yes | — |
| Stable error codes |
|---|
| unauthorized |
| Header | Type and limits | Meaning |
|---|---|---|
| Cache-Control | string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} | Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. |
| Content-Language | string; {"enum":["en","de"]} | Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. |
| Referrer-Policy | JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} | The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. |
| Vary | string | Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. |
| X-Content-Type-Options | JSON; {"const":"nosniff"} | The browser must use the declared content type. |
| X-Frame-Options | JSON; {"const":"DENY"} | The response must not be embedded in a frame. |
| X-Request-ID | string | Server-generated request identifier. Include this when reporting an error; inbound values are not trusted. |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
{
"code": "demo",
"detail": "Demo error detail; inspect the documented code.",
"instance": "demo",
"message": "Demo error detail; inspect the documented code.",
"message_key": "errors.requestFailed",
"message_params": {},
"request_id": "00000000000000000000000000000000",
"status": 401,
"title": "Demo error",
"type": "about:blank"
}| Stable error codes |
|---|
| agent_config_write_required |
| forbidden |
| Header | Type and limits | Meaning |
|---|---|---|
| Cache-Control | string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} | Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. |
| Content-Language | string; {"enum":["en","de"]} | Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. |
| Referrer-Policy | JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} | The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. |
| Vary | string | Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. |
| X-Content-Type-Options | JSON; {"const":"nosniff"} | The browser must use the declared content type. |
| X-Frame-Options | JSON; {"const":"DENY"} | The response must not be embedded in a frame. |
| X-Request-ID | string | Server-generated request identifier. Include this when reporting an error; inbound values are not trusted. |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
{
"code": "demo",
"detail": "Demo error detail; inspect the documented code.",
"instance": "demo",
"message": "Demo error detail; inspect the documented code.",
"message_key": "errors.requestFailed",
"message_params": {},
"request_id": "00000000000000000000000000000000",
"status": 403,
"title": "Demo error",
"type": "about:blank"
}| Stable error codes |
|---|
| not_found |
| Stable error codes |
|---|
| operation_conflict |
| feature_disabled |
| numeric_interval_disabled |
| agent_upgrade_required |
| Header | Type and limits | Meaning |
|---|---|---|
| Cache-Control | string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} | Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. |
| Content-Language | string; {"enum":["en","de"]} | Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. |
| Referrer-Policy | JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} | The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. |
| Vary | string | Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. |
| X-Content-Type-Options | JSON; {"const":"nosniff"} | The browser must use the declared content type. |
| X-Frame-Options | JSON; {"const":"DENY"} | The response must not be embedded in a frame. |
| X-Request-ID | string | Server-generated request identifier. Include this when reporting an error; inbound values are not trusted. |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
{
"code": "demo",
"detail": "Demo error detail; inspect the documented code.",
"instance": "demo",
"message": "Demo error detail; inspect the documented code.",
"message_key": "errors.requestFailed",
"message_params": {},
"request_id": "00000000000000000000000000000000",
"status": 409,
"title": "Demo error",
"type": "about:blank"
}| Stable error codes |
|---|
| invalid_collection |
| Header | Type and limits | Meaning |
|---|---|---|
| Cache-Control | string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} | Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. |
| Content-Language | string; {"enum":["en","de"]} | Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. |
| Referrer-Policy | JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} | The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. |
| Vary | string | Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. |
| X-Content-Type-Options | JSON; {"const":"nosniff"} | The browser must use the declared content type. |
| X-Frame-Options | JSON; {"const":"DENY"} | The response must not be embedded in a frame. |
| X-Request-ID | string | Server-generated request identifier. Include this when reporting an error; inbound values are not trusted. |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
{
"code": "demo",
"detail": "Demo error detail; inspect the documented code.",
"instance": "demo",
"message": "Demo error detail; inspect the documented code.",
"message_key": "errors.requestFailed",
"message_params": {},
"request_id": "00000000000000000000000000000000",
"status": 422,
"title": "Demo error",
"type": "about:blank"
}| Stable error codes |
|---|
| quota_exceeded |
| live_capacity |
| rate_limited |
| Header | Type and limits | Meaning |
|---|---|---|
| Cache-Control | string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} | Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. |
| Content-Language | string; {"enum":["en","de"]} | Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. |
| Referrer-Policy | JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} | The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. |
| Retry-After | string; {"pattern":"^[0-9]+$"} | Seconds before retry. Preserve supported idempotency identifiers and respect the operation’s mutation semantics. |
| Vary | string | Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. |
| X-Content-Type-Options | JSON; {"const":"nosniff"} | The browser must use the declared content type. |
| X-Frame-Options | JSON; {"const":"DENY"} | The response must not be embedded in a frame. |
| X-Request-ID | string | Server-generated request identifier. Include this when reporting an error; inbound values are not trusted. |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
{
"code": "demo",
"detail": "Demo error detail; inspect the documented code.",
"instance": "demo",
"message": "Demo error detail; inspect the documented code.",
"message_key": "errors.requestFailed",
"message_params": {},
"request_id": "00000000000000000000000000000000",
"status": 429,
"title": "Demo error",
"type": "about:blank"
}| Stable error codes |
|---|
| unavailable |
| stream_unavailable |
| Header | Type and limits | Meaning |
|---|---|---|
| Cache-Control | string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} | Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. |
| Content-Language | string; {"enum":["en","de"]} | Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. |
| Referrer-Policy | JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} | The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. |
| Retry-After | string; {"pattern":"^[0-9]+$"} | Seconds before retry. Preserve supported idempotency identifiers and respect the operation’s mutation semantics. |
| Vary | string | Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. |
| X-Content-Type-Options | JSON; {"const":"nosniff"} | The browser must use the declared content type. |
| X-Frame-Options | JSON; {"const":"DENY"} | The response must not be embedded in a frame. |
| X-Request-ID | string | Server-generated request identifier. Include this when reporting an error; inbound values are not trusted. |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
{
"code": "demo",
"detail": "Demo error detail; inspect the documented code.",
"instance": "demo",
"message": "Demo error detail; inspect the documented code.",
"message_key": "errors.requestFailed",
"message_params": {},
"request_id": "00000000000000000000000000000000",
"status": 503,
"title": "Demo error",
"type": "about:blank"
}Retries and asynchronous work
This change does not have a general retry guarantee. If the response is unclear, read the affected resource before trying again. Follow Retry-After waiting times and request new sign-in or action codes when they expire.
Request examples
Replace demo IDs, timestamps and placeholders with your own values. For a retry, keep the same IDs, time and content. These examples do not run requests on this page.
Keep login links, codes, cookies and keys private. Do not print them in logs or share them in support requests.
curl --silent --show-error --output /dev/null --write-out "%{http_code}\n" \
--request POST \
--header @"$HOME/.config/metribeacon/headers.txt" \
--header "Content-Type: application/json" \
--data-binary '{"operation_id":"00000000-0000-4000-8000-000000000002","changes":[{"source_id":"catalog/system/cpu_usage","name":"Server CPU"}]}' \
"https://metribeacon.com/api/v1/monitors/00000000-0000-4000-8000-000000000001/collection/plan"
import json
from pathlib import Path
from urllib.request import Request, HTTPRedirectHandler, build_opener
from urllib.error import HTTPError
headers = json.loads((Path.home() / ".config/metribeacon/headers.json").read_text())
headers["Content-Type"] = "application/json"
request = Request("https://metribeacon.com/api/v1/monitors/00000000-0000-4000-8000-000000000001/collection/plan", data="{\"operation_id\":\"00000000-0000-4000-8000-000000000002\",\"changes\":[{\"source_id\":\"catalog/system/cpu_usage\",\"name\":\"Server CPU\"}]}".encode("utf-8"), headers=headers, method="POST")
class NoRedirect(HTTPRedirectHandler):
def redirect_request(self, request, fp, code, message, headers, target):
return None
opener = build_opener(NoRedirect())
try:
with opener.open(request, timeout=10) as response:
print(response.status)
except HTTPError as error:
print(error.code)
error.close()
import { readFile } from "node:fs/promises";
import { homedir } from "node:os";
import { join } from "node:path";
const headers = JSON.parse(await readFile(join(homedir(), ".config/metribeacon/headers.json"), "utf8"));
headers["Content-Type"] = "application/json";
const response = await fetch("https://metribeacon.com/api/v1/monitors/00000000-0000-4000-8000-000000000001/collection/plan", {
method: "POST", headers, redirect: "manual",
signal: AbortSignal.timeout(10000), body: "{\"operation_id\":\"00000000-0000-4000-8000-000000000002\",\"changes\":[{\"source_id\":\"catalog/system/cpu_usage\",\"name\":\"Server CPU\"}]}",
});
console.log(response.status);
await response.body?.cancel();
package main
import (
"fmt"
"net/http"
"time"
"encoding/json"
"os"
"path/filepath"
"strings"
)
func main() {
home, err := os.UserHomeDir(); if err != nil { panic("request failed; credentials and response omitted") }
raw, err := os.ReadFile(filepath.Join(home, ".config/metribeacon/headers.json")); if err != nil { panic("request failed; credentials and response omitted") }
var headers map[string]string
if json.Unmarshal(raw, &headers) != nil { panic("invalid local headers") }
request, err := http.NewRequest("POST", "https://metribeacon.com/api/v1/monitors/00000000-0000-4000-8000-000000000001/collection/plan", strings.NewReader("{\"operation_id\":\"00000000-0000-4000-8000-000000000002\",\"changes\":[{\"source_id\":\"catalog/system/cpu_usage\",\"name\":\"Server CPU\"}]}"))
if err != nil { panic("request failed; credentials and response omitted") }
for name, value := range headers { request.Header.Set(name, value) }
request.Header.Set("Content-Type", "application/json")
client := &http.Client{Timeout: 10*time.Second, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
response, err := client.Do(request)
if err != nil { panic("request failed; credentials and response omitted") }
defer response.Body.Close()
fmt.Println(response.StatusCode)
}
Related guides
- HTTP API, OAuth and MCP
Find the user API endpoints, their permissions, fields, examples and response formats.
- GET Read collection settings
Read the current configuration and its agent acknowledgement. The collection interval is separate from the refresh interval of unchanged states. Custom definitions contain only declared field types and source identities, never commands or credentials.
- PATCH Change collection settings
Uses stable source identities. Each changed field is applied in server acceptance order; unrelated fields and measurement history remain intact. Repeat the same operation_id and body after a lost response. Names, descriptions, activation and collection intervals synchronize. Executables and arguments remain in the locally approved policy.
- GET Receive collection revisions
An outgoing HTTPS event stream signals new revisions. Fetch the current snapshot after each event or reconnect; Last-Event-ID is not a replay log. CLI and MCP credentials receive one JSON revision for bounded polling. Without events, poll every five seconds and apply error backoff.