Early accessBy invitation, and the SDKs aren't published yet.Ask for an invitation
Skip to Content
Docs

api and open

lyrelog api calls any dashboard API route with your sign-in; lyrelog open goes to the same page in the dashboard.

api

lyrelog api calls any route of the dashboard's API with your sign-in, like gh api. It's for anything the other commands don't wrap yet.

lyrelog api <method> <path>
  • The method is GET, POST, PUT, PATCH or DELETE.
  • The path may leave out /api: projects/{project} is /api/projects/{project}. Give the path only. The server comes from --url or LYRELOG_URL.
  • {project} becomes the current project's id (the default one, or -p).
lyrelog api GET /api/me
{"admin":false,"organizations":[{"id":4,"name":"Alex Rivera","role":"owner","plan":"free","plan_until":null}],"user":{"id":10,"email":"alex@example.com","name":"Alex Rivera"}}
lyrelog api GET projects/{project}/regions -F from=1763500000000
lyrelog api PATCH projects/{project} --data '{"retention_days":30}'
lyrelog api POST projects/{project}/views --data @view.json
FlagWhat
-F, --fieldkey=value. On a GET it's a query parameter; on POST, PUT and PATCH it's a field of the JSON body (numbers, true, false and null are sent as such). Repeat it for more.
-d, --dataThe request body as it is: JSON, @file to read a file, or @- for stdin. Not with -F.

The answer is printed as it comes. At a terminal, JSON is indented and coloured. An answer with no body prints its status ({"status":204} in JSON mode). A failure exits with the same exit codes as every command, with the error as JSON on stderr in JSON mode.

These are the routes the dashboard itself uses, and they aren't documented here. For a documented API to read events from scripts, use the Read API.

open

lyrelog open opens a page of the dashboard in your browser, on the current project.

lyrelog open errors
lyrelog open person gc-2e427d7b
lyrelog open settings --print
https://app.lyrelog.com/p/e8bc11c6e22f/settings
PageWhat
(none)The explorer
eventsThe explorer
errorsThe Errors page
sessionsSessions
peopleThe project's people
insightsInsights
releasesReleases
keysAPI keys
settingsProject settings
projectsAll projects
usageUsage and plan
accountYour account
organizationYour organization
person <id>One person's page
event <id>The explorer, searching for one event
FlagWhat
--printPrint the address instead of opening it

Over SSH, or when no browser can be opened, it prints the address. In JSON mode, for an agent or a script, it doesn't open anything: it prints {"url":"..."}.

On this page