Skip to content

APPZ-2277: document the consumption metrics and tracing soft-limit endpoints - #72

Open
sergiimeleshko wants to merge 1 commit into
masterfrom
APPZ-2277-document-consumption-soft-limit-endpoints
Open

APPZ-2277: document the consumption metrics and tracing soft-limit endpoints#72
sergiimeleshko wants to merge 1 commit into
masterfrom
APPZ-2277-document-consumption-soft-limit-endpoints

Conversation

@sergiimeleshko

Copy link
Copy Markdown

What

Documents the four public soft-limit endpoints for consumption metrics and tracing accounts.
They shipped but never reached the spec, so customers managing accounts via the API or Terraform
have no reference for them.

method path body
GET /v1/account-management/metrics-accounts/{metricsAccountId}/soft-limit
PUT /v1/account-management/metrics-accounts/{metricsAccountId}/soft-limit softLimitUniqueMetrics
GET /v1/account-management/consumption/tracing-accounts/{id}/soft-limit
PUT /v1/account-management/consumption/tracing-accounts/{id}/soft-limit tracingAccountId, softLimitGB

All four are exposed as ApiGatewayType.PUBLIC_API in gaia-full, so they belong here.

Why

DOC-1062 previously covered the logging side only (softLimitGB on time-based accounts, PRs #63
and #65). The metrics endpoint (APPZ-2279) and the tracing endpoint (APPZ-2278) were merged
afterwards and never documented.

Scoped deliberately to soft-limit endpoints. Note that the wider consumption tracing accounts
resource (create / update / get / get-all / delete) is also PUBLIC_API and still undocumented —
out of scope here, worth a follow-up.

Contract details worth reviewing

  • Both are Consumption-only. A Subscription account gets 400
    (NOT_CONSUMPTION_ACCOUNT for metrics).
  • Metrics rejects a negative softLimitUniqueMetrics with 400 (INVALID_SOFT_LIMIT).
  • Tracing rejects a negative softLimitGB with 400 (ILLEGAL_SOFT_LIMIT), and requires
    tracingAccountId in the body to match the path id, otherwise 400 (WRONG_ACCOUNT_ID).
    That duplication is easy to miss, so it is called out explicitly in the endpoint description.
  • Response bodies differ in shape: metrics returns metricsAccountId + softLimitUniqueMetrics,
    tracing returns accountId + softLimitGB. Documented as-is rather than normalised.

Why the diff is small

yarn gen-api-docs logz produced the four new pages. A full regeneration also rewrites the
base64-encoded api: blob in all 198 existing pages with no content change, so those are left
untouched and docs/logz/sidebar.js is updated by hand instead.

Heads-up for anyone regenerating later: yarn clean-api-docs logz deletes the 8 unified-alerts
pages plus their tag page
. They are not generated from examples/logzio-public-api.yml (they came
from APPZ-1905-add-unified-alerts-api-docs), so clean removes them permanently. Do not run it.

Verification

  • Spec parses; the four paths resolve with the expected verbs, tags and summaries.
  • yarn gen-api-docs logz succeeds.
  • docs/logz/sidebar.js parses; 218 entries, the 4 new ones present, all 8 unified-alerts entries
    intact.
  • yarn build fails locally on a pre-existing dependency error
    (Can't resolve './lib/index' in @paloaltonetworks/postman-code-generators). Confirmed identical
    on a clean master with these changes stashed, so it is not introduced here.

…dpoints

The public soft-limit endpoints for consumption metrics accounts (APPZ-2279) and
consumption tracing accounts (APPZ-2278) shipped but were never documented, so
customers managing accounts via the API or Terraform have no reference for them.
DOC-1062 previously covered the logging side (softLimitGB on time-based
accounts) only.

Adds four endpoints to the spec, all PUBLIC_API exposed:

  GET  /v1/account-management/metrics-accounts/{metricsAccountId}/soft-limit
  PUT  /v1/account-management/metrics-accounts/{metricsAccountId}/soft-limit
  GET  /v1/account-management/consumption/tracing-accounts/{id}/soft-limit
  PUT  /v1/account-management/consumption/tracing-accounts/{id}/soft-limit

Metrics takes softLimitUniqueMetrics (unique time series), tracing takes
softLimitGB. Both are Consumption-only and return 400 for a Subscription
account. The tracing PUT additionally requires tracingAccountId in the body to
match the path id, which is documented since it returns 400 otherwise.

The generated pages come from `yarn gen-api-docs logz`. Only the four new pages
are included: a full regeneration rewrites the base64 api blob in all 198
existing pages with no content change, so those are left untouched.
docs/logz/sidebar.js is updated by hand for the same reason.
@netlify

netlify Bot commented Sep 10, 2026

Copy link
Copy Markdown

Deploy Preview for famous-rabanadas-f56237 ready!

Name Link
🔨 Latest commit 36bb689
🔍 Latest deploy log https://app.netlify.com/projects/famous-rabanadas-f56237/deploys/6aa27d46c3f9cc0008e52609
😎 Deploy Preview https://deploy-preview-72--famous-rabanadas-f56237.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

1 participant