Skip to content

docs(api): TRA-799 — remove asset current-location from the API docs#187

Merged
mikestankavich merged 7 commits into
mainfrom
docs/tra-799-current-location
May 22, 2026
Merged

docs(api): TRA-799 — remove asset current-location from the API docs#187
mikestankavich merged 7 commits into
mainfrom
docs/tra-799-current-location

Conversation

@mikestankavich
Copy link
Copy Markdown
Contributor

Docs-only companion to platform PR trakrf/platform#384 (TRA-799). The platform change makes an asset's current location fact data, not a dimension attribute the asset resource carries. This PR brings docs/api/ in line with that contract.

Three contract changes documented

  1. Asset response shapelocation_id / location_external_key are removed from the asset resource. GET /api/v1/assets and GET /api/v1/assets/{asset_id} return master data only. Current location is read from GET /api/v1/reports/asset-locations or GET /api/v1/assets/{asset_id}/history.
  2. Asset writelocation_id / location_external_key in a POST or PATCH body are rejected 400 / code: read_only on presence. The prior PATCH accept-if-matches / reject-if-differs handling is retired — with location off the read shape there is nothing to echo.
  3. Asset list filter — the ?location_id / ?location_external_key filters are removed from GET /api/v1/assets. Filter by location on /reports/asset-locations instead.

The reporting endpoints (/reports/asset-locations, /assets/{id}/history) are unchanged — they remain the system of record for asset location.

Files changed

  • data-model.md — asset detail view dropped from the scan-data consumption table; POST/PATCH rejection prose unified.
  • resource-identifiers.md — the page used asset location_* as its primary teaching example for FK-pair, present-as-null, accept-if-matches, and list-filter patterns; those examples are re-anchored on LocationView.parent_* and the /reports/asset-locations row. Paired-key matrix reworked.
  • pagination-filtering-sorting.md/assets location filter removed from the param table, mutual-exclusion rule, repeatable-filter examples, validator prose, and worked example.
  • quickstart.mdx, errors.md, design-notes.md — corrected sentences that framed asset location_* as a read-shape / accept-if-matches field.
  • changelog.md — new v1.0 entry; prior entries (BB40, BB63) left as historical record.

The OpenAPI-driven /api interactive reference is generated from the platform-synced spec and updates with that sync — not hand-edited here. Design spec + plan included under superpowers/.

Verification

  • pnpm build passes — no broken internal links or anchors.
  • git grep audit: every remaining location_id / location_external_key hit is a path parameter, a parent_* reference, a LocationView field, or a /reports/asset-locations / history row — none describes an asset response field or an /assets list filter.
  • Edited docs files are Prettier-clean (errors.md carries pre-existing, unrelated Prettier drift from main, left untouched).

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

🚀 Preview Deployment Update

✅ This PR has been successfully merged into the preview branch.

The preview environment will update shortly at: https://docs.preview.trakrf.id

github-actions Bot added a commit that referenced this pull request May 22, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: cd8910b
Status: ✅  Deploy successful!
Preview URL: https://5487ffb7.docs-4n7.pages.dev
Branch Preview URL: https://docs-tra-799-current-locatio.docs-4n7.pages.dev

View logs

@mikestankavich mikestankavich merged commit e04ffa8 into main May 22, 2026
2 checks passed
@mikestankavich mikestankavich deleted the docs/tra-799-current-location branch May 22, 2026 19:10
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