MetriBeacon
Menu

POST Explicitly save HTTP availability and certificate alarms

/api/v1/monitors/{id}/http/alarms

Create only the selected alarm suggestions within account limits. Reusing a suggestion keeps later user edits.

On this page

Access and permissions

Create only the selected alarm suggestions within account limits. Reusing a suggestion keeps later user edits.

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

FieldLocationType and limitsRequiredMeaning
idPathstring; {"format":"uuid"}YesResource UUID from the path. It must exist and be accessible to the acting identity.
OriginHeaderstring; {"format":"uri"}NoIf present, must match the canonical HTTPS origin. Sec-Fetch-Site cross-site is rejected.
X-CSRF-TokenHeaderstringNoBrowser CSRF cookie value. Not required when an allowed machine management credential is used.

Request body

FieldType and limitsRequiredMeaning
$object; {"additionalProperties":false}Yes—
$.availabilitybooleanNo—
$.certificatebooleanNo—

Responses

HeaderType and limitsMeaning
Cache-Controlstring; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"}Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation.
Content-Languagestring; {"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-PolicyJSON; {"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.
VarystringResponses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie.
X-Content-Type-OptionsJSON; {"const":"nosniff"}The browser must use the declared content type.
X-Frame-OptionsJSON; {"const":"DENY"}The response must not be embedded in a frame.
X-Request-IDstringServer-generated request identifier. Include this when reporting an error; inbound values are not trusted.

application/json

FieldType and limitsRequiredMeaning
$objectYes—
$.rulesobject; {"additionalProperties":false}Yes—
$.rules.availabilitystring; {"format":"uuid"}No—
$.rules.certificatestring; {"format":"uuid"}No—
json
{
  "rules": {}
}
Stable error codes
invalid_credential
unauthorized
HeaderType and limitsMeaning
Cache-Controlstring; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"}Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation.
Content-Languagestring; {"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-PolicyJSON; {"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.
VarystringResponses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie.
X-Content-Type-OptionsJSON; {"const":"nosniff"}The browser must use the declared content type.
X-Frame-OptionsJSON; {"const":"DENY"}The response must not be embedded in a frame.
X-Request-IDstringServer-generated request identifier. Include this when reporting an error; inbound values are not trusted.

application/problem+json

FieldType and limitsRequiredMeaning
$ProblemYes—
$.codestringYesStable machine-readable error code
$.detailstringYesShort localized explanation without internal error details
$.instancestringYesUnique relative identifier /api/v1/requests/{request_id}; not a retrievable resource
$.messagestringYesTemporarily identical to detail for existing clients
$.message_keystringYesStable translation key for changing the displayed language without another request
$.message_paramsobject; {"additionalProperties":true}YesNamed, safely rendered message parameters; never arbitrary HTML
$.request_idstring; {"pattern":"^[0-9a-f]{32}$"}YesServer-generated diagnostic identifier. It contains no login token or credential.
$.statusinteger; {"maximum":599,"minimum":400}Yes—
$.titlestringYesLocalized HTTP status title
$.typestring; {"const":"about:blank"}Yes—
json
{
  "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
csrf
insufficient_scope
invalid_origin
HeaderType and limitsMeaning
Cache-Controlstring; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"}Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation.
Content-Languagestring; {"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-PolicyJSON; {"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.
VarystringResponses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie.
X-Content-Type-OptionsJSON; {"const":"nosniff"}The browser must use the declared content type.
X-Frame-OptionsJSON; {"const":"DENY"}The response must not be embedded in a frame.
X-Request-IDstringServer-generated request identifier. Include this when reporting an error; inbound values are not trusted.

application/problem+json

FieldType and limitsRequiredMeaning
$ProblemYes—
$.codestringYesStable machine-readable error code
$.detailstringYesShort localized explanation without internal error details
$.instancestringYesUnique relative identifier /api/v1/requests/{request_id}; not a retrievable resource
$.messagestringYesTemporarily identical to detail for existing clients
$.message_keystringYesStable translation key for changing the displayed language without another request
$.message_paramsobject; {"additionalProperties":true}YesNamed, safely rendered message parameters; never arbitrary HTML
$.request_idstring; {"pattern":"^[0-9a-f]{32}$"}YesServer-generated diagnostic identifier. It contains no login token or credential.
$.statusinteger; {"maximum":599,"minimum":400}Yes—
$.titlestringYesLocalized HTTP status title
$.typestring; {"const":"about:blank"}Yes—
json
{
  "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
HeaderType and limitsMeaning
Cache-Controlstring; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"}Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation.
Content-Languagestring; {"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-PolicyJSON; {"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.
VarystringResponses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie.
X-Content-Type-OptionsJSON; {"const":"nosniff"}The browser must use the declared content type.
X-Frame-OptionsJSON; {"const":"DENY"}The response must not be embedded in a frame.
X-Request-IDstringServer-generated request identifier. Include this when reporting an error; inbound values are not trusted.

application/problem+json

FieldType and limitsRequiredMeaning
$ProblemYes—
$.codestringYesStable machine-readable error code
$.detailstringYesShort localized explanation without internal error details
$.instancestringYesUnique relative identifier /api/v1/requests/{request_id}; not a retrievable resource
$.messagestringYesTemporarily identical to detail for existing clients
$.message_keystringYesStable translation key for changing the displayed language without another request
$.message_paramsobject; {"additionalProperties":true}YesNamed, safely rendered message parameters; never arbitrary HTML
$.request_idstring; {"pattern":"^[0-9a-f]{32}$"}YesServer-generated diagnostic identifier. It contains no login token or credential.
$.statusinteger; {"maximum":599,"minimum":400}Yes—
$.titlestringYesLocalized HTTP status title
$.typestring; {"const":"about:blank"}Yes—
json
{
  "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": 404,
  "title": "Demo error",
  "type": "about:blank"
}
Stable error codes
invalid_selection
HeaderType and limitsMeaning
Cache-Controlstring; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"}Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation.
Content-Languagestring; {"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-PolicyJSON; {"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.
VarystringResponses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie.
X-Content-Type-OptionsJSON; {"const":"nosniff"}The browser must use the declared content type.
X-Frame-OptionsJSON; {"const":"DENY"}The response must not be embedded in a frame.
X-Request-IDstringServer-generated request identifier. Include this when reporting an error; inbound values are not trusted.

application/problem+json

FieldType and limitsRequiredMeaning
$ProblemYes—
$.codestringYesStable machine-readable error code
$.detailstringYesShort localized explanation without internal error details
$.instancestringYesUnique relative identifier /api/v1/requests/{request_id}; not a retrievable resource
$.messagestringYesTemporarily identical to detail for existing clients
$.message_keystringYesStable translation key for changing the displayed language without another request
$.message_paramsobject; {"additionalProperties":true}YesNamed, safely rendered message parameters; never arbitrary HTML
$.request_idstring; {"pattern":"^[0-9a-f]{32}$"}YesServer-generated diagnostic identifier. It contains no login token or credential.
$.statusinteger; {"maximum":599,"minimum":400}Yes—
$.titlestringYesLocalized HTTP status title
$.typestring; {"const":"about:blank"}Yes—
json
{
  "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
creation_quota
rule_limit
HeaderType and limitsMeaning
Cache-Controlstring; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"}Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation.
Content-Languagestring; {"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-PolicyJSON; {"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-Afterstring; {"pattern":"^[0-9]+$"}Seconds before retry. Preserve supported idempotency identifiers and respect the operation’s mutation semantics.
VarystringResponses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie.
X-Content-Type-OptionsJSON; {"const":"nosniff"}The browser must use the declared content type.
X-Frame-OptionsJSON; {"const":"DENY"}The response must not be embedded in a frame.
X-Request-IDstringServer-generated request identifier. Include this when reporting an error; inbound values are not trusted.

application/problem+json

FieldType and limitsRequiredMeaning
$ProblemYes—
$.codestringYesStable machine-readable error code
$.detailstringYesShort localized explanation without internal error details
$.instancestringYesUnique relative identifier /api/v1/requests/{request_id}; not a retrievable resource
$.messagestringYesTemporarily identical to detail for existing clients
$.message_keystringYesStable translation key for changing the displayed language without another request
$.message_paramsobject; {"additionalProperties":true}YesNamed, safely rendered message parameters; never arbitrary HTML
$.request_idstring; {"pattern":"^[0-9a-f]{32}$"}YesServer-generated diagnostic identifier. It contains no login token or credential.
$.statusinteger; {"maximum":599,"minimum":400}Yes—
$.titlestringYesLocalized HTTP status title
$.typestring; {"const":"about:blank"}Yes—
json
{
  "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
feature_unavailable
unavailable
HeaderType and limitsMeaning
Cache-Controlstring; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"}Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation.
Content-Languagestring; {"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-PolicyJSON; {"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-Afterstring; {"pattern":"^[0-9]+$"}Seconds before retry. Preserve supported idempotency identifiers and respect the operation’s mutation semantics.
VarystringResponses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie.
X-Content-Type-OptionsJSON; {"const":"nosniff"}The browser must use the declared content type.
X-Frame-OptionsJSON; {"const":"DENY"}The response must not be embedded in a frame.
X-Request-IDstringServer-generated request identifier. Include this when reporting an error; inbound values are not trusted.

application/problem+json

FieldType and limitsRequiredMeaning
$ProblemYes—
$.codestringYesStable machine-readable error code
$.detailstringYesShort localized explanation without internal error details
$.instancestringYesUnique relative identifier /api/v1/requests/{request_id}; not a retrievable resource
$.messagestringYesTemporarily identical to detail for existing clients
$.message_keystringYesStable translation key for changing the displayed language without another request
$.message_paramsobject; {"additionalProperties":true}YesNamed, safely rendered message parameters; never arbitrary HTML
$.request_idstring; {"pattern":"^[0-9a-f]{32}$"}YesServer-generated diagnostic identifier. It contains no login token or credential.
$.statusinteger; {"maximum":599,"minimum":400}Yes—
$.titlestringYesLocalized HTTP status title
$.typestring; {"const":"about:blank"}Yes—
json
{
  "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.

shell
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 '{"availability":true,"certificate":true}' \
  "https://metribeacon.com/api/v1/monitors/00000000-0000-4000-8000-000000000001/http/alarms"
python
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/http/alarms", data="{\"availability\":true,\"certificate\":true}".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()
javascript
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/http/alarms", {
  method: "POST", headers, redirect: "manual",
  signal: AbortSignal.timeout(10000), body: "{\"availability\":true,\"certificate\":true}",
});
console.log(response.status);
await response.body?.cancel();
go
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/http/alarms", strings.NewReader("{\"availability\":true,\"certificate\":true}"))
  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)
}
  • HTTP API, OAuth and MCP

    Find the user API endpoints, their permissions, fields, examples and response formats.

  • GET Read HTTP header names without their secret values

    Returns header names and whether values are configured; it never returns secret values. Use config_revision when making concurrent changes.

  • PUT Store or remove encrypted HTTP headers

    At most eight stored headers are allowed. Values are encrypted with AES-256-GCM and bound to account, monitor, origin and header name. Use explicit removal instead of an empty replacement secret.

  • DELETE Permanently delete a monitor

    Only the workspace owner may permanently delete a monitor. First request a five-minute configuration-bound preview, then send preview_id, confirm_deletion: true and an Idempotency-Key. Unconfirmed legacy archive requests are rejected. The monitor is immediately blocked; a durable job removes all its database, archive and cache data and cleans linked displays. Read the job until complete; paused jobs show a technical error and retry automatically. Daily quotas and security counters remain unchanged. Previously delivered messages and downloaded files cannot be recalled.