API reference
Every page here is generated from the JSDoc and types in src/ by bun run docs:gen. The compatibility page says which resources are tested against the live API.
Incidents
Section titled “Incidents”| Symbol | Kind | What it is |
|---|---|---|
Incidents.AcknowledgeIncident |
Binding | Acknowledge an ongoing incident from running code (acknowledge_incident), which pauses its escalation: nobody further down the escalation policy is alerted. |
Incidents.AcknowledgeIncidentHttp |
Layer | The HTTP implementation of AcknowledgeIncident (Incidents.acknowledgeIncident with the API token you pass). |
Incidents.AmazonSnsIntegration |
Resource | An Amazon SNS integration opens incidents from the notifications your Amazon SNS topic sends. |
Incidents.AwsCloudWatchIntegration |
Resource | Receives alerts from AWS CloudWatch and opens Better Stack incidents. |
Incidents.AzureIntegration |
Resource | An Azure integration turns alerts from Azure Monitor into Better Stack incidents. |
Incidents.CatalogRecord |
Resource | A Better Stack catalog record: one row of a CatalogRelation, with values for its attributes. |
Incidents.CatalogRelation |
Resource | A Better Stack catalog relation: a table in the on-call catalog, such as services or teams. |
Incidents.CreateIncident |
Binding | Open a manual incident from running code (create_incident): summary says what’s wrong, description becomes its first comment; requesterEmail is required with an API token. |
Incidents.CreateIncidentHttp |
Layer | The HTTP implementation of CreateIncident (Incidents.createIncident with the API token you pass). |
Incidents.CreateStatusReport |
Binding | Publish an incident or scheduled-maintenance report on a StatusPage from running code (create_status_report): a title, the first update’s message, the affectedResources and their status, and for ma… |
Incidents.CreateStatusReportHttp |
Layer | The HTTP implementation of CreateStatusReport (Incidents.createStatusReport with the API token you pass). |
Incidents.CreateStatusUpdate |
Binding | Post a status update to a report on a StatusPage from running code (create_status_update): the next message and the resources’ new states (resolve them to close a manual report). |
Incidents.CreateStatusUpdateHttp |
Layer | The HTTP implementation of CreateStatusUpdate (Incidents.createStatusUpdate with the API token you pass). |
Incidents.DatadogIntegration |
Resource | Receives alerts from Datadog and opens Better Stack incidents. |
Incidents.ElasticIntegration |
Resource | An Elastic integration turns alerts from Elastic (Kibana alerting) into Better Stack incidents. |
Incidents.EscalationPolicy |
Resource | A Better Stack escalation policy: decides who is notified about an incident, in what order, and how long to wait between steps. |
Incidents.EscalationPolicyGroup |
Resource | A Better Stack escalation policy group: keeps related EscalationPolicy policies together. |
Incidents.FailHeartbeat |
Binding | Report an explicit failure on an Heartbeat (<url>/fail), so an incident opens right away instead of after the missed period plus grace. |
Incidents.FailHeartbeatHttp |
Layer | The HTTP implementation of FailHeartbeat (GET <heartbeat url>/fail). |
Incidents.GoogleMonitoringIntegration |
Resource | Receives alerts from Google Cloud Monitoring and opens Better Stack incidents. |
Incidents.GrafanaIntegration |
Resource | A Grafana integration turns alerts from Grafana into Better Stack incidents. |
Incidents.Heartbeat |
Resource | A Better Stack Uptime heartbeat: watches a cron job or background service. |
Incidents.HeartbeatGroup |
Resource | A Better Stack Uptime heartbeat group: organizes related heartbeats, and pauses or resumes all of them at once with paused. |
Incidents.IncomingEmailIntegration |
Resource | An e-mail address that opens incidents from the e-mails it receives. |
Incidents.IncomingWebhookIntegration |
Resource | A webhook URL that opens incidents from the requests it receives. |
Incidents.JiraIntegration |
Resource | A Jira integration creates Jira issues for your incidents and keeps them in sync. |
Incidents.LinearIntegration |
Resource | A Linear integration creates Linear issues for your incidents. |
Incidents.Metadata |
Resource | A Better Stack metadata entry: a key with one or more values attached to a monitor, heartbeat, incident or integration (ownerType + ownerId), such as the team that owns it. |
Incidents.Monitor |
Resource | A Better Stack Uptime monitor: checks a URL, host or port on a schedule and opens an incident when it fails. |
Incidents.MonitorGroup |
Resource | A Better Stack Uptime monitor group: organizes related monitors, and pauses or resumes all of them at once with paused. |
Incidents.NewRelicIntegration |
Resource | Receives alerts from New Relic and opens Better Stack incidents. |
Incidents.OnCallRotation |
Resource | A Better Stack on-call rotation: puts the users of an OnCallSchedule on call in turns, with shifts of rotationLength rotationIntervals (hours, days or weeks) starting at startRotationsAt, optionall… |
Incidents.OnCallSchedule |
Resource | A Better Stack on-call schedule: says who on the team is on call and when. |
Incidents.OutgoingEmailIntegration |
Resource | Sends e-mails about your incidents to addresses outside Better Stack, such as a customer’s distribution list. |
Incidents.OutgoingPagerDutyIntegration |
Resource | Forwards Better Stack incidents to a PagerDuty service. |
Incidents.OutgoingWebhookIntegration |
Resource | An outgoing webhook integration sends a request to your url when an incident (triggerType: “incident_change”), an on-call shift (on_call_change) or a monitor (monitor_change) changes. |
Incidents.PrometheusIntegration |
Resource | A Prometheus integration turns alerts from Prometheus Alertmanager into Better Stack incidents. |
Incidents.Reference |
Reference data | Better Stack Incidents reference data: the addresses uptime monitors probe from (to allowlist in firewalls), the Slack channels connected to a team, and the state of an integration sign-in. |
Incidents.ReportHeartbeat |
Binding | Report a job’s result on an Heartbeat with its exit code and output (<url>/<exit code>), like curl -d “$output” “$URL/$?” at the end of a cron script. |
Incidents.ReportHeartbeatHttp |
Layer | The HTTP implementation of ReportHeartbeat (POST <heartbeat url>/<exit code>). |
Incidents.ResolveIncident |
Binding | Resolve an ongoing incident from running code (resolve_incident) — for example when the job that opened it recovers. |
Incidents.ResolveIncidentHttp |
Layer | The HTTP implementation of ResolveIncident (Incidents.resolveIncident with the API token you pass). |
Incidents.SendHeartbeat |
Binding | Ping an Heartbeat from running code: “the job ran”. |
Incidents.SendHeartbeatHttp |
Layer | The HTTP implementation of SendHeartbeat (GET <heartbeat url>). |
Incidents.Severity |
Resource | A Better Stack severity: a named alerting level, such as low or high, that sets how people are alerted (phone call, SMS, e-mail, push, critical alert) when an EscalationPolicy step uses it through … |
Incidents.SeverityGroup |
Resource | A Better Stack severity group: keeps related Severity levels together. |
Incidents.SplunkOnCallIntegration |
Resource | Sends your incidents to Splunk On-Call (formerly VictorOps). |
Incidents.StatusPage |
Resource | A Better Stack status page: a public or private page that shows your users the health of your services, with incident history, maintenance and subscriptions. |
Incidents.StatusPageGroup |
Resource | A Better Stack status page group: keeps related StatusPage pages together. |
Incidents.StatusPageResource |
Resource | An item shown on a Better Stack StatusPage: a Monitor, Heartbeat, MonitorGroup or HeartbeatGroup (by resourceType + resourceId), an integration, a logs chart, a catalog reference, or a manually tra… |
Incidents.StatusPageSection |
Resource | A section of a Better Stack StatusPage: a titled block that groups the StatusPageResources shown on the page (a “Website” section, an “API” section, …). |
Incidents.StatusPageSubscriber |
Resource | An e-mail address subscribed to a Better Stack StatusPage’s updates: for the whole page, or only for some of its StatusPageResources (statusPageResourceIds). |
Telemetry
Section titled “Telemetry”| Symbol | Kind | What it is |
|---|---|---|
Telemetry.Alert |
Resource | An alert on a DashboardChart (dashboardId + chartId) or a saved Exploration (explorationId) — exactly one of the two — that starts an incident when its condition holds: a threshold on the value, a … |
Telemetry.AwsLogGroupSubscription |
Resource | An override that subscribes a CloudWatch log group to an aws Source, or keeps it unsubscribed (subscribed: false) even when the source subscribes new log groups automatically, before the source has… |
Telemetry.Collector |
Resource | A Better Stack Collector: the agent you run on a host (docker), a Docker Swarm (swarm) or a Kubernetes cluster (kubernetes) that collects logs, metrics and traces — with eBPF when enabled — and sen… |
Telemetry.CollectorTarget |
Resource | A database or process a Collector scrapes for metrics: Postgres, PgBouncer, MySQL, Redis, MongoDB, Memcached, Elasticsearch, nginx, Apache, Kafka, Traefik or a Prometheus endpoint (kind). |
Telemetry.Connection |
Resource | A connection for querying ingested data directly: ClickHouse over HTTP (clientType: “clickhouse”, reaching every cluster its teams store data on unless cluster names one), or a Grafana data source … |
Telemetry.Dashboard |
Resource | A dashboard of charts over logs, metrics and traces. |
Telemetry.DashboardChart |
Resource | A chart on a Dashboard, backed by one or more queries. |
Telemetry.DashboardGroup |
Resource | A group that organizes related dashboards together in the web app. |
Telemetry.DashboardSection |
Resource | A full-width section divider that groups the charts below it on a Dashboard, optionally collapsed. |
Telemetry.Exploration |
Resource | A saved exploration: one chart with its queries and variables over logs, metrics or traces, kept in Explore (and in an ExplorationGroup through explorationGroupId). |
Telemetry.ExplorationGroup |
Resource | A group that organizes related saved explorations together. |
Telemetry.Export |
Layer | Export a host’s OpenTelemetry (spans, logs, metrics) to a Better Stack source. |
Telemetry.ExtractedMetric |
Resource | A rule that extracts a metric, or a label, from a Source’s logs: sqlExpression is evaluated for each log line (fields are in the raw JSON column, read with JSONExtract(raw, …, ‘Nullable(Type)’)), a… |
Telemetry.IngestLogs |
Binding | Ship log events from running code into a Source. |
Telemetry.IngestLogsHttp |
Layer | The HTTP implementation of IngestLogs (Ingest.ingestLogs with the source’s own token). |
Telemetry.IngestMetrics |
Binding | Push metrics from running code into a metrics Source. |
Telemetry.IngestMetricsHttp |
Layer | The HTTP implementation of IngestMetrics (Ingest.ingestMetrics with the source’s own token). |
Telemetry.otlpLayer |
Layer | A plain Effect OTLP layer that sends the spans, logs and metrics of the Effect it is provided to into a source: the stack’s OWN telemetry (provide it to the stack program and the deploy’s spans — e… |
Telemetry.otlpLayerFromEnv |
Layer | otlpLayer from the environment: BETTERSTACK_SOURCE_TOKEN and BETTERSTACK_INGESTING_HOST (the variables sdk’s IngestCredentialsFromEnv reads), optionally OTEL_SERVICE_NAME. |
Telemetry.Query |
Binding | Query a Source’s data from running code with the Query API (Telemetry.query): SELECT dt, raw FROM {{source}} WHERE … over a time window, the rows back as JSON. |
Telemetry.QueryHttp |
Layer | The HTTP implementation of Query (Telemetry.query with the API token you pass). |
Telemetry.Reference |
Reference data | Better Stack Telemetry reference data: the data regions a source can store its data in, the dashboard templates a dashboard can start from, the Google Cloud metrics a GCP source can collect, and th… |
Telemetry.ShipLogs |
Layer | Ship the host’s own Effect logs (Effect.log, Effect.logError, …) into a Source, in bounded batches, next to the console output. |
Telemetry.Source |
Resource | A telemetry source: a stream of logs, metrics or traces ingested into Better Stack. |
Telemetry.SourceAwsAccount |
Resource | The AWS account connected to an aws Source, through the IAM role from Better Stack’s CloudFormation stack (awsRoleArn + awsExternalId), or by reusing an account another aws source connected (awsAcc… |
Telemetry.SourceGcpProject |
Resource | The GCP project connected to a gcp Source, through Workload Identity Federation from the Better Stack GCP module (gcpProjectId + gcpProjectNumber), or by reusing a project another gcp source connec… |
Telemetry.SourceGroup |
Resource | A group that organizes related telemetry sources together. |
Errors
Section titled “Errors”| Symbol | Kind | What it is |
|---|---|---|
Errors.Application |
Resource | A Better Stack error-tracking application: collects the exceptions, releases and web events of one service. |
Errors.ApplicationGroup |
Resource | A Better Stack error-tracking application group: organizes related Applications together. |
Errors.Dsn |
Binding | Hand a host the Sentry DSN of an Application, so a Sentry SDK in that host reports its exceptions to Better Stack error tracking. |
Errors.DsnLive |
Layer | The implementation of Dsn: binds the DSN into the host’s env and reads it back. |
Errors.JiraIntegration |
Resource | An Error tracking Jira integration: which errors are filed as Jira work items, in which Jira space, and with which work type and fields. |
Errors.LinearIntegration |
Resource | An Error tracking Linear integration: which errors are filed as Linear issues, with which issue properties, and how errors and issues are kept in sync. |
Errors.MicrosoftTeamsIntegration |
Resource | An Error tracking Microsoft Teams integration: which errors reach which channels of the team the Better Stack app was added to. |
Errors.Reference |
Reference data | Better Stack Errors reference data: the data regions an application can store its data in, the GitHub accounts connected for code links and pull requests, the fields an application’s data has carri… |
Errors.RegisterRelease |
Binding | Register a release of an Application (create_release), so error tracking can tell which version introduced or fixed an exception. |
Errors.RegisterReleaseHttp |
Layer | The HTTP implementation of RegisterRelease (Errors.createRelease with the API token you pass, on the bound application only). |
Errors.Release |
Resource | A release of an error-tracking Application: registers a version (and the environments it was deployed to) so it appears the moment it deploys, before the first event that carries it, and errors can… |
Errors.SlackIntegration |
Resource | An Error tracking Slack integration: the Slack channel that gets error notifications, which errors reach it and how updates are posted. |
| Symbol | Kind | What it is |
|---|---|---|
Cloud.Certificate |
Resource | A TLS certificate for the https services of Better Stack Cloud load balancers (a load balancer service’s certificateIds). |
Cloud.ClickHouse |
Resource | A managed ClickHouse instance. |
Cloud.ClickHouseScheduledSnapshot |
Resource | A schedule that creates snapshots of a ClickHouse instance at a regular interval: hourly, daily, weekly or monthly. |
Cloud.ClickHouseSnapshot |
Resource | An on-demand snapshot of a managed ClickHouse instance: “The snapshot holds the data inserted before it, except rows still in Buffer tables.” The deploy waits until the snapshot is available (a fai… |
Cloud.Firewall |
Resource | A Better Stack Cloud firewall: a named set of inbound and outbound rules that you attach to servers. |
Cloud.FirewallRule |
Resource | One rule of a Better Stack Cloud Firewall: a direction, a protocol, the addresses it applies to (CIDR) and a port range. |
Cloud.Kafka |
Resource | A managed Kafka cluster in KRaft mode, with one or three equal brokers. |
Cloud.KafkaTopic |
Resource | A topic on a managed Kafka cluster. |
Cloud.KafkaUser |
Resource | A user of a managed Kafka cluster that clients sign in as with SCRAM (SASL_SSL, SCRAM-SHA-512), with the topics it can use. |
Cloud.KubernetesCluster |
Resource | A managed Kubernetes cluster: a control plane on a single server, and groups of workers added with KubernetesNodePool. |
Cloud.KubernetesNodePool |
Resource | A group of workers in a KubernetesCluster, all of one server type (Cloud.listServerType lists them; pick at least 4 vCPU and 4 GB, since Kubernetes itself takes some of every node). |
Cloud.KubernetesScheduledSnapshot |
Resource | A schedule that creates snapshots of a KubernetesCluster’s control plane: hourly, daily, weekly or monthly (a monthly schedule runs on the same day each month). |
Cloud.LoadBalancer |
Resource | A Better Stack Cloud load balancer: spreads TCP, UDP, HTTP and HTTPS traffic over your servers. |
Cloud.LoadBalancerService |
Resource | A service of a Better Stack Cloud LoadBalancer: it listens on one port (listenPort) for tcp, udp, http or https traffic and forwards it to destinationPort on the load balancer’s healthy targets. |
Cloud.LoadBalancerTarget |
Resource | A target of a Better Stack Cloud LoadBalancer: one server, or every server whose metadata matches a label selector. |
Cloud.MountVolume |
Binding | Mount a Better Stack Cloud volume into a Cloud.Service, the port of @alchemy.run/hetzner’s MountVolume. |
Cloud.MySQL |
Resource | A managed MySQL instance on Better Stack Cloud, with a primary and up to two read replicas that copy it asynchronously. |
Cloud.MySQLScheduledSnapshot |
Resource | A schedule that snapshots a managed MySQL instance at a regular interval. |
Cloud.MySQLSnapshot |
Resource | An on-demand snapshot of a managed MySQL instance: “We flush MySQL’s data to disk first, so the snapshot is consistent.” The deploy waits until the snapshot is available (a failed one fails with Wa… |
Cloud.Network |
Resource | A Better Stack Cloud private network. |
Cloud.ObjectCache |
Resource | A Better Stack Cloud object cache: an S3-compatible cache in front of buckets at another storage provider (AWS S3, R2, …). |
Cloud.ObjectCacheBucket |
Resource | A bucket a Better Stack Cloud ObjectCache serves. |
Cloud.Otlp |
Resource | A Better Stack Cloud OTLP metrics export: every minute, it sends the metrics of the team’s servers in this zone to your OpenTelemetry (OTLP over HTTP) receiver, at endpoint + /v1/metrics. |
Cloud.PlacementGroup |
Resource | A Better Stack Cloud placement group: decides how its servers are placed on physical hosts. |
Cloud.Postgres |
Resource | A managed PostgreSQL instance on Better Stack Cloud, with PgBouncer for connection pooling and up to two read replicas. |
Cloud.PostgresDatabase |
Resource | A database inside a managed Postgres instance. |
Cloud.PostgresScheduledSnapshot |
Resource | A schedule that snapshots a managed Postgres instance at a regular interval. |
Cloud.PostgresSnapshot |
Resource | An on-demand snapshot of a managed Postgres instance: “We flush the primary’s data to disk first, so the snapshot is consistent.” The deploy waits until the snapshot is available (a failed one fail… |
Cloud.PostgresUser |
Resource | A SQL user of a managed Postgres instance, with its access level on each database. |
Cloud.Reference |
Reference data | Better Stack Cloud reference data: what you can order in a zone (server types and their availability, images, managed-database plans and engine versions, Kubernetes versions, load balancer and obje… |
Cloud.ReservedIp |
Resource | A Better Stack Cloud reserved IP: a public IPv4 or IPv6 address that belongs to the team rather than to a server (Hetzner’s floating/primary IP). |
Cloud.ScheduledSnapshot |
Resource | A schedule that snapshots a server’s disk hourly, daily, weekly or monthly (about one interval after the previous snapshot, not at a fixed time). |
Cloud.ScheduledVolumeSnapshot |
Resource | A schedule that snapshots a volume hourly, daily, weekly or monthly. |
Cloud.Server |
Resource | A Better Stack Cloud server: a virtual machine running Ubuntu, with NVMe storage, public IPv4 and IPv6, private networks and a firewall, billed hourly up to a monthly cap. |
Cloud.ServerPool |
Resource | A server pool keeps warm servers of one type booted and waiting, so a claim gets a running server in under a second. |
Cloud.ServerPrivateIp |
Resource | A fixed private IP of a server in one of its private networks. |
Cloud.Service |
Resource | Your own code on a Better Stack Cloud server: an Effect program Alchemy bundles with Rolldown, copies over SSH to a Server, and runs as a systemd unit with Restart=always. |
Cloud.Snapshot |
Resource | An on-demand snapshot of a Server’s own disk: “The server keeps running, and its disk can be slower while we copy it.” Attached volumes aren’t included (see VolumeSnapshot). |
Cloud.Ssh |
Binding | SSH exec/scp against a Cloud.Server. |
Cloud.SshKey |
Resource | An SSH key for the root user of Better Stack Cloud servers. |
Cloud.Valkey |
Resource | A managed Valkey (Redis-compatible) instance on Better Stack Cloud, with one primary and up to two replicas. |
Cloud.ValkeyScheduledSnapshot |
Resource | A schedule that snapshots a managed Valkey instance at a regular interval, always from the instance’s current primary. |
Cloud.ValkeySnapshot |
Resource | An on-demand snapshot of a managed Valkey instance, taken from its current primary (“Valkey saves its data to disk first”). |
Cloud.Volume |
Resource | An NVMe block volume, attached to one server at a time, from 1 to 3072 GiB, billed per allocated GiB whether attached or not. |
Cloud.VolumeSnapshot |
Resource | An on-demand snapshot of a Volume: “a point-in-time copy of a volume, stored encrypted off the machine the volume runs on. |
Cloud.Webhook |
Resource | A Better Stack Cloud webhook: an HTTPS endpoint that receives a signed JSON event (object, event, occurred_at, data) whenever a resource of the listed webhookTypes is created, updated or destroyed … |
Cloud.Website.Astro |
Composite | Deploy an Astro application to a Better Stack Cloud server: the Node adapter bundle as a systemd unit on port 3000, static assets baked into the unit. |
Cloud.Website.Foldkit |
Composite | Deploy a Foldkit application to Better Stack Cloud. |
Cloud.Website.Nextjs |
Composite | Deploy a Next.js application to a Better Stack Cloud server: next build then a long-running next({ dev: false }) systemd unit on port 3000. |
Cloud.Website.Nuxt |
Composite | Deploy a Nuxt application to a Better Stack Cloud server: the nitro Node server as a systemd unit on port 3000, static assets baked into the unit. |
Cloud.Website.Octane |
Composite | Deploy an OctaneJS application to a Better Stack Cloud server: Octane’s SSR server as a systemd unit on port 3000, static assets baked into the unit. |
Cloud.Website.ReactRouter |
Composite | Deploy a React Router v7 app (framework mode) to a Better Stack Cloud server: the SSR server as a systemd unit on port 3000, static assets baked into the unit. |
Cloud.Website.SolidStart |
Composite | Deploy a SolidStart application to a Better Stack Cloud server: the SSR server as a systemd unit on port 3000, static assets (prerendered pages included) baked into the unit. |
Cloud.Website.StaticSite |
Resource | A static site on Better Stack Cloud: a build command’s output directory served by a small generated Node server (GET assets with their content type, cache-control: no-cache, GET /health, optional S… |
Cloud.Website.SvelteKit |
Composite | Deploy a SvelteKit application to a Better Stack Cloud server: kit’s SSR server as a systemd unit on port 3000, static assets (prerendered pages included) baked into the unit. |
Cloud.Website.TanStackStart |
Composite | Deploy a TanStack Start application to a Better Stack Cloud server: the SSR server as a systemd unit on port 3000, static assets baked into the unit. |
Cloud.Website.Vinext |
Composite | Deploy a vinext application to a Better Stack Cloud server: vinext’s Vite build then a long-running startProdServer systemd unit on port 3000. |
Cloud.Website.Vite |
Composite | Deploy a plain Vite application to a Better Stack Cloud server: vite build output served by a static-file systemd unit on port 3000. |
Cloud.Website.Vocs |
Composite | Deploy a Vocs documentation project to a Better Stack Cloud server. |
Cloud.Website.Waku |
Composite | Deploy a Waku application to a Better Stack Cloud server: the RSC server as a systemd unit on port 3000, static assets (SSG pages included) baked into the unit. |
Account
Section titled “Account”| Symbol | Kind | What it is |
|---|---|---|
Account.Reference |
Reference data | Better Stack account reference data: the roles a team member can have and the teams your token can reach. |
Account.Team |
Resource | A team in the organization. |
Account.TeamMember |
Resource | A member of a team, or a pending invitation to join it, with the member’s role (or the role the invitation gives). |