cloadyDocs
Referencia de la APIEndpointsApplications

Read browser monitoring

Returns the app's public browser key, the script URL and the hosts allowed to send beacons, from which the snippet is built, when the newest beacon arrived and the settings its snippet carries, the tag Cloady adds at the edge if it adds one, and LCP p75 and active sessions over the range once pages send beacons. Browser monitoring is on while the app's pages carry the snippet, whose own attributes set replay share, masking and the conversion goal, or while Cloady adds it at the edge, whose settings are the one thing stored: the app variable CLOADY_BROWSER_MONITORING.

GET
/api/workspaces/{workspaceSlug}/apps/{appSlug}/browser
AuthorizationBearer <token>

Personal API token (cldy_…)

In: header

Path Parameters

workspaceSlug*string
appSlug*string

Query Parameters

env?string

Value in

  • "production"
  • "preview"
  • "development"
region?string
range?string

How far back to look; the answer has 30 to 96 points across it

Default"1h"

Value in

  • "15m"
  • "1h"
  • "6h"
  • "24h"
  • "7d"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/apps/string/browser"
{  "key": "string",  "script": "string",  "endpoint": "string",  "hosts": [    "string"  ],  "lastSeen": 0,  "config": {    "method": "tag",    "replay": 0,    "mask": "text",    "goal": "string"  },  "edge": {    "replay": 0,    "mask": "text",    "goal": "string",    "tag": "string"  },  "pulse": {    "start": 0,    "step": 0,    "lcp": 0,    "active": 0,    "lcpSeries": [      0    ],    "activeSeries": [      0    ]  }}

Query an app's logs GET

Runs a LogQL query over the app's own logs, kept for seven days, and returns Loki's answer unchanged: lines for a log query, series for a metric query. Streams: `{container="<service>"}` is each compose service's own output, with `pod` and a `detected_level` (error, critical, fatal, warn, info, debug, trace or unknown) to filter on as `| detected_level=~"error|critical|fatal"`; `{container="_events"}` holds the Kubernetes events about the app's objects as JSON (`kind`, `name`, `reason`, `type`, `msg`, `count`); `{container="_access", service="<service>"}` is the ingress access log of the service the app's address routes to, as Traefik's JSON (`RequestMethod`, `RequestPath`, `DownstreamStatus`, `Duration` in nanoseconds, `request_User-Agent`), with `route`, `method` and `status` as fields; and `{container="_rum", kind="pageview"}` with kinds `vital`, `error`, `net`, `signal`, `custom` and `session` holds browser monitoring, with `page`, `session`, `device`, `browser`, `os` and `country` as fields. Session recordings are kept apart: getBrowserSessionReplay reads them, with the developer role. A query the store refuses comes back with the store's own status and `error`. The path is the store's own, so a Grafana data source can point here too.

Add the browser script at the edge PUT

Makes Cloady add the browser monitoring script tag before `</head>` of every HTML page the app's address and custom domains serve, with no code change or redeploy, or stop adding it with `edge: null`. The settings are kept in the app variable CLOADY_BROWSER_MONITORING and apply on the next page load; no service restarts. A page whose head already carries the script keeps its own. Answers 400 when the app has no web address, and 502 when the settings were saved but the app couldn't be reconciled, which repeating a request that sets `edge` retries. Needs the developer role.