MetriBeacon
Menu

POST Report native update progress

/api/v1/agent/updates/{id}/report

Report native update progress

On this page

Access and permissions

Report native update progress

API write key in Authorization: Bearer. It allows data submission for the selected devices or all devices in its workspace.

Parameters and headers

FieldLocationType and limitsRequiredMeaning
idPathstring; {"format":"uuid"}YesReport native update progress

Request body

FieldType and limitsRequiredMeaning
$AgentUpdateReportYes—
$.installation_idstring; {"pattern":"^[0-9a-f]{32}$"}Yes—
$.lease_tokenstring; {"pattern":"^[0-9a-f]{64}$"}Yes—
$.phasestring; {"enum":["downloading","installing","restarting","completed"]}Yes—
$.statestring; {"enum":["running","restart_confirmed","failed"]}Yes—
$.error_codestring; {"enum":["","download_failed","verification_failed","install_failed","rolled_back","rollback_failed","disabled","expired"]}No—
$.running_sha256string; {"pattern":"^[0-9a-f]{64}$"}No—

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
$object; {"additionalProperties":false}Yes—
$.acceptedbooleanYes—

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 '{"installation_id":"00000000000000000000000000000000","lease_token":"0000000000000000000000000000000000000000000000000000000000000000","state":"running","phase":"downloading"}' \\
  "https://metribeacon.com/api/v1/agent/updates/00000000-0000-4000-8000-000000000001/report"
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/agent/updates/00000000-0000-4000-8000-000000000001/report', method='POST', data='{"installation_id":"00000000000000000000000000000000","lease_token":"0000000000000000000000000000000000000000000000000000000000000000","state":"running","phase":"downloading"}'.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/agent/updates/00000000-0000-4000-8000-000000000001/report", { method: "POST", headers, redirect: "manual", signal: AbortSignal.timeout(10000), body: "{\"installation_id\":\"00000000000000000000000000000000\",\"lease_token\":\"0000000000000000000000000000000000000000000000000000000000000000\",\"state\":\"running\",\"phase\":\"downloading\"}" });
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/agent/updates/00000000-0000-4000-8000-000000000001/report", bytes.NewBufferString("{\"installation_id\":\"00000000000000000000000000000000\",\"lease_token\":\"0000000000000000000000000000000000000000000000000000000000000000\",\"state\":\"running\",\"phase\":\"downloading\"}")); 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.

  • POST Claim the update for the bound native installation

    Claim the update for the bound native installation

  • GET Read bound agent configuration

    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 Synchronize local changes

    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.