64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
task_id: task_create_api_get_label_stats
|
|
entity_id: api_get_label_stats
|
|
generated_at: '2025-12-18T17:43:33.709941'
|
|
workflow_version: v003
|
|
target:
|
|
type: api
|
|
definition:
|
|
id: api_get_label_stats
|
|
method: GET
|
|
path: /api/labels/[id]/stats
|
|
summary: Get label statistics
|
|
description: Get artist count, song count, album count, and total plays
|
|
tags:
|
|
- labels
|
|
- statistics
|
|
path_params:
|
|
- name: id
|
|
type: string
|
|
description: Label ID
|
|
responses:
|
|
- status: 200
|
|
description: Statistics retrieved
|
|
schema:
|
|
type: object
|
|
properties:
|
|
- name: artistCount
|
|
type: integer
|
|
- name: songCount
|
|
type: integer
|
|
- name: albumCount
|
|
type: integer
|
|
- name: totalPlays
|
|
type: integer
|
|
example:
|
|
artistCount: 5
|
|
songCount: 120
|
|
albumCount: 15
|
|
totalPlays: 45000
|
|
- status: 404
|
|
description: Label not found
|
|
depends_on_models: []
|
|
depends_on_apis: []
|
|
auth:
|
|
required: false
|
|
roles: []
|
|
related:
|
|
models: []
|
|
apis: []
|
|
components: []
|
|
dependencies:
|
|
entity_ids: []
|
|
definitions: []
|
|
files:
|
|
to_create:
|
|
- app/api/labels/[id]/stats/route.ts
|
|
reference: []
|
|
acceptance:
|
|
- criterion: GET /api/labels/[id]/stats returns success response
|
|
verification: curl -X GET /api/labels/[id]/stats
|
|
- criterion: Request validation implemented
|
|
verification: Test with invalid data
|
|
- criterion: Error responses match contract
|
|
verification: Test error scenarios
|