Skip to content

docs(reporting-api): clarify to semantics, used_bytes units, and data freshness - #62

Open
oreoluwadnd wants to merge 1 commit into
mainfrom
docs/sup-1368-reporting-api-semantics
Open

docs(reporting-api): clarify to semantics, used_bytes units, and data freshness#62
oreoluwadnd wants to merge 1 commit into
mainfrom
docs/sup-1368-reporting-api-semantics

Conversation

@oreoluwadnd

Copy link
Copy Markdown
Contributor

Closes the three Reporting API documentation gaps confirmed in SUP-1368 (origin: SUP-1308, Datamam). Wording is the engineering-verified text from the issue.

Changes

to parameter (Get usage) — documents that the range includes the hourly bucket containing to, and that a date-only value means midnight UTC, so it returns only the first hour of that day. Points at to=YYYY-MM-DDT23:59:59Z for a full final day. Also fixes the pre-existing "End data to query usage" typo.

used_bytes field — raw bytes; divide by 10⁹ for the decimal GB shown in the dashboard.

New "Data freshness" section (Reporting API overview) — hourly aggregation, a UTC day being final ~15 min after midnight, guidance to run daily jobs after 00:30 UTC, and the caveat that usage is recorded on connection close so midnight-crossing sessions count toward the day they end in.

The freshness note lives on the overview page because the Get usage page is generated entirely from the OpenAPI spec and has no body content; the endpoint description links to it.

Note

If PROXY-402 (date-only to → end of day) ships, the to description will need a small revision — this documents current behavior.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 26, 2026 22:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…reshness

Closes three gaps reported by customers against /v1/usage (SUP-1368,
origin SUP-1308):

- `to` is inclusive of the hourly bucket containing it, and a date-only
  value means midnight UTC — so it returns only the first hour of that
  day. Document passing `to=YYYY-MM-DDT23:59:59Z` for a full final day.
- `used_bytes` is raw bytes; divide by 10^9 for the decimal GB shown in
  the dashboard.
- Add a "Data freshness" section covering hourly aggregation, when a UTC
  day is final, and that usage is recorded when a connection closes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@oreoluwadnd
oreoluwadnd force-pushed the docs/sup-1368-reporting-api-semantics branch from cdb4daf to dd0bb11 Compare July 26, 2026 22:11
@oreoluwadnd
oreoluwadnd requested a review from jemxz July 27, 2026 01:39
Accepted formats: date (`2025-01-01`) or RFC3339 (`2025-01-01T10:00:00Z`).

Must be greater than 'from' date.
Must be greater than 'from'.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must be greater than from is not very understandable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants