Sources

Signing in and requests

How a secret reaches the service, single and named requests, answer formats, requests from a list, and dates that move with the calendar.

Signing in

auth says how the secret reaches the service. It applies to every request the source makes and to its buttons, except a request that reads a public address.

authSends
omitted, or { "type": "bearer" }Authorization: Bearer <secret>. Most API keys and tokens: Tessie, Home Assistant, GitHub.
{ "type": "header", "name": "X-Api-Key" }The secret in that header.
{ "type": "header", "name": "Authorization", "value": "MediaBrowser Token=\"{secret}\"" }That header, with the secret where {secret} is. For services that want words around the key, such as Jellyfin and Emby.
{ "type": "query", "name": "apikey" }The secret as ?apikey=… on each request.
{ "type": "basic" }HTTP Basic. A secret of user:password is sent as is; one without a : is sent as the password with no user name, which is how Uptime Kuma takes API keys.
{ "type": "login", … }Signs in with a request first, keeps the token it gets back, and sends that instead. See below.
{ "type": "oauth_client", "token_url": "/oauth/token" }Signs in as an OAuth client, trading its ID and secret for a short-lived access token, and sends the token as Authorization: Bearer. See OAuth clients.
{ "type": "none" }Nothing.

A header's value holds {secret} exactly once and nothing else in braces, in at most 200 characters. The secret in Settings → Secrets is just the key; the page holds only the words around it:

json
"auth": { "type": "header", "name": "Authorization", "value": "MediaBrowser Token=\"{secret}\"" }

It goes wherever the source's sign-in does: every request, its buttons, following a task, and images on its rows. Preview Source shows it as Sends Authorization: MediaBrowser Token="…". A secret with a line break is never sent. If a service echoes the secret back in an answer or an error, Legato replaces it with "…" before a card, History or Preview Source sees it (for secrets of 6 characters or more, so a short one can't blank ordinary words).

A login describes the sign-in request, where the token is in its answer, and how to send the token. This auth field is a fragment to place inside a named source:

json
"auth": {
  "type": "login",
  "request": { "method": "POST", "path": "/api/auth", "body": { "password": "{secret}" } },
  "token": "session.sid",
  "send": { "header": "X-FTL-SID" },
  "logout": { "method": "DELETE", "path": "/api/auth" }
}
  • {secret} in the request's body or headers is replaced with the secret.
  • send is { "header": name }, { "query": name } or { "bearer": true } (the default).
  • Legato keeps the token until a request is refused with HTTP 401, then signs in once more. A fetch and a button press at the same moment share one sign-in.
  • Login requires a nonempty token at the declared path; a missing token is an error. For a passwordless service, use { "type": "none" } instead of a login.
  • logout (optional) signs the session out: when Legato quits, and when the credential for the same named secret changes and an old session is replaced. Different secret names keep separate sessions, even on the same service. It's a path or { method, path, headers, body }, DELETE by default, and carries the token the way send says. Give it for services that limit how many sessions are open at once, such as Pi-hole, or every launch leaves one behind until it expires. Updating logout applies to an existing session on the next fetch; if pages sharing the same sign-in and secret name disagree, the most recently used recipe supplies the logout policy. Quit cleanup includes sign-ins still finishing, but a crash or an unresponsive service can leave a session until the service expires it.

OAuth clients

Some services, Tailscale among them, let you make an OAuth client for an app like Legato. A client has an ID and a secret that last until you revoke them, so you don't have to swap in a new key every few months. Legato trades the two for an access token (OAuth's client credentials grant) and sends that token with every request:

json
"secret": "tailscale-client",
"auth": { "type": "oauth_client", "token_url": "/api/v2/oauth/token" }
  • Save the client in Settings → Secrets as client-id:client-secret, the ID and the secret joined by a colon. Legato splits it at the first colon, so the secret itself may hold colons but the ID can't. From 1Password, the ID and the secret can come from two fields.
  • token_url is the service's token endpoint: a path on the source's address, after any base, or a full URL on that same address. A token endpoint on another host isn't supported.
  • scope (optional) is the scopes to ask for, separated by spaces, such as "devices:core:read". Leave it out to get what the client was given.
  • client_auth (optional) is "body", the default, which sends the ID and secret in the form, or "basic", which sends them as HTTP Basic for services that want it that way.
  • The token stays in memory only: never on disk, in History or in Preview Source. Legato gets a new one shortly before it runs out (going by the expires_in the service gives) and when a request is refused with HTTP 401. It drops the token when the secret changes and when Legato quits. A fetch and a button press at the same moment share one token.
  • If the service turns the client down, the card says so. It shows OAuth's error code when the service sends one, as in "refused the OAuth client (invalid_client)", and the HTTP status when it doesn't, as in "api.tailscale.com refused the OAuth client (HTTP 401)". A 403 on a request means the client's scopes don't cover it.

Connections

Some services let Legato sign in through your browser, so there's no token to copy. Todoist is the first. In Settings → Secrets, a secret for one of these services offers Connect. Legato opens the service's sign-in page in your browser, you sign in and allow access, and Legato saves the connection under the secret's name. A template for the service offers Connect in its Sign in step too.

json
"url": "https://api.todoist.com/api/v1",
"secret": "todoist"
  • A page names a connection as it names any secret, with the default bearer auth, so the same page works with a connection or a pasted token.
  • Legato keeps the connection in this Mac's Keychain and gets a fresh access token from the service shortly before the old one runs out.
  • The token goes only to the service's API host (api.todoist.com), over HTTPS, as a Bearer token. A source that would send it another way or to another address fails and says why. A host list can't use a connection.
  • Each Mac connects on its own. A connection can't come from 1Password and has no expiry date.
  • When the service no longer accepts the connection, Settings → Secrets shows it as needing attention, and Connect Again signs in once more.
  • Disconnect, in the secret's menu, signs Legato out of the service and deletes the connection from this Mac. You can also remove Legato in the service's own settings.

Requests and formats

A source makes one request to its url, or several named ones. These fields are a source fragment:

json
"url": "http://pi.hole",
"requests": {
  "summary": "/api/stats/summary",
  "blocking": "/api/dns/blocking",
  "top_blocked": "/api/stats/top_domains?blocked=true&count=10"
}

The answer is then { "summary": …, "blocking": …, "top_blocked": … }, one key per request, so paths in map start with the request's name: summary.queries.total. Each request is a path on the source's origin, or an object with path, method, body, headers and format. It cannot change the source's scheme, host or port, except to read a public address. Request-specific headers override common source headers.

format says how to read an answer:

formatReads
json (the default)JSON. An answer that's JSON inside a string, such as a rendered template, is read as the JSON inside.
textThe text, as one string.
feedAn RSS, Atom or JSON feed, as { "title", "url", "count", "items" }; see A feed.
prometheusPrometheus metrics text, as a list of { "name", "labels", "value" }.
docker-logsDocker log frames or plain TTY text, as { "lines": [{ "stream": "stdout", "time": "2026-11-09T12:00:00Z", "text": "Ready" }], "count": 1 }.

For Docker logs, request /containers/{id}/logs?stdout=1&stderr=1&tail=20&timestamps=1 with "format": "docker-logs". Lines stay in response order, newest last. Each line names stdout or stderr. Plain TTY text uses stdout. time is present only when the line starts with an RFC 3339 timestamp. ANSI colour codes and trailing newlines are removed. Invalid UTF-8 is replaced. The answer keeps the last 200 lines and cuts each text to 500 characters. An invalid or truncated frame makes the response read as plain text.

Requests from a list

A watchlist is the person's own, so its symbols go in a list in Settings → Lists, where a page file can't carry them, and a named request sends them. each_entry sends the request once for each entry of the list, with {entry} in its path filled in:

json
"url": "https://finnhub.io",
"secret": "finnhub",
"auth": { "type": "header", "name": "X-Finnhub-Token" },
"requests": {
  "quotes": { "path": "/api/v1/quote?symbol={entry}", "each_entry": { "list": "stock-watchlist", "max": 30 } }
}

The answer at quotes has one row per entry, in the list's order:

json
"quotes": [
  { "entry": "NRWD", "answer": { "c": 184.62, "dp": 2.32 } },
  { "entry": "ZZZZ", "error": "finnhub.io answered HTTP 404" }
]

A card maps the rows with each, reading entry and answer: { "each": "quotes", "where": { "path": "answer", "exists": true }, "fields": { "text": "entry", "detail": { "template": "{answer.c}" } } }.

  • list names the list. max is how many entries are sent: the first ones in the list that can be sent, 1 to 50, 20 if you leave it out. Entries after that get a row saying "Not sent: this page sends the first 30 entries".
  • Each entry is checked first, as a page param is: 1 to 64 of A–Z, a–z, 0–9, ., _, ~ and -, and never . or ... With "type": "text", an entry can be a short name of up to 40 letters, digits, spaces and . , ' - ( ) & instead. pattern is a regular expression the whole entry must also match. An entry that doesn't pass is never sent, and its row says so.
  • The entry is encoded and goes only in the path or query, never the host, a header or a body. A request with each_entry is a GET.
  • An entry listed twice is sent once.
  • Each entry's answer can be up to 256 KB. A list of more than 200 entries fails the request instead of making a row for each.
  • Each each_entry request has at most 4 entries out at a time, and requests to one service with one secret leave at least 0.1 seconds apart, so 30 entries take about 3 seconds.
  • If one entry fails, only its row has an error. The whole source fails, and cards keep their last answer with a note, when the service refuses the secret (HTTP 401), asks Legato to wait (HTTP 429, or quota headers), can't be reached, has a certificate to review, or fails every entry.
  • While the list is missing or empty, nothing is sent, the answer is [], and cards using the source say "Add the list stock-watchlist in Settings → Lists".
  • A source makes at most 64 requests a fetch, counting each each_entry as its max: room for quotes and company profiles for 30 symbols, plus one more.
  • When the list changes, the source is read again right away. An answer that was on its way for the old list is dropped, and nothing from it is kept in History.

all_entries sends the request once, with every entry in place of {entries}, separated by commas:

json
"prices": { "path": "/api/v3/simple/price?ids={entries}&vs_currencies=usd", "all_entries": { "list": "coins", "max": 50 } }
  • Entries are checked and encoded as for each_entry. An entry with a comma in it can't be sent.
  • max is the most entries the list can hold: 1 to 100, 50 if you leave it out. With more, or with an entry that can't be sent, nothing is sent, and cards say which list to fix and which entry: "Entry 3 of the list coins can't be sent; check it in Settings → Lists".
  • While the list is missing or empty, nothing is sent and the answer is null.
  • The answer is the service's, as with any request.

Settings → Lists names the services a page sends each list to, and Details shows "Sends the list stock-watchlist" under the source. A template asks for the list with a list-name input that fills each_entry.list or all_entries.list, and a lists entry whose why says where its entries go.

To keep history for each entry, derive the rows that answered and collect them with "key": "{entry}". A detail page then reads one entry's samples with { "dataset": "stock-prices", "key": "{param.symbol}" }.

A request for each row

Some services list things by id and keep the names elsewhere. Seerr's waiting requests carry a TMDB id and whether it's a movie or a show, and each title is its own request. each_row sends a named request once for each row of another request's answer, with the row's fields in braces filling its path:

json
"url": "http://192.0.2.40:5055",
"secret": "seerr",
"auth": { "type": "header", "name": "X-Api-Key" },
"requests": {
  "pending": "/api/v1/request?filter=pending&take=20",
  "titles": { "path": "/api/v1/{media.mediaType}/{media.tmdbId}",
              "each_row": { "from": "pending.results", "key": "id", "max": 20,
                            "pick": ["title", "name", "releaseDate", "firstAirDate", "posterPath"], "keep": "6h" } }
}

The answer at titles has one row per row of pending.results, in the same order, each with the row's key:

json
"titles": [
  { "key": 41, "answer": { "title": "Saltmarsh", "releaseDate": "2024-03-08", "posterPath": "/s4ltm4rsh.jpg" } },
  { "key": 42, "error": "192.0.2.40 answered HTTP 404" }
]

A card joins the two with a lookup: "lookup": { "from": "titles", "by": "key", "on": "id", "as": "title" }, then reads title.answer.title.

  • from names another of the source's requests, then where its rows are in that answer (pending.results, or just pending when the answer is the list). An object there is one row: Gitea's repository answers at /repos/{owner}/{repo}, and "from": "repo" sends one request about its default branch, so a branch Legato can't send (release/2026) fails that row, not the source. It's sent after the source's other requests and reads that answer as it came, before derive. That request has to be an ordinary one answering JSON, a request with with, or a request for each row of an ordinary one (below). It can't read a list's entries or a public address, so a fetch is never more than three rounds.
  • Rows from a with request. Gitea's repository search narrows to the person's own repositories only with their numeric id, which /api/v1/user answers. "repos": { "path": "/api/v1/repos/search?uid={uid}&limit=25", "with": { "uid": "me.id" } } goes in the second round, and a request for each row with "from": "repos.data" goes in the third. Its rows are read as from an ordinary request, with no parent_key, and nothing can read its answers in turn.
  • Rows inside rows. A request for each row can read another one's answers, one level deep. UniFi's console lists its sites, each site's devices at /sites/{id}/devices, and each device's statistics at /sites/{site}/devices/{id}/statistics/latest. With "from": "devices.data", where devices is itself sent for each site, the rows are the devices inside every site's answer, in order. Each gets parent_key, the key of the site it came from, for its path: "path": "/sites/{parent_key}/devices/{id}/statistics/latest". A site whose request failed gives no devices. When the path after the name leads to one object rather than a list, that object is one row: Gitea's pull request answers at /pulls/{number}, so "from": "pulls" reads each one whole, and "path": "/repos/{base.repo.owner.login}/{base.repo.name}/commits/{head.sha}/status" asks for its head commit's checks. Past 200 rows in all, the first 200 are read, and as always only the first max are sent. A third request reading the second's rows isn't allowed.
  • key is the field that names each row, a string or a number. It comes back with each answer for the lookup. A row with no key, or with the same key as an earlier row, isn't sent, and its row has "key": null and an error.
  • Each {field} is a path in the row. Its value has to be a string or a whole number that would pass as a page param: 1 to 64 of A–Z, a–z, 0–9, ., _, ~ and -, never . or ... It's encoded as one segment and goes only in the path or query, on the source's own address: never a host, a header or a body. A request for each row is a GET. A row whose value can't be sent gets an error row.
  • max is how many rows are sent, the first that can be: 1 to 50, 20 if you leave it out. Rows after that say "Not sent: this page sends the first 20 rows".
  • pick names the top-level fields to keep from each answer. Seerr's movie answer runs to 40 KB of cast and trailers, and a title needs a few fields of it.
  • keep reuses an answer for that long before asking again, from 1m to 24h. Use it for answers that don't change, like a film's title, so a button's follow-up reads don't ask again for every row. Kept answers stay in memory, for that address and secret only. A failed answer is never kept.
  • Calls go as a list's do: 4 at a time, 0.1 seconds apart to one service, each answer up to 256 KB, and more than 200 rows fails the request. A row that fails, even every one of them, fails only its own row, since the rows' own request already reached the service. A refused secret, a request to wait or an unreachable host fails the source.
  • It counts as its max toward a source's 64 requests a fetch. It can't be used in a source with hosts.

A request with nothing there yet

Some services answer 404 for something that will exist later. changedetection.io's latest difference is 404 until a watch has changed once, and a source fails on a 404, so a watch that never changes would keep its page in error. Give that request missing, the statuses that mean nothing is there yet:

json
"requests": {
  "watch": "/api/v1/watch/{param.uuid}",
  "diff": { "path": "/api/v1/watch/{param.uuid}/difference/previous/latest", "format": "text", "missing": [404] }
}
  • An answer with one of those statuses leaves the request's name out of the source's answer, so test it with exists: false or give the card an empty. Any other failure fails the source as before.
  • missing is [404], [410] or both. It goes on one request to the service: not with each_row, each_entry, all_entries, follow or "auth": { "type": "none" }.

A request for detail the cards can do without takes "optional": true instead. changedetection.io's report of the week's changes adds a line to each watch, and a big install can take longer to answer it than Legato waits. When an optional request fails, for an error status, no answer in time or an answer too large, its name is left out and the other requests still fill the cards. An optional request that takes a value from another answer (with) and doesn't find it is left out too. A refused secret, a 403 or a request to wait still fails the source, since those are about the key or the whole service. It goes on the same kind of request as missing.

A value from another answer

Some requests need an id that another request answers. Cloudflare lists tunnels under an account, and the account's id comes back with the zones. with names the value and where it is in the other answer, and {name} in the path takes it:

json
"url": "https://api.cloudflare.com",
"secret": "cloudflare",
"requests": {
  "zones": "/client/v4/zones",
  "tunnels": { "path": "/client/v4/accounts/{account}/cfd_tunnel?is_deleted=false",
               "with": { "account": "zones.result[0].account.id" } }
}
  • Each value is another request's name, then where the value is in its answer: zones.result[0].account.id, or nodes[0].node when the answer is a list. The request goes after the source's other requests and reads that answer as it came, before derive.
  • That request has to be an ordinary one answering JSON. It can follow pages, but it can't have with, each_row, each_entry, all_entries or "auth": { "type": "none" } itself, so a request with with always goes in the round after the requests it reads.
  • A value can also be a list of up to 3 places, tried in order: the first that has a value is sent. Pi-hole's Queries page asks about the query a link picked, else the newest: "with": { "d": ["pick.queries[0].domain", "newest.queries[0].domain"] }.
  • with names 1 to 4 values. A name is a lowercase word, such as account or node_id, and can't be one Legato fills itself, like date or secret. Every name goes in the path or a body string, and every {word} in the path has to be one of them.
  • The value has to be a string or a whole number that would pass as a page param: 1 to 64 of A–Z, a–z, 0–9, ., _, ~ and -, never . or ... In the path it's encoded as one segment. In a JSON body string it goes in as it is, for a GraphQL query's variables: "body": { "query": "…", "variables": { "accountTag": "{account}" } }. Other braces in the body go out as written. A value never goes in a header or the host.
  • When the value is missing or can't be sent, this request isn't sent, and the source fails with a note that says where the value was looked for: "tunnels needs zones.result[0].account.id, which zones didn't answer". Cards keep their last answer, as for any failure.
  • A request with with can also follow pages. It can't send a list's entries or be sent for each row, and it can't be used in a source with hosts. It counts as one request toward the 64 a fetch, or as follow's max.

A public address beside the service

A source with a secret keeps its requests on its own address. A request can read a public address as well, with "auth": { "type": "none" } and a full https:// URL as its path. The Cloudflare source above can read GitHub's latest connector release, so a card can compare it with the version the tunnel runs:

json
"release": { "path": "https://api.github.com/repos/cloudflare/cloudflared/releases/latest", "auth": { "type": "none" }, "keep": "6h" }

A public API may limit how often a Mac without a key can ask, and a release changes far less often than a tunnel's state. keep makes Legato reuse the answer it last read for that long, from 1m to 24h, before asking that address again. The kept answer stays in memory, for that address only, and a request with a secret never gets it.

When the public address fails, the rest of the source still answers. That covers an error status, an unreachable host, an answer too large or one Legato can't read, and a request to wait. The request then gives its last good answer from the past day, or nothing, so release is missing and an exists test on it is false. Source Preview shows the answer it got, without the public host's error.

  • It's sent with none of the source's sign-in: no secret, no token from a login or an OAuth client, no secret in the query, and none of the source's headers or base.
  • Its own headers can hold fixed values, such as an Accept the service asks for. They can't be Authorization, Proxy-Authorization, Cookie or Host, and they can't have braces. {secret} can't go anywhere in it.
  • It's a GET of one answer, over https, with no login in the URL. It can't have method, body, with, each_row, each_entry, all_entries or follow, and other requests can't take values from its answer.
  • A redirect stays on that address. A refusal there (HTTP 401 or 403) is never taken as a refused secret. When that host asks Legato to wait, its public requests wait until then, in every source, and the service's own requests go on as before.
  • keep goes only on a request with "auth": { "type": "none" }. A request for each row takes its own keep in each_row.
  • Details and Source Preview list its host beside the service's.

A list across pages

Many APIs answer a long list a page at a time and say whether there's more. Stripe answers 100 payments at most, with "has_more": true when there are others, and the next page starts after the last one's id. follow asks again until the list ends, putting the next page's cursor in a query parameter, and joins the pages:

json
"url": "https://api.stripe.com",
"secret": "stripe",
"requests": {
  "moves": { "path": "/v1/balance_transactions?created[gte]={period.start_unix}&created[lt]={period.end_unix}&limit=100",
             "follow": { "items": "data", "while": "has_more", "param": "starting_after", "from_last": "id", "max": 10 } }
}

The answer at moves is the first page with every page's items at data, in order, and has_more from the last page read. So a period with more than 1,000 movements still says true, and a card can say it shows only part of them.

  • items is where each page's list is, and while the field that's true while there's another page. Both are fields of the answer, not inside a list.
  • Some services say there's more only by sending a cursor, and leave it out on the last page. UniFi's Site Manager answers nextToken until the list ends. Leave while out and give from, and the list goes on while that cursor is there: a page with no cursor, null or empty text is the last. Such a page may come back short, or even empty, with a cursor, and the next one is still read. "follow": { "items": "data", "param": "nextToken", "from": "nextToken", "max": 4 }
  • The cursor comes from from_last, a field of the page's last item (Stripe's id), or from from, a field of the page itself. Stripe's search answers next_page, sent back as page: "param": "page", "from": "next_page". With from, the joined answer takes that field from the last page too.
  • param gets the cursor, encoded once; an earlier value of it in the path is replaced, and every other parameter stays as written. A cursor is never read for {…} tokens.
  • max is how many pages are read at most, the first included: 1 to 20, 10 if you leave it out. It doesn't change how many items a page holds: that's the service's own parameter (limit=100).
  • The pages go one after another, 0.1 seconds apart. If any page fails, has no list, has no true or false at while, says there's more with an empty list (with while), or gives no cursor or one already read, the whole request fails. A card never shows totals from part of the pages, and keeps its last good answer as it does for any failure.
  • Other fields of the answer, such as a count or a page number, are the first page's. Legato doesn't drop repeats: when a service's pages repeat an item, as Stripe's search sometimes does, the joined list has it twice. Count from a list, not a search.
  • At most 10,000 items and 8 MB joined, besides each page's 1 MB. It's a GET answering JSON, and can't be combined with each_entry, all_entries or each_row; a request for each row may read a followed answer's rows. It counts as its max toward a source's 64 requests a fetch.

Several hosts from a list

Some services run the same API on many hosts: every vendor's status page answers at /api/v2/summary.json, and every Glances box at /api/4/. A source with hosts in place of url reads every host on a list in Settings → Lists, with the same requests, and gives one row for each:

json
"status": {
  "hosts": { "list": "status-pages", "max": 30 },
  "every": "2m",
  "requests": { "summary": "/api/v2/summary.json" },
  "derive": [ { "name": "name", "value": "summary.page.name" } ],
  "fail": { "when": { "path": "summary.page.id", "exists": false } }
}

Each entry on the list is an address: a host name, read over https (www.githubstatus.com), or an address with its scheme and port (https://status.example.com:8443, http://192.168.1.20:61208). The answer at hosts has a row for every entry, in the list's order:

json
"hosts": [
  { "entry": "www.githubstatus.com", "origin": "https://www.githubstatus.com", "key": "h3f9a2c1e07b4d55",
    "host": "www.githubstatus.com", "state": "answered", "answer": { "name": "GitHub" } },
  { "entry": "status.example.net", "origin": "https://status.example.net", "key": "h81d0e7b2c4a9f6e",
    "host": "status.example.net", "state": "failed", "fails": 2, "last_success": "2026-11-12T15:04:00Z",
    "answer": { "name": "Example" }, "error": "status.example.net didn't answer" }
]

A card maps the rows with each, reading each host's own answer under answer. A fleet from the rows:

json
{ "each": "hosts", "fields": {
  "name": { "if": { "path": "answer.name", "exists": true }, "then": { "template": "{answer.name|clip:24}" }, "else": { "template": "{host|clip:24}" } },
  "state": { "if": { "path": "state", "equals": "answered" }, "then": "answer.rating", "else": { "template": "unknown" } },
  "url": "origin" } }
  • Each host is a source of its own. It gets the requests, derive and fail as written, against that host. With derive, its row's answer holds only the values derive made, so derive what the cards need. Without derive, the row holds the whole answer, which for a status page's incident history can be 500 KB a host. A host that fails, or whose answer fail turns down, has state failed and an error; the others answer as usual. A fetch fails as a whole only when Legato is signing out or the read is cancelled.
  • A host that stops answering keeps its last answer (in memory: not after Legato restarts). Its row is failed, with the error, how many reads in a row it has failed (fails, which counts up to 10), when it last answered (last_success) and its last answer. The card's own rules decide what that means: { "path": "state", "equals": "answered" } greys a dot at once, and { "path": "fails", "gte": 3 } turns a server red after three missed reads, showing its last readings until then. An answered row has fails 0 and no last_success.
  • state is answered, failed, not_sent (an entry that isn't an address a host list reads, or one past max) or over_budget (a read that has already kept as much as it can). key is the same for the same address however it's written, and changes when the address does.
  • Addresses. https goes to a DNS name, an IPv4 address, a .local name or a single word, such as atlas. Plain http goes only to the last three, which macOS allows for local networks. An entry has no path, user or query, IPv6 addresses aren't read yet, and an address listed twice is read once. A certificate a server made for itself is trusted as for any source: at an IP address or a .local name, once you trust it. The check is of the address's shape: a name you add can still lead to a server on your own network.
  • Signing in. A host-list source may name a secret and an auth of basic, bearer, header or query (not a login or an OAuth client). Each host gets the secret saved under that name for its own address: save it once for each host in Settings → Secrets, as glances:password for basic sign-in. With "secret_optional": true, a host with none saved goes without signing in. Settings → Secrets lists a required secret once for each host, and an optional one not at all. A host that wants a password says so on its own row (HTTP 401). A secret goes only to the host it was saved for: on any of its ports, and over plain http when the entry is written that way. A host list has no headers of its own: each host gets the Accept and User-Agent: Legato headers every source sends, its secret, and cache validators for an answer it already gave. Every request is a GET to a path on the host, and a redirect stays on the same host.
  • Limits:
    • max is 1 to 30 hosts, read four at a time, with up to 6 requests each and 180 in all (max × requests). Requests from a list (each_entry, all_entries) can't go inside one.
    • Each host's answer can be up to 1 MB, and a read keeps up to 8 MB in all.
  • When every host fails, the rows still come back, each failed with its kept answer, so cards show each host as it stands. The source itself counts as answered, so it keeps reading at its own interval rather than backing off.
  • List changes. A list longer than 200 entries fails the source. When the list changes, the source is read again right away. While it's missing or empty, nothing is read, hosts is [], and cards say to add the list.
  • What it can't do:
    • title_from can't read a whole host list, which has no one name for the page.
    • A card reading a whole list can't have buttons: link each row to its host with url, or to a page for that host (below).
    • It can't collect.
    • {period.…} can't be used in it, and {param.…} only as only (below).
  • Settings → Lists says the page reads each entry as an address, and Details names the list.

A page for one host on the list

A row can open a page about that host alone. Give the page a param with list_key, naming the list, and a source with only:

json
"params": { "box": { "list_key": "glances-hosts", "example": "h0000000000000000" } },
"sources": { "glances": {
  "hosts": { "list": "glances-hosts", "only": "{param.box}" },
  "secret": "glances", "secret_optional": true, "auth": { "type": "basic" },
  "requests": { "system": "/api/4/system", "quicklook": "/api/4/quicklook" } } }

Link to it from a row with "url": { "template": "legato://page/glances-box?box={key}" }.

  • The source reads that one host, as an ordinary source on its address, with the secret saved for it. It answers as that source would, with no rows. Its buttons go to that host, title_from can read it, and two or three such sources on one page read the same host.
  • A key names one address. It's made from the address, so a link can never point the page at another host, and only a host the list holds is read. A key the list doesn't hold reads nothing, its buttons do nothing, and the cards say "This address isn't on the list glances-hosts". That includes an old link once the address is edited, which makes a new key.
  • No default yet: the page is opened from a row.

Several feeds from a list

A person's feeds are their own, so their addresses go in a list, not in the page. A source with feeds in place of url reads every feed address on the list, as RSS, Atom or JSON Feed, with no sign-in:

json
"feeds": {
  "feeds": { "list": "news-feeds", "max": 30 },
  "every": "30m"
}

The answer has a row for each entry under feeds, as a host list has under hosts, and every feed's posts together under items:

json
{ "feeds": [ { "entry": "https://example.com/feed.xml", "url": "https://example.com/feed.xml", "key": "h3f9a2c1e07b4d55", "host": "example.com",
               "state": "answered", "fails": 0, "answer": { "title": "Example Notes", "url": "https://example.com/", "count": 20, "items": [ … ] } } ],
  "items": [ { "title": "A post", "url": "https://example.com/a-post", "published": "2026-11-16T09:00:00Z", "author": "Riley",
               "feed": "Example Notes", "feed_key": "h3f9a2c1e07b4d55" } ],
  "count": 1 }
  • An entry is a whole feed address, with its path and query: https://example.com/blog/feed.xml?lang=en, or example.com/feed, which is read over https. The scheme and host are lowercased and a default port dropped; the rest is kept as written, so /feed and /feed/ are two feeds. Plain http goes only to an IP address, a .local name or a single word; a public http:// entry gets a row saying to use its https:// address. The same address listed twice is read once.
  • items is every feed's posts, newest first, up to 200, with feed (the feed's title, or its host when it has none) and feed_key (its row's key). A post with no date goes after the dated ones, and one dated in the future sorts as now. A row's answer keeps the feed's newest 50 posts without their summaries; a failed feed keeps its last ones, which stay in items.
  • A feed that fails is its own row's error, as a host is. A feed that asks for a password says so, and one that redirects to another address fails and says so: put the address it ends up at in the list.
  • A page for one feed takes a list_key param and "feeds": { "list": "news-feeds", "only": "{param.feed}" }, linked from a row with ?feed={key}. It answers as a feed does, summaries and all but with its posts newest first, so title_from can name the page after the feed.
  • What it can't do: a feed list has no requests, secret, headers or derive of its own, its cards have no buttons, title_from can't read a whole list, and it can't collect. max is 1 to 30 feeds, read four at a time, each answer up to 1 MB.

Dates in requests

A request can ask for a date range that moves with the calendar: this month's budget, the last 30 days. Put a {date.…} token in a request's path, in a single request's url (its path or query), in a body string or in a header, and Legato fills it in each time the request goes out, in the Mac's time zone:

json
"url": "https://api.lunchmoney.dev",
"requests": {
  "month": "/v2/summary?start_date={date.month_start}&end_date={date.month_end}"
}
TokenGives (on Sunday 25 Oct 2026)
{date.today}, {date.yesterday}, {date.tomorrow}2026-10-25, 2026-10-24, 2026-10-26
{date.week_start}, {date.week_end}The week's first and last days, as the Mac's calendar starts weeks: 2026-10-25, 2026-10-31
{date.month_start}, {date.month_end}2026-10-01, 2026-10-31
{date.last_month_start}, {date.last_month_end}2026-09-01, 2026-09-30
{date.year_start}, {date.year_end}2026-01-01, 2026-12-31
{date.days_ago_7}, {date.days_ago_30}, {date.days_ago_90}2026-10-18, 2026-09-25, 2026-07-27
{date.days_ahead_7}, {date.days_ahead_30}2026-11-01, 2026-11-24
{date.days_ahead_N}Any number from 0 to 3660 calendar days ahead. For a 30-day agenda including today, end at {date.days_ahead_29}.
{date.now}The moment, with its offset: 2026-10-25T11:30:00-05:00 (encoded in a URL)
{date.days_ago_N}Any number of days back, up to 3660: {date.days_ago_29} is 2026-09-26
{date.…_at}The moment a day starts, with its offset: {date.month_start_at} is 2026-10-01T00:00:00-05:00. For an end day it's the moment after it, so {date.month_end_at} is 2026-11-01T00:00:00-05:00, for APIs that take a range of moments with the end left out (Stripe's lt). {date.now} has none.
{date.hours_ago_N_at}The moment N hours ago (1 to 720), with its offset: {date.hours_ago_24_at} for the last day of readings.
{date.hour_back_N_at}The end of this hour, N hours back (0 to 9,000), on the hour: {date.hour_back_0_at} is the next hour's start, {date.hour_back_24_at} the same hour yesterday. {date.hour_back_N_first} and {date.hour_back_N_last} are the days a stretch that starts or ends there begins and ends on. A last_hours period uses these.
{date.…_unix}Any _at moment, and {date.now_unix} and {date.hours_ago_N_unix}, in Unix seconds instead: {date.month_start_unix} is 1790830800. For services that take those, such as Tessie's from and to.

Day tokens include their last day. A service that counts both ends counts {date.days_ago_30} to {date.today} as 31 days; for 30 days today included, start at {date.days_ago_29}.

On a page with a period, more tokens are the period chosen in its row: {period.start} and {period.end}, its first and last days; {period.through}, its last day so far, which is today while the period is still going and its last day once it's over; and {period.start_at}, {period.end_at} and {period.through_at}, the moments it starts and ends, with {period.start_unix}, {period.end_unix} and {period.through_unix} the same moments in Unix seconds. With "compare": "previous", {compare.start}, {compare.end}, {compare.start_at} and {compare.end_at} are the same stretch of the period before. They can all go wherever {date.…} tokens can:

json
"requests": {
  "spent": "/v2/summary?start_date={period.start}&end_date={period.end}"
}

Only these exact tokens are filled; other braces, such as a Home Assistant template's {{ … }} in a body, go out as written. A token Legato doesn't know fails the page when it loads. Dates can't go in the host, or in a login request.

With prometheus, group_by names a label to group by instead: one object per value of that label, holding its labels and each metric as a field. split_by lists labels that tell apart several samples of one metric; their values are added to the field's name. A response with no usable samples is an error. Uptime Kuma's /metrics with "group_by": "monitor_id", "split_by": ["window"] produces data like this example answer:

json
[ { "monitor_id": "1", "monitor_name": "Gitea", "monitor_type": "http",
    "monitor_status": 1, "monitor_response_time": 25,
    "monitor_uptime_ratio_1d": 0.9965, "monitor_uptime_ratio_30d": 1 } ]