Skip to content

docs: GET /api/artists/{id}/segments (replaces /api/artist/segments)#135

Closed
arpitgupta1214 wants to merge 1 commit into
mainfrom
feat/docs-get-artists-segments
Closed

docs: GET /api/artists/{id}/segments (replaces /api/artist/segments)#135
arpitgupta1214 wants to merge 1 commit into
mainfrom
feat/docs-get-artists-segments

Conversation

@arpitgupta1214
Copy link
Copy Markdown
Collaborator

@arpitgupta1214 arpitgupta1214 commented Apr 15, 2026

Summary

  • Adds GET /api/artists/{id}/segments as a new nested-resource list endpoint (artist id is path-encoded; page / limit remain as query params with the same defaults)
  • Removes the legacy GET /api/artist/segments reference in the same PR
  • Swaps the Artists navigation entry in docs.json from api-reference/artist/segments to api-reference/artists/segments

The accompanying api PR introduces the nested route and removes the legacy route at the same time; chat is the only known consumer today.

Changes

  • api-reference/artists/segments.mdx (added) — frontmatter-only page referencing the new operation, matching the pattern used by artists/pin.mdx, artists/unpin.mdx, artists/delete.mdx
  • api-reference/artist/segments.mdx (removed)
  • api-reference/openapi/releases.json:
    • adds GET /api/artists/{id}/segments with the id path param (uuid), page / limit query params, and 200 / 400 / 401 / 403 / 500 responses
    • reuses existing ArtistSegmentsResponse and ArtistSegmentsErrorResponse schemas so the published payload shape is identical to the legacy route
    • removes the legacy GET /api/artist/segments path
  • docs.json — navigation swap (no other nav changes)

Test plan

  • npx mintlify@latest dev renders the Artists group with the new "Get Artist Segments" page at api-reference/artists/segments
  • The new page shows the id path param and both page / limit query params
  • api-reference/artist/segments is gone from navigation and returns 404 locally
  • releases.json still parses and no references to /api/artist/segments remain
  • Hold merge until the matching api PR (which cuts over the actual route) is ready so the docs stay consistent with what the API serves

Summary by cubic

Adds docs and OpenAPI for GET /api/artists/{id}/segments and removes the legacy /api/artist/segments. Moves to a nested, resource-first path. Pagination stays the same and response schemas are unchanged.

  • Migration
    • OpenAPI: adds the new path with an id path param, keeps page/limit, and defines 200/400/401/403/500. Reuses existing ArtistSegmentsResponse and ArtistSegmentsErrorResponse.
    • Docs: new page at api-reference/artists/segments; old page removed; navigation updated.
    • No alias for the legacy route. Coordinate merge with the API PR that drops the old path.

Written for commit dc17cca. Summary will update on new commits.

Summary by CodeRabbit

  • Documentation

    • Updated API reference documentation for artist segments endpoint with improved error response documentation including authorization and server error scenarios.
  • API Changes

    • Restructured artist segments endpoint path and parameter format for improved API consistency and clarity.

…egments

Replace the legacy top-level /api/artist/segments list route with the
nested /api/artists/{id}/segments route in the same PR, matching the
resource-first URL convention already in use for /api/artists/{id}/pin,
/api/artists/{id}/unpin, and DELETE /api/artists/{id}.

Per the segments surface migration plan, the legacy route is removed,
not aliased, and the api PR that introduces the nested route will drop
the old route in the same release.

- add api-reference/artists/segments.mdx referencing the new nested
  operation in api-reference/openapi/releases.json
- remove api-reference/artist/segments.mdx and swap the docs.json
  navigation entry to point at the new page
- add GET /api/artists/{id}/segments to releases.json with the id path
  param, page/limit query params, and 200/400/401/403/500 responses
  (reusing the existing ArtistSegmentsResponse / ArtistSegmentsErrorResponse
  schemas so the payload shape is identical to the legacy route)
- remove the legacy GET /api/artist/segments path from releases.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 15, 2026

📝 Walkthrough

Walkthrough

API documentation for artist segments was migrated from a singular endpoint structure (/api/artist/segments) to a plural, path-parameterized structure (/api/artists/{id}/segments). The change includes relocating documentation files, updating the OpenAPI specification with new response codes and error schemas, and updating navigation references.

Changes

Cohort / File(s) Summary
Documentation Files
api-reference/artist/segments.mdx, api-reference/artists/segments.mdx
Removed old documentation page for singular endpoint and added new documentation page for plural endpoint with pagination support description.
OpenAPI Specification
api-reference/openapi/releases.json
Updated endpoint from GET /api/artist/segments (query-based artist_account_id) to GET /api/artists/{id}/segments (path-based id parameter). Added 401, 403, and 500 response documentation with ArtistSegmentsErrorResponse schema references.
Navigation Configuration
docs.json
Updated Artists tab navigation route reference from api-reference/artist/segments to api-reference/artists/segments.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • sweetmantech

Poem

🐰 A plural path now guides the way,
From /artist to /artists/ we say!
With IDs nested, responses complete,
Documentation moves to plural feet! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: migrating from GET /api/artist/segments to GET /api/artists/{id}/segments with proper path parameter handling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/docs-get-artists-segments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant