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
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | CentralLogRecordInput | array<CentralLogRecordInput>; {"maxItems":1000} | object; {"additionalProperties":false} | Yes | — |
| $ (oneOf 1) | CentralLogRecordInput | No | — |
| $ (oneOf 1).attributes | object; {"additionalProperties":true} | No | — |
| $ (oneOf 1).body | JSON | No | — |
| $ (oneOf 1).environment | string | No | — |
| $ (oneOf 1).host | string | No | — |
| $ (oneOf 1).id | string; {"maxLength":256} | No | — |
| $ (oneOf 1).level | string | No | — |
| $ (oneOf 1).message | string; {"maxLength":65536} | No | — |
| $ (oneOf 1).pattern | string | No | — |
| $ (oneOf 1).received_at | string; {"format":"date-time"} | No | — |
| $ (oneOf 1).resource | object; {"additionalProperties":true} | No | — |
| $ (oneOf 1).scope | string | No | — |
| $ (oneOf 1).service | string | No | — |
| $ (oneOf 1).source_id | string; {"format":"uuid"} | No | — |
| $ (oneOf 1).span_id | string | No | — |
| $ (oneOf 1).time | string; {"format":"date-time"} | No | — |
| $ (oneOf 1).time_origin | string | No | — |
| $ (oneOf 1).trace_id | string | No | — |
| $ (oneOf 1).workspace_id | string; {"format":"uuid"} | No | — |
| $ (oneOf 2) | array<CentralLogRecordInput>; {"maxItems":1000} | No | — |
| $ (oneOf 2)[] | CentralLogRecordInput | Yes | — |
| $ (oneOf 2)[].attributes | object; {"additionalProperties":true} | No | — |
| $ (oneOf 2)[].body | JSON | No | — |
| $ (oneOf 2)[].environment | string | No | — |
| $ (oneOf 2)[].host | string | No | — |
| $ (oneOf 2)[].id | string; {"maxLength":256} | No | — |
| $ (oneOf 2)[].level | string | No | — |
| $ (oneOf 2)[].message | string; {"maxLength":65536} | No | — |
| $ (oneOf 2)[].pattern | string | No | — |
| $ (oneOf 2)[].received_at | string; {"format":"date-time"} | No | — |
| $ (oneOf 2)[].resource | object; {"additionalProperties":true} | No | — |
| $ (oneOf 2)[].scope | string | No | — |
| $ (oneOf 2)[].service | string | No | — |
| $ (oneOf 2)[].source_id | string; {"format":"uuid"} | No | — |
| $ (oneOf 2)[].span_id | string | No | — |
| $ (oneOf 2)[].time | string; {"format":"date-time"} | No | — |
| $ (oneOf 2)[].time_origin | string | No | — |
| $ (oneOf 2)[].trace_id | string | No | — |
| $ (oneOf 2)[].workspace_id | string; {"format":"uuid"} | No | — |
| $ (oneOf 3) | object; {"additionalProperties":false} | No | — |
| $ (oneOf 3).batch_id | string | No | — |
| $ (oneOf 3).records | array<CentralLogRecordInput>; {"maxItems":1000} | Yes | — |
| $ (oneOf 3).records[] | CentralLogRecordInput | Yes | — |
| $ (oneOf 3).records[].attributes | object; {"additionalProperties":true} | No | — |
| $ (oneOf 3).records[].body | JSON | No | — |
| $ (oneOf 3).records[].environment | string | No | — |
| $ (oneOf 3).records[].host | string | No | — |
| $ (oneOf 3).records[].id | string; {"maxLength":256} | No | — |
| $ (oneOf 3).records[].level | string | No | — |
| $ (oneOf 3).records[].message | string; {"maxLength":65536} | No | — |
| $ (oneOf 3).records[].pattern | string | No | — |
| $ (oneOf 3).records[].received_at | string; {"format":"date-time"} | No | — |
| $ (oneOf 3).records[].resource | object; {"additionalProperties":true} | No | — |
| $ (oneOf 3).records[].scope | string | No | — |
| $ (oneOf 3).records[].service | string | No | — |
| $ (oneOf 3).records[].source_id | string; {"format":"uuid"} | No | — |
| $ (oneOf 3).records[].span_id | string | No | — |
| $ (oneOf 3).records[].time | string; {"format":"date-time"} | No | — |
| $ (oneOf 3).records[].time_origin | string | No | — |
| $ (oneOf 3).records[].trace_id | string | No | — |
| $ (oneOf 3).records[].workspace_id | string; {"format":"uuid"} | No | — |
| $ (oneOf 3).coverage | CentralLogCheckpoint | No | — |
| $ (oneOf 3).coverage.stream_id | string; {"maxLength":128} | Yes | — |
| $ (oneOf 3).coverage.previous | string | No | — |
| $ (oneOf 3).coverage.from | string; {"format":"date-time"} | Yes | — |
| $ (oneOf 3).coverage.through | string; {"format":"date-time"} | Yes | — |
| $ (oneOf 3).coverage.continuous | boolean | Yes | — |
| $ (oneOf 3).coverage.gap | boolean | No | — |
| $ (oneOf 3).coverage.diagnostic | CentralLogDiagnostic | No | — |
| $ (oneOf 3).coverage.diagnostic.code | string; {"enum":["transport_error","http_error","helper_unavailable","permission_denied","reader_unavailable","spool_unavailable","buffer_full","source_gap","checkpoint_conflict"]} | Yes | — |
| $ (oneOf 3).coverage.diagnostic.phase | string; {"enum":["policy","upload","reader","spool","startup"]} | Yes | — |
| $ (oneOf 3).coverage.diagnostic.at | string; {"format":"date-time"} | Yes | — |
| $ (oneOf 3).coverage.diagnostic.http_status | integer; {"minimum":100,"maximum":599} | No | — |
| $ (oneOf 3).coverage.diagnostic.server_phase | string; {"enum":["admission","account","storage","usage","source","receipts","outbox","commit","checkpoint"]} | No | — |
| $ (oneOf 3).coverage.diagnostic.sqlstate | string; {"pattern":"^[A-Z0-9]{5}$"} | No | — |
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | string; {"maxLength":1048576} | Yes | — |
Responses
application/json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | object; {"additionalProperties":false} | Yes | — |
| $.accepted | integer | No | — |
| $.duplicates | integer | No | — |
| $.filtered | integer | No | — |
| $.indexing | string | No | — |
| $.checkpoint | string | No | — |
| Stable error codes |
|---|
| invalid_credential |
| 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. |
| 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 | — |
| Stable error codes |
|---|
| csrf |
| insufficient_scope |
| invalid_origin |
| operator_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. |
| 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 | — |
| Stable error codes |
|---|
| invalid_workspace |
| not_found |
| 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. |
| 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 | — |
| Stable error codes |
|---|
| invalid_workspace |
| stale_check |
| result_conflict |
| 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. |
| 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 | — |
| Stable error codes |
|---|
| invalid_config |
| invalid_monitor |
| 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. |
| 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 | — |
| Stable error codes |
|---|
| invalid_workspace |
| check_capacity |
| Header | Type and limits | Meaning |
|---|---|---|
| Retry-After | string; {"pattern":"^[0-9]+$"} | Temporary server error; retry unchanged with Retry-After and the same idempotency identifier |
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 | — |
| Stable error codes |
|---|
| check_location_unavailable |
| feature_unavailable |
| log_admission_busy |
| log_queue_full |
| log_storage_unavailable |
| 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. |
| 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 | — |
| Stable error codes |
|---|
| log_limit |
| request_too_large |
| 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. |
| 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 | — |
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.
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
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)
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();
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)}
Related guides
- 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.