core
core copied to clipboard
Enhance POST /api/v2/tags/import endpoint (Tag Import from CSV)
Task
Context: Part of Feature #32943 (Import/Export Tags) in Tags Portlet Modernization Epic. Implements tag import from CSV with row-level error reporting and validation.
Definition of Done:
- Accepts multipart/form-data with CSV file
- CSV format validation: "Tag Name,Host ID" headers
- Automatic header row detection and skipping
- Row-level processing with individual error reporting
- Tag name validation (cannot be empty)
- Host ID fallback to current site/SYSTEM_HOST
- Synchronous processing with immediate results
- Response: totalRows, processedRows, successfulImports, errorRows
- Detailed rowErrors with lineNumber, messages, field info
- Error responses: 400, 401, 403, 500
- Postman tests with sample CSV files
Proposed Objective
Same as Parent Issue
Proposed Priority
Same as Parent Issue
Acceptance Criteria
- Processes CSV with "Tag Name,Host ID" format
- Skips header row automatically
- Empty tag names fail with specific row error
- Invalid host IDs fall back to current site
- Returns success count and detailed failures
- Missing file returns 400
- Row errors include line number and field
- File processing errors return 500
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