MetriBeacon
Menu

POST Confirm an agent update

/api/v1/monitors/{id}/agent-update

New native installations enable remote updates with a separate key permission. An icon in the server list appears when a newer approved version is available. The workspace owner confirms each update; wait for confirmation after restart. Configuration-write permission is independent. Temporary contention returns 503 with update_busy and Retry-After: 1. Retry with the same operation_id and confirmed target; the interface retries for up to ten seconds. An accepted request is returned again without creating another update. The opaque target_id binds the approved release and source installation/version; refresh and confirm again if they change.

On this page

Access and permissions

New native installations enable remote updates with a separate key permission. An icon in the server list appears when a newer approved version is available. The workspace owner confirms each update; wait for confirmation after restart. Configuration-write permission is independent. Temporary contention returns 503 with update_busy and Retry-After: 1. Retry with the same operation_id and confirmed target; the interface retries for up to ten seconds. An accepted request is returned again without creating another update. The opaque target_id binds the approved release and source installation/version; refresh and confirm again if they change.

Browser session: __Host-mb_session cookie.

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"}YesConfirm an agent update

Request body

FieldType and limitsRequiredMeaning
$AgentUpdateStartYes—
$.target_idstring; {"pattern":"^[0-9a-f]{64}$"}Yes—
$.operation_idstring; {"format":"uuid"}Yes—
$.confirmboolean; {"const":true}Yes—

Responses

Stable error codes
unauthorized

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—
Stable error codes
csrf
insufficient_scope
invalid_origin
owner_required
forbidden
agent_config_write_required

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—
Stable error codes
not_found

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—
Stable error codes
stale
not_available

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—
Stable error codes
invalid

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—
Stable error codes
quota_exceeded
rate_limited
HeaderType and limitsMeaning
Retry-Afterstring; {"pattern":"^[0-9]+$"}Seconds before retry. Preserve supported idempotency identifiers and respect the operation’s mutation semantics.

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—
Stable error codes
unavailable
update_busy
HeaderType and limitsMeaning
Retry-Afterstring; {"pattern":"^[0-9]+$"}Seconds before retry. Preserve supported idempotency identifiers and respect the operation’s mutation semantics.

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—

application/json

FieldType and limitsRequiredMeaning
$AgentUpdateJobYes—
$.idstring; {"format":"uuid"}Yes—
$.installation_idstring; {"pattern":"^[0-9a-f]{32}$"}Yes—
$.statestring; {"enum":["pending","running","succeeded","failed","expired","unconfirmed"]}Yes—
$.phasestring; {"enum":["downloading","installing","restarting","completed"]}Yes—
$.targetAgentUpdateTargetYes—
$.target.commitstring; {"pattern":"^[0-9a-f]{40}$"}Yes—
$.target.versionstringYes—
$.target.created_atstring; {"format":"date-time"}Yes—
$.target.fileobject; {"additionalProperties":false}Yes—
$.target.file.namestringYes—
$.target.file.platformstring; {"enum":["linux","darwin","windows"]}Yes—
$.target.file.architecturestring; {"enum":["amd64","arm64"]}Yes—
$.target.file.kindstring; {"const":"binary"}Yes—
$.target.file.sha256string; {"pattern":"^[0-9a-f]{64}$"}Yes—
$.target.file.sizeinteger; {"minimum":1,"maximum":268435456}Yes—
$.requested_atstring; {"format":"date-time"}Yes—
$.updated_atstring; {"format":"date-time"}Yes—
$.claimed_atstring; {"format":"date-time"} | nullYes—
$.claimed_at (anyOf 1)string; {"format":"date-time"}No—
$.claimed_at (anyOf 2)nullNo—
$.finished_atstring; {"format":"date-time"} | nullYes—
$.finished_at (anyOf 1)string; {"format":"date-time"}No—
$.finished_at (anyOf 2)nullNo—
$.error_codestringYes—
$.monitor_idstring; {"format":"uuid"}Yes—
$.operation_idstring; {"format":"uuid"}Yes—
$.source_versionstring; {"maxLength":128}Yes—
$.source_sha256string; {"pattern":"^[0-9a-f]{64}$"}Yes—

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.

HTTP 202 means the background job was accepted. Use the returned job ID to check its status. Download results when the job is complete, or inspect its error or cancellation status.

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 '{"target_id":"0000000000000000000000000000000000000000000000000000000000000000","operation_id":"00000000-0000-4000-8000-000000000001","confirm":true}' \\
  "https://metribeacon.com/api/v1/monitors/00000000-0000-4000-8000-000000000001/agent-update"
python
import json
from pathlib import Path
from urllib.request import Request, build_opener, HTTPRedirectHandler
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/agent-update', method='POST', data='{"target_id":"0000000000000000000000000000000000000000000000000000000000000000","operation_id":"00000000-0000-4000-8000-000000000001","confirm":true}'.encode(), headers=headers)
class NoRedirect(HTTPRedirectHandler):
    def redirect_request(self, request, fp, code, message, headers, target):
        return None
with build_opener(NoRedirect()).open(request, timeout=10) as response:
    print(response.status)
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/agent-update", { method: "POST", headers, redirect: "manual", signal: AbortSignal.timeout(10000), body: "{\"target_id\":\"0000000000000000000000000000000000000000000000000000000000000000\",\"operation_id\":\"00000000-0000-4000-8000-000000000001\",\"confirm\":true}" });
console.log(response.status);
await response.body?.cancel();
go
package main
import ("bytes"; "encoding/json"; "fmt"; "net/http"; "os"; "path/filepath"; "time")
func main() {
 home, err := os.UserHomeDir(); if err != nil { panic("home directory unavailable") }
 raw, err := os.ReadFile(filepath.Join(home, ".config/metribeacon/headers.json")); if err != nil { panic("private headers unavailable") }
 headers := map[string]string{}; if json.Unmarshal(raw, &headers) != nil { panic("invalid private headers") }
 request, err := http.NewRequest("POST", "https://metribeacon.com/api/v1/monitors/00000000-0000-4000-8000-000000000001/agent-update", bytes.NewBufferString("{\"target_id\":\"0000000000000000000000000000000000000000000000000000000000000000\",\"operation_id\":\"00000000-0000-4000-8000-000000000001\",\"confirm\":true}")); if err != nil { panic("request unavailable") }
 for key,value := range headers { request.Header.Set(key,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 agent update availability and progress

    New native installations enable remote updates with a separate key permission. An icon in the server list appears when a newer approved version is available. The workspace owner confirms each update; wait for confirmation after restart. Configuration-write permission is independent. Temporary contention returns 503 with update_busy and Retry-After: 1. Retry with the same operation_id and confirmed target; the interface retries for up to ten seconds. An accepted request is returned again without creating another update. The opaque target_id binds the approved release and source installation/version; refresh and confirm again if they change.

  • 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.

  • GET Read your monitor and configuration

    Read your monitor and configuration.