core
core copied to clipboard
Implement/Enhance POST /api/v2/tags and GET /api/v2/tags/{idOrName} endpoints (Core Tag Operations)
Task
Context: Part of Feature #32941 (Single Tag Operations) in Tags Portlet Modernization Epic. This story implements/enhances both create and retrieve endpoints together to ensure testability - we can create a tag and immediately verify it via GET.
Definition of Done:
- POST /api/v2/tags implementation:
- Tag name validation: required, non-blank, max 255 chars, no commas
- Site ID validation with fallback
- Returns 201 for create tag (create tag is idempotent)
- GET /api/v2/tags/{idOrName} implementation:
- Supports both UUID and tag name
- Query parameter siteId for name-based retrieval
- Returns 200 with tag object
- Shared response entity (ResponseEntityTagView)
- Error responses for both endpoints (400, 401, 403, 404, 500)
- Postman test suite for create→get flow
Proposed Objective
Same as Parent Issue
Proposed Priority
Same as Parent Issue
Acceptance Criteria
- Can create a tag and retrieve it by ID
- Can create a tag and retrieve it by name+siteId
- Create validation errors return proper 400 responses
- Get returns 404 for non-existent tags
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
No response
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response