MetriBeacon
Menu

POST Ingest native logs

/api/v1/logs/ingest

Accept JSON, arrays or NDJSON with optional gzip. Mask before durable acceptance; stable batch and record IDs prevent duplicate charging and storage.

On this page

Access and permissions

Accept JSON, arrays or NDJSON with optional gzip. Mask before durable acceptance; stable batch and record IDs prevent duplicate charging and storage.

LogSourceKey

Parameters and headers

No path, query or additional request-header parameters.

Request body

FieldType and limitsRequiredMeaning
$CentralLogRecordInput | array<CentralLogRecordInput>; {"maxItems":1000} | object; {"additionalProperties":false}Yes—
$ (oneOf 1)CentralLogRecordInputNo—
$ (oneOf 1).attributesobject; {"additionalProperties":true}No—
$ (oneOf 1).bodyJSONNo—
$ (oneOf 1).environmentstringNo—
$ (oneOf 1).hoststringNo—
$ (oneOf 1).idstring; {"maxLength":256}No—
$ (oneOf 1).levelstringNo—
$ (oneOf 1).messagestring; {"maxLength":65536}No—
$ (oneOf 1).patternstringNo—
$ (oneOf 1).received_atstring; {"format":"date-time"}No—
$ (oneOf 1).resourceobject; {"additionalProperties":true}No—
$ (oneOf 1).scopestringNo—
$ (oneOf 1).servicestringNo—
$ (oneOf 1).source_idstring; {"format":"uuid"}No—
$ (oneOf 1).span_idstringNo—
$ (oneOf 1).timestring; {"format":"date-time"}No—
$ (oneOf 1).time_originstringNo—
$ (oneOf 1).trace_idstringNo—
$ (oneOf 1).workspace_idstring; {"format":"uuid"}No—
$ (oneOf 2)array<CentralLogRecordInput>; {"maxItems":1000}No—
$ (oneOf 2)[]CentralLogRecordInputYes—
$ (oneOf 2)[].attributesobject; {"additionalProperties":true}No—
$ (oneOf 2)[].bodyJSONNo—
$ (oneOf 2)[].environmentstringNo—
$ (oneOf 2)[].hoststringNo—
$ (oneOf 2)[].idstring; {"maxLength":256}No—
$ (oneOf 2)[].levelstringNo—
$ (oneOf 2)[].messagestring; {"maxLength":65536}No—
$ (oneOf 2)[].patternstringNo—
$ (oneOf 2)[].received_atstring; {"format":"date-time"}No—
$ (oneOf 2)[].resourceobject; {"additionalProperties":true}No—
$ (oneOf 2)[].scopestringNo—
$ (oneOf 2)[].servicestringNo—
$ (oneOf 2)[].source_idstring; {"format":"uuid"}No—
$ (oneOf 2)[].span_idstringNo—
$ (oneOf 2)[].timestring; {"format":"date-time"}No—
$ (oneOf 2)[].time_originstringNo—
$ (oneOf 2)[].trace_idstringNo—
$ (oneOf 2)[].workspace_idstring; {"format":"uuid"}No—
$ (oneOf 3)object; {"additionalProperties":false}No—
$ (oneOf 3).batch_idstringNo—
$ (oneOf 3).recordsarray<CentralLogRecordInput>; {"maxItems":1000}Yes—
$ (oneOf 3).records[]CentralLogRecordInputYes—
$ (oneOf 3).records[].attributesobject; {"additionalProperties":true}No—
$ (oneOf 3).records[].bodyJSONNo—
$ (oneOf 3).records[].environmentstringNo—
$ (oneOf 3).records[].hoststringNo—
$ (oneOf 3).records[].idstring; {"maxLength":256}No—
$ (oneOf 3).records[].levelstringNo—
$ (oneOf 3).records[].messagestring; {"maxLength":65536}No—
$ (oneOf 3).records[].patternstringNo—
$ (oneOf 3).records[].received_atstring; {"format":"date-time"}No—
$ (oneOf 3).records[].resourceobject; {"additionalProperties":true}No—
$ (oneOf 3).records[].scopestringNo—
$ (oneOf 3).records[].servicestringNo—
$ (oneOf 3).records[].source_idstring; {"format":"uuid"}No—
$ (oneOf 3).records[].span_idstringNo—
$ (oneOf 3).records[].timestring; {"format":"date-time"}No—
$ (oneOf 3).records[].time_originstringNo—
$ (oneOf 3).records[].trace_idstringNo—
$ (oneOf 3).records[].workspace_idstring; {"format":"uuid"}No—
$ (oneOf 3).coverageCentralLogCheckpointNo—
$ (oneOf 3).coverage.stream_idstring; {"maxLength":128}Yes—
$ (oneOf 3).coverage.previousstringNo—
$ (oneOf 3).coverage.fromstring; {"format":"date-time"}Yes—
$ (oneOf 3).coverage.throughstring; {"format":"date-time"}Yes—
$ (oneOf 3).coverage.continuousbooleanYes—
$ (oneOf 3).coverage.gapbooleanNo—
$ (oneOf 3).coverage.diagnosticCentralLogDiagnosticNo—
$ (oneOf 3).coverage.diagnostic.codestring; {"enum":["transport_error","http_error","helper_unavailable","permission_denied","reader_unavailable","spool_unavailable","buffer_full","source_gap","checkpoint_conflict"]}Yes—
$ (oneOf 3).coverage.diagnostic.phasestring; {"enum":["policy","upload","reader","spool","startup"]}Yes—
$ (oneOf 3).coverage.diagnostic.atstring; {"format":"date-time"}Yes—
$ (oneOf 3).coverage.diagnostic.http_statusinteger; {"minimum":100,"maximum":599}No—
$ (oneOf 3).coverage.diagnostic.server_phasestring; {"enum":["admission","account","storage","usage","source","receipts","outbox","commit","checkpoint"]}No—
$ (oneOf 3).coverage.diagnostic.sqlstatestring; {"pattern":"^[A-Z0-9]{5}$"}No—
FieldType and limitsRequiredMeaning
$string; {"maxLength":1048576}Yes—

Responses

application/json

FieldType and limitsRequiredMeaning
$object; {"additionalProperties":false}Yes—
$.acceptedintegerNo—
$.duplicatesintegerNo—
$.filteredintegerNo—
$.indexingstringNo—
$.checkpointstringNo—
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.
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—
Stable error codes
csrf
insufficient_scope
invalid_origin
operator_required
forbidden
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.
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—
Stable error codes
invalid_workspace
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.
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—
Stable error codes
invalid_workspace
stale_check
result_conflict
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.
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—
Stable error codes
invalid_config
invalid_monitor
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.
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—
Stable error codes
invalid_workspace
check_capacity
HeaderType and limitsMeaning
Retry-Afterstring; {"pattern":"^[0-9]+$"}Temporary server error; retry unchanged with Retry-After and the same idempotency identifier

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
check_location_unavailable
feature_unavailable
log_admission_busy
log_queue_full
log_storage_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.
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—
Stable error codes
log_limit
request_too_large
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.
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—

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 --proto "=https" --tlsv1.2 --fail-with-body --max-time 30 --request POST --header @"$HOME/.config/metribeacon/headers.txt" --header "Content-Type: application/json" --data-binary '{"batch_id":"batch-1","records":[{"id":"entry-1","level":"info","message":"worker ready","attributes":{"zero":0,"ready":true}}]}' https://metribeacon.com/api/v1/logs/ingest
python
import json
from pathlib import Path
from urllib.request import Request, urlopen
headers=json.loads((Path.home()/".config/metribeacon/headers.json").read_text())
headers["Content-Type"]="application/json"
request=Request('https://metribeacon.com/api/v1/logs/ingest',headers=headers,method='POST',data='{"batch_id":"batch-1","records":[{"id":"entry-1","level":"info","message":"worker ready","attributes":{"zero":0,"ready":true}}]}'.encode())
with urlopen(request,timeout=30) as response:
    print(response.status)
javascript
import {readFile} from "node:fs/promises";
import {homedir} from "node:os";
const headers=JSON.parse(await readFile(homedir()+"/.config/metribeacon/headers.json","utf8"));
headers["Content-Type"]="application/json";
const response=await fetch("https://metribeacon.com/api/v1/logs/ingest",{method:"POST",headers,redirect:"error",signal:AbortSignal.timeout(30000),body:"{\"batch_id\":\"batch-1\",\"records\":[{\"id\":\"entry-1\",\"level\":\"info\",\"message\":\"worker ready\",\"attributes\":{\"zero\":0,\"ready\":true}}]}"});
console.log(response.status);await response.body?.cancel();
go
package main
import("net/http";"os";"path/filepath";"encoding/json";"time";"fmt";"strings")
func main(){home,_:=os.UserHomeDir();raw,e:=os.ReadFile(filepath.Join(home,".config/metribeacon/headers.json"));if e!=nil{panic("headers unavailable")};var h map[string]string;if json.Unmarshal(raw,&h)!=nil{panic("invalid headers")};r,_:=http.NewRequest("POST","https://metribeacon.com/api/v1/logs/ingest",strings.NewReader("{\"batch_id\":\"batch-1\",\"records\":[{\"id\":\"entry-1\",\"level\":\"info\",\"message\":\"worker ready\",\"attributes\":{\"zero\":0,\"ready\":true}}]}"));for k,v:=range h{r.Header.Set(k,v)};r.Header.Set("Content-Type","application/json");c:=&http.Client{Timeout:30*time.Second,CheckRedirect:func(*http.Request,[]*http.Request)error{return http.ErrUseLastResponse}};res,e:=c.Do(r);if e!=nil{panic("request failed")};defer res.Body.Close();fmt.Println(res.StatusCode)}
  • HTTP API, OAuth and MCP

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

  • GET Read approved log policy

    A source write key reads only its own enabled state and masking policy. It cannot approve new local files or commands.

  • POST Report log collection coverage

    Report a selected log stream’s collection or delivery state. A ready status alone does not prove complete delivery; cursor checkpoints are acknowledged together with their log batches. Buffered interruptions remain pending until continuity is confirmed.

  • GET List log alerts

    Read log rule definitions, delivery configuration and current evaluation coverage for the authorized workspace.