APPZ-2277: document the consumption metrics and tracing soft-limit endpoints - #72
Open
sergiimeleshko wants to merge 1 commit into
Open
APPZ-2277: document the consumption metrics and tracing soft-limit endpoints#72sergiimeleshko wants to merge 1 commit into
sergiimeleshko wants to merge 1 commit into
Conversation
…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.
✅ Deploy Preview for famous-rabanadas-f56237 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
GET/v1/account-management/metrics-accounts/{metricsAccountId}/soft-limitPUT/v1/account-management/metrics-accounts/{metricsAccountId}/soft-limitsoftLimitUniqueMetricsGET/v1/account-management/consumption/tracing-accounts/{id}/soft-limitPUT/v1/account-management/consumption/tracing-accounts/{id}/soft-limittracingAccountId,softLimitGBAll four are exposed as
ApiGatewayType.PUBLIC_APIin gaia-full, so they belong here.Why
DOC-1062previously covered the logging side only (softLimitGBon time-based accounts, PRs #63and #65). The metrics endpoint (
APPZ-2279) and the tracing endpoint (APPZ-2278) were mergedafterwards 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_APIand still undocumented —out of scope here, worth a follow-up.
Contract details worth reviewing
400(
NOT_CONSUMPTION_ACCOUNTfor metrics).softLimitUniqueMetricswith400(INVALID_SOFT_LIMIT).softLimitGBwith400(ILLEGAL_SOFT_LIMIT), and requirestracingAccountIdin the body to match the pathid, otherwise400(WRONG_ACCOUNT_ID).That duplication is easy to miss, so it is called out explicitly in the endpoint description.
metricsAccountId+softLimitUniqueMetrics,tracing returns
accountId+softLimitGB. Documented as-is rather than normalised.Why the diff is small
yarn gen-api-docs logzproduced the four new pages. A full regeneration also rewrites thebase64-encoded
api:blob in all 198 existing pages with no content change, so those are leftuntouched and
docs/logz/sidebar.jsis updated by hand instead.Heads-up for anyone regenerating later:
yarn clean-api-docs logzdeletes the 8 unified-alertspages plus their tag page. They are not generated from
examples/logzio-public-api.yml(they camefrom
APPZ-1905-add-unified-alerts-api-docs), socleanremoves them permanently. Do not run it.Verification
yarn gen-api-docs logzsucceeds.docs/logz/sidebar.jsparses; 218 entries, the 4 new ones present, all 8 unified-alerts entriesintact.
yarn buildfails locally on a pre-existing dependency error(
Can't resolve './lib/index'in@paloaltonetworks/postman-code-generators). Confirmed identicalon a clean
masterwith these changes stashed, so it is not introduced here.