diff --git a/api-reference/artist/segments.mdx b/api-reference/artist/segments.mdx deleted file mode 100644 index cad734b..0000000 --- a/api-reference/artist/segments.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Get Artist Segments -openapi: "/api-reference/openapi/releases.json GET /api/artist/segments" ---- diff --git a/api-reference/artists/segments.mdx b/api-reference/artists/segments.mdx new file mode 100644 index 0000000..40c22e8 --- /dev/null +++ b/api-reference/artists/segments.mdx @@ -0,0 +1,5 @@ +--- +title: 'Get Artist Segments' +description: 'Retrieve all segments associated with an artist. Supports pagination.' +openapi: "/api-reference/openapi/releases.json GET /api/artists/{id}/segments" +--- diff --git a/api-reference/openapi/releases.json b/api-reference/openapi/releases.json index a40b3cd..b0cd3d9 100644 --- a/api-reference/openapi/releases.json +++ b/api-reference/openapi/releases.json @@ -566,14 +566,14 @@ } } }, - "/api/artist/segments": { + "/api/artists/{id}/segments": { "get": { "description": "Retrieve all segments associated with an artist. This endpoint should be called before using the Segment Fans endpoint to obtain the necessary segment IDs. Supports pagination.", "parameters": [ { - "name": "artist_account_id", - "in": "query", - "description": "The unique identifier of the artist account to fetch segments for", + "name": "id", + "in": "path", + "description": "Artist account ID to fetch segments for.", "required": true, "schema": { "type": "string", @@ -614,7 +614,30 @@ } }, "400": { - "description": "Bad request - missing required parameters", + "description": "Bad request - invalid artist ID path parameter or query parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtistSegmentsErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized - missing or invalid authentication" + }, + "403": { + "description": "Forbidden - the authenticated account cannot access this artist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtistSegmentsErrorResponse" + } + } + } + }, + "500": { + "description": "Server error while retrieving segments", "content": { "application/json": { "schema": { diff --git a/docs.json b/docs.json index 2b50c59..2f44c1c 100644 --- a/docs.json +++ b/docs.json @@ -43,7 +43,7 @@ "api-reference/artists/pin", "api-reference/artists/unpin", "api-reference/artists/delete", - "api-reference/artist/segments", + "api-reference/artists/segments", "api-reference/artist/socials", "api-reference/artist/socials-scrape", "api-reference/artist/profile"