Reading API /api/v1/logs with a stable cursor, and API tokens
GET /api/v1/logs?query=<LogsQL>&since=<cursor|time|duration>&limit=<n> returns the logs after a cursor, oldest first, with next_cursor and has_more. The cursor is a position on _time (the reception time) plus the number of rows already returned among those sharing that exact time, ordered by a hash of their content, so following the cursors gives every row once even within groups cut by a page. Rows count once older than the lag (30 s), and nothing is returned while the disk spool still holds logs. API tokens (Settings > API) give read-only access to /api/v1/ as "Authorization: Bearer lst_...", in every auth mode; only their SHA-256 is kept in /data/api_tokens.json. README (EN/FR) documents the route and an n8n workflow keeping the cursor in $getWorkflowStaticData. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d61384ed2c
commit
c8f45044a3
12 files changed
+1327
-7
No files matched your search
@@ -912,3 +912,25 @@ body.login-page {
|
||||
.login-card input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
|
||||
.login-card .btn.primary { height: 38px; justify-content: center; margin-top: 6px; font-size: 14px; }
|
||||
.login-err { margin: 0; color: var(--sev-err); font-size: 13px; }
|
||||
|
||||
/* API tokens (Settings > API) */
|
||||
.token-list { display: flex; flex-direction: column; gap: 4px; margin: 12px 0 10px; }
|
||||
.token-row {
|
||||
display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center;
|
||||
padding: 8px 10px; border-radius: 8px; background: var(--panel-2); font-size: 12.5px;
|
||||
}
|
||||
.token-row b { font-weight: 600; overflow-wrap: anywhere; }
|
||||
.token-row code { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
|
||||
.token-row .muted { grid-column: 1; font-size: 11.5px; }
|
||||
.token-row .btn { grid-row: 1 / span 2; grid-column: 2; height: 28px; font-size: 12px; }
|
||||
.token-empty { color: var(--muted); font-size: 12.5px; }
|
||||
.token-form { display: flex; gap: 10px; align-items: center; }
|
||||
.token-form .btn { height: 28px; font-size: 12px; }
|
||||
.token-new { margin-top: 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent-soft); }
|
||||
.token-secret { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
|
||||
.token-secret code { flex: 1; min-width: 0; font: 12px var(--mono); overflow-wrap: anywhere; user-select: all; }
|
||||
.token-secret .btn { height: 28px; font-size: 12px; }
|
||||
.token-example {
|
||||
margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--panel-2);
|
||||
font: 12px var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
|
||||
}
|
||||
Reference in new issue
Block a user