task_id: task_create_api_get_label_artists entity_id: api_get_label_artists generated_at: '2025-12-18T15:16:50.287533' workflow_version: v001 target: type: api definition: id: api_get_label_artists method: GET path: /api/labels/:id/artists description: Get artists under label responses: - status: 200 description: List of artists schema: artists: - id: uuid stage_name: string auth: required: false depends_on_models: - model_label - model_artist related: models: - id: model_artist definition: &id001 id: model_artist name: Artist table_name: artists description: Extended profile for musicians fields: - name: id type: uuid constraints: - primary_key - name: user_id type: uuid constraints: - not_null - foreign_key references: users.id - name: stage_name type: string constraints: - not_null - name: bio type: text constraints: - nullable - name: cover_image_url type: string constraints: - nullable - name: social_links type: jsonb description: JSON object with {twitter, instagram, facebook, website} constraints: - nullable - name: verified type: boolean default: false - name: created_at type: timestamp constraints: - not_null - name: updated_at type: timestamp constraints: - not_null relations: - type: belongs_to to: model_user foreign_key: user_id - type: has_many to: model_song foreign_key: artist_id - type: has_many to: model_album foreign_key: artist_id - type: belongs_to to: model_label foreign_key: label_id optional: true indexes: - fields: - user_id unique: true - fields: - stage_name timestamps: true - id: model_label definition: &id002 id: model_label name: Label table_name: labels description: Organization profile for labels fields: - name: id type: uuid constraints: - primary_key - name: user_id type: uuid constraints: - not_null - foreign_key references: users.id - name: label_name type: string constraints: - not_null - name: description type: text constraints: - nullable - name: logo_url type: string constraints: - nullable - name: website type: string constraints: - nullable - name: created_at type: timestamp constraints: - not_null - name: updated_at type: timestamp constraints: - not_null relations: - type: belongs_to to: model_user foreign_key: user_id - type: has_many to: model_artist foreign_key: label_id indexes: - fields: - user_id unique: true timestamps: true apis: [] components: [] dependencies: entity_ids: - model_artist - model_label definitions: - id: model_artist type: model definition: *id001 - id: model_label type: model definition: *id002 files: to_create: - app/api/labels/id/artists/route.ts reference: [] acceptance: - criterion: GET /api/labels/:id/artists returns success response verification: curl -X GET /api/labels/:id/artists - criterion: Request validation implemented verification: Test with invalid data - criterion: Error responses match contract verification: Test error scenarios