PUT Update saved log view
/api/v1/logs/views/{id}
Update your own view with its expected revision; changing a shared view also requires editor rights.
On this page
Access and permissions
Update your own view with its expected revision; changing a shared view also requires editor rights.
Browser session: __Host-mb_session cookie.
Machine management credentials in Authorization: Bearer. Check the permissions (scopes) required by the operation.
Parameters and headers
| Field | Location | Type and limits | Required | Meaning |
|---|---|---|---|---|
| id | Path | string; {"format":"uuid"} | Yes | Source or operation identifier. |
Request body
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | object; {"additionalProperties":false} | Yes | — |
| $.definition | CentralLogQuery | Yes | — |
| $.definition.cursor | string; {"maxLength":4096} | No | — |
| $.definition.environment | string | No | — |
| $.definition.from | string; {"format":"date-time"} | No | — |
| $.definition.host | string | No | — |
| $.definition.levels | array<string>; {"maxItems":7} | No | — |
| $.definition.levels[] | string | Yes | — |
| $.definition.limit | integer; {"default":50,"maximum":100,"minimum":1} | No | — |
| $.definition.pattern | string | No | — |
| $.definition.service | string | No | — |
| $.definition.snapshot | string; {"format":"date-time"} | No | — |
| $.definition.source_ids | array<string; {"format":"uuid"}>; {"maxItems":100} | No | — |
| $.definition.source_ids[] | string; {"format":"uuid"} | Yes | — |
| $.definition.text | string; {"maxLength":4096} | No | — |
| $.definition.to | string; {"format":"date-time"} | No | — |
| $.definition.trace_id | string | No | — |
| $.definition.workspace_id | string; {"format":"uuid"} | Yes | — |
| $.definition.facet_fields | array<string; {"enum":["service","environment","host","level","source_id"]}>; {"maxItems":5} | No | Additional exact field-value counts to calculate for the complete filtered time range. Omit when not needed; normal search still returns the complete count, histogram and message patterns. |
| $.definition.facet_fields[] | string; {"enum":["service","environment","host","level","source_id"]} | Yes | — |
| $.definition.stream_id | string; {"maxLength":128} | No | — |
| $.definition.incident_id | string; {"format":"uuid"} | No | — |
| $.definition.incident_scope | string; {"enum":["associated","workspace"]} | No | — |
| $.definition.incident_mode | string; {"enum":["matched","warnings","all"]} | No | — |
| $.expected_revision | integer | No | — |
| $.name | string | Yes | — |
| $.shared | boolean | No | — |
| $.workspace_id | string; {"format":"uuid"} | Yes | — |
Responses
application/json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | object; {"additionalProperties":false} | Yes | — |
| $.id | string; {"format":"uuid"} | Yes | — |
| 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.
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 PUT --header @"$HOME/.config/metribeacon/headers.txt" --header "Content-Type: application/json" --data-binary '{"workspace_id":"00000000-0000-4000-8000-000000000001","name":"API errors","shared":false,"definition":{"workspace_id":"00000000-0000-4000-8000-000000000001","text":"service:api level:>=error","source_ids":[],"levels":[]},"expected_revision":1}' https://metribeacon.com/api/v1/logs/views/00000000-0000-4000-8000-000000000001
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/views/00000000-0000-4000-8000-000000000001',headers=headers,method='PUT',data='{"workspace_id":"00000000-0000-4000-8000-000000000001","name":"API errors","shared":false,"definition":{"workspace_id":"00000000-0000-4000-8000-000000000001","text":"service:api level:>=error","source_ids":[],"levels":[]},"expected_revision":1}'.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/views/00000000-0000-4000-8000-000000000001",{method:"PUT",headers,redirect:"error",signal:AbortSignal.timeout(30000),body:"{\"workspace_id\":\"00000000-0000-4000-8000-000000000001\",\"name\":\"API errors\",\"shared\":false,\"definition\":{\"workspace_id\":\"00000000-0000-4000-8000-000000000001\",\"text\":\"service:api level:>=error\",\"source_ids\":[],\"levels\":[]},\"expected_revision\":1}"});
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("PUT","https://metribeacon.com/api/v1/logs/views/00000000-0000-4000-8000-000000000001",strings.NewReader("{\"workspace_id\":\"00000000-0000-4000-8000-000000000001\",\"name\":\"API errors\",\"shared\":false,\"definition\":{\"workspace_id\":\"00000000-0000-4000-8000-000000000001\",\"text\":\"service:api level:>=error\",\"source_ids\":[],\"levels\":[]},\"expected_revision\":1}"));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.
- DELETE Delete saved log view
Delete your own saved view without deleting logs or changing alert definitions.
- GET List saved log views
Read your personal views and shared views of the selected workspace.
- POST Save log view
Save a personal query definition or share it with editor rights. Alert filters remain independent of later view changes.