Skip to content

feat(asm): add GET, PATCH, DELETE /tags/{tag_id} to complete Tags CRUD#24

Open
dmchaledev wants to merge 1 commit into
mainfrom
claude/elegant-edison-h2cgn1
Open

feat(asm): add GET, PATCH, DELETE /tags/{tag_id} to complete Tags CRUD#24
dmchaledev wants to merge 1 commit into
mainfrom
claude/elegant-edison-h2cgn1

Conversation

@dmchaledev

Copy link
Copy Markdown
Contributor

Problem

The Tags API only exposes two operations:

  • GET /tags — list all tags
  • POST /tags — create a tag

There is no way to retrieve a single tag by ID, rename/recolor it, or delete it. Without DELETE, stale tags (e.g. datacenter-eu, prod-old, deprecated team names) accumulate indefinitely and pollute the tag picker for every asset in the tenant.

Changes

Adds three new operations to asm/openapi.yaml:

Method Path Description
GET /tags/{tag_id} Retrieve a single tag by ID
PATCH /tags/{tag_id} Update a tag's name or color
DELETE /tags/{tag_id} Permanently delete a tag and remove it from all assets

Also adds a TagId reusable path parameter component (mirrors the existing AssetId pattern).

Notes

  • DELETE returns 204 No Content (consistent with DELETE /assets/{asset_id})
  • The delete description calls out that the tag is removed from all assets — this is the important side-effect consumers need to know about
  • PATCH /tags/{tag_id} accepts partial updates (name only, color only, or both); no required fields

Test plan

  • Run spectral lint asm/openapi.yaml --ruleset spectral:oas — should pass with no errors
  • Verify the rendered ReDoc at the GitHub Pages preview shows the new endpoints under the Tags section
  • Confirm TagId pattern ^tag_[a-z0-9]{16}$ matches example tag_0001aabbccdd0001

🤖 Generated with Claude Code

https://claude.ai/code/session_01TCYFsHtDRoo2DqqU7mcFGL


Generated by Claude Code

Tags could be created and listed but not retrieved individually, updated,
or deleted. Without DELETE, stale tags (e.g. decommissioned environments)
accumulate indefinitely. Adds a TagId path parameter component for reuse.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCYFsHtDRoo2DqqU7mcFGL
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.

2 participants