|
421 | 421 | "get": { |
422 | 422 | "operationId": "getLogStats", |
423 | 423 | "summary": "Get Log Statistics", |
424 | | - "description": "Bucketed run counts, success rate, error count, and mean latency for a workspace and for each of its workflows — the aggregate a caller would otherwise have to page every run to compute. The window spans `startDate` through `endDate` when both are supplied; an omitted edge falls back to the oldest matching run on the left and to the later of the newest matching run and now on the right. With no matching runs the right edge falls back to now and the left to 24 hours before that right edge — the trailing 24 hours when neither edge was supplied, and the 24 hours preceding `endDate` when only `endDate` was supplied. A supplied `startDate` is still used verbatim, so a `startDate` without an `endDate` yields `[startDate, now]`, which can be any width. The window is divided into exactly `segmentCount` equal buckets whose width is `max(60000, floor(windowMs / segmentCount))` milliseconds. The one-minute floor is a floor on bucket width, not on the window: when it applies, the series runs past `timeBounds.end` and the trailing buckets are empty rather than the window being compressed. A folder path covers its whole subtree. Per-workflow series are capped and `workflowsTruncated` reports whether the cap applied; the workspace totals are always computed from every workflow. Runs are hard-deleted once they pass the payer's log retention window, so an older run is simply absent rather than reported as removed. The window is 30 days from run start on the free plan, unbounded on Pro and Team, and set per organization on Enterprise with an optional per-workspace override. A workspace folder tree over 10,000 folders is a `413`.", |
| 424 | + "description": "Bucketed run counts, success rate, error count, and mean latency for a workspace and for each of its workflows — the aggregate a caller would otherwise have to page every run to compute. The window spans `startDate` through `endDate` when both are supplied; an omitted edge falls back to the oldest matching run on the left and to the later of the newest matching run and now on the right. With no matching runs the right edge falls back to now and the left to 24 hours before that right edge — the trailing 24 hours when neither edge was supplied, and the 24 hours preceding `endDate` when only `endDate` was supplied. A supplied `startDate` is still used verbatim, so a `startDate` without an `endDate` yields `[startDate, now]`, which can be any width. The window is divided into `segmentCount` equal buckets whose width is `max(60000, floor(windowMs / segmentCount))` milliseconds. Each series carries only the buckets that hold at least one run unless `includeEmpty` is set, in which case exactly `segmentCount` buckets are returned. The one-minute floor is a floor on bucket width, not on the window: when it applies, the series runs past `timeBounds.end` and the trailing buckets are empty rather than the window being compressed. A folder path covers its whole subtree. Per-workflow series are capped and `workflowsTruncated` reports whether the cap applied; the workspace totals are always computed from every workflow. Runs are hard-deleted once they pass the payer's log retention window, so an older run is simply absent rather than reported as removed. The window is 30 days from run start on the free plan, unbounded on Pro and Team, and set per organization on Enterprise with an optional per-workspace override. A workspace folder tree over 10,000 folders is a `413`.", |
425 | 425 | "tags": ["Logs"], |
426 | 426 | "parameters": [ |
427 | 427 | { |
|
505 | 505 | "name": "segmentCount", |
506 | 506 | "in": "query", |
507 | 507 | "required": false, |
508 | | - "description": "Number of equal time buckets to divide the window into, from 1 to 500. Exactly this many buckets are always returned. Buckets are never narrower than one minute, so on a short window the series extends past the end of the window rather than being compressed, and the trailing buckets are empty.", |
| 508 | + "description": "Number of equal time buckets to divide the window into, from 1 to 500. It is the ceiling on how many buckets a series carries: with `includeEmpty=true` exactly this many are returned, otherwise only the buckets holding at least one run. Buckets are never narrower than one minute, so on a short window the series extends past the end of the window rather than being compressed, and the trailing buckets are empty.", |
509 | 509 | "schema": { |
510 | 510 | "default": 72, |
511 | | - "description": "Number of equal time buckets to divide the window into, from 1 to 500. Exactly this many buckets are always returned. Buckets are never narrower than one minute, so on a short window the series extends past the end of the window rather than being compressed, and the trailing buckets are empty.", |
| 511 | + "description": "Number of equal time buckets to divide the window into, from 1 to 500. It is the ceiling on how many buckets a series carries: with `includeEmpty=true` exactly this many are returned, otherwise only the buckets holding at least one run. Buckets are never narrower than one minute, so on a short window the series extends past the end of the window rather than being compressed, and the trailing buckets are empty.", |
512 | 512 | "type": "integer", |
513 | 513 | "minimum": 1, |
514 | 514 | "maximum": 500 |
515 | 515 | } |
| 516 | + }, |
| 517 | + { |
| 518 | + "name": "includeEmpty", |
| 519 | + "in": "query", |
| 520 | + "required": false, |
| 521 | + "description": "Whether buckets with no runs are included in every series. Off by default, so each series carries only the buckets that hold at least one run; set it to publish exactly `segmentCount` buckets per series, empty ones included. The listed spellings are the whole accepted vocabulary and are case-sensitive; any other value is rejected.", |
| 522 | + "schema": { |
| 523 | + "default": false, |
| 524 | + "description": "Whether buckets with no runs are included in every series. Off by default, so each series carries only the buckets that hold at least one run; set it to publish exactly `segmentCount` buckets per series, empty ones included. The listed spellings are the whole accepted vocabulary and are case-sensitive; any other value is rejected.", |
| 525 | + "enum": [ |
| 526 | + "true", |
| 527 | + "1", |
| 528 | + "yes", |
| 529 | + "on", |
| 530 | + "y", |
| 531 | + "enabled", |
| 532 | + "false", |
| 533 | + "0", |
| 534 | + "no", |
| 535 | + "off", |
| 536 | + "n", |
| 537 | + "disabled" |
| 538 | + ], |
| 539 | + "type": "string" |
| 540 | + } |
516 | 541 | } |
517 | 542 | ], |
518 | 543 | "responses": { |
|
1690 | 1715 | "items": { |
1691 | 1716 | "$ref": "#/components/schemas/V2LogStatsSegment" |
1692 | 1717 | }, |
1693 | | - "description": "One entry per bucket, in order, including buckets with no runs." |
| 1718 | + "description": "Buckets in time order. Only the buckets with at least one run unless `includeEmpty` was set, in which case every bucket appears, empty ones included." |
1694 | 1719 | }, |
1695 | 1720 | "totalExecutions": { |
1696 | 1721 | "type": "number", |
|
1763 | 1788 | "items": { |
1764 | 1789 | "$ref": "#/components/schemas/V2LogStatsSegment" |
1765 | 1790 | }, |
1766 | | - "description": "Workspace-wide totals per bucket, in the same order as each workflow series." |
| 1791 | + "description": "Workspace-wide totals per bucket, in time order. Subject to the same `includeEmpty` rule as each workflow series: empty buckets are omitted unless asked for." |
1767 | 1792 | }, |
1768 | 1793 | "totalRuns": { |
1769 | 1794 | "type": "number", |
|
0 commit comments