API Reference
REST API
The DroppedNeedle web app runs on this API, and your scripts can use it too. Endpoints are grouped by tag below. Everything on these pages comes from the OpenAPI document in the v3.1.0 release.
Base path and sign-in
Apart from /health and /openapi.json, every endpoint sits under /api/v3 on your server. Most need a session: send its token as Authorization: Bearer <token>. The web app sends the same session as the droppedneedle_sid cookie, or __Secure-droppedneedle_sid.
To get a token for a script, call POST /api/v3/auth/login with your username, password
and "transport": "bearer". The response carries the token once and sets no cookie. Signing
out with POST /api/v3/auth/logout ends that session.
Who can call what
Each endpoint has a badge for the access it needs. User, Curator and Admin are scopes of the normal session. The upgrade session and the Wrapped key are separate credentials, and no normal session can stand in for them.
- Public No sign-in needed.
- User Any signed-in account.
- Curator A Trusted or Admin account.
- Admin An Admin account only.
- Upgrade session The upgrade page's own sign-in. No normal session works.
- Wrapped key The Wrapped API key in the X-Wrapped-API-Key header. No session works.
Errors
Errors come back in one envelope, whatever the status:
{
"error": {
"code": "NOT_FOUND",
"message": "Not found",
"details": null
}
} Write your code against code, which is always in SCREAMING_SNAKE_CASE. A 4xx message is written for people and safe to show. A 5xx message is a fixed sentence that
never names the cause. details holds extra data or is null. Common codes:
| Code | When |
|---|---|
| INVALID_INPUT | 400. Something in the request is wrong; the message says what. |
| UNAUTHORIZED | 401. No credential, or one that is not valid. |
| FORBIDDEN | 403. Signed in, but not allowed to do this. |
| NOT_FOUND | 404. No such route or resource. |
| CONFLICT | 409. The request clashes with the current state. |
| RATE_LIMITED | 429. Too many requests. The Retry-After header says when to try again. |
| PROVIDER_UNAVAILABLE | 503. An outside service such as MusicBrainz is down or limiting requests. details.provider names it. |
| INTERNAL_ERROR | 500. A fault on the server. details.error_id is the request id it was logged under. |
One endpoint answers differently: POST /api/v3/auth/app-connect/token follows OAuth and
refuses with a bare code, as in {"error": "invalid_grant"}.
The OpenAPI document
Your server serves its own copy at /openapi.json, and it always matches the version you
run. The copy behind these pages is from the v3.1.0 release and gets refreshed when a new
release comes out. Either copy works with OpenAPI code generators.
DroppedNeedle also speaks the Subsonic and Jellyfin APIs for music apps. Those are not in this document. To set up an app, see Connect your music app.
Download openapi.json (v3.1.0)
Endpoints
- Auth 18 Sign-in and first-run setup: local, OIDC, Plex and Jellyfin logins, app connect and logout. Open Auth endpoints
- Users 38 Your account, app passwords and sessions, plus admin user management and imports. Open Users endpoints
- Search 4 Ranked search across artists, albums and tracks, with typeahead. Open Search endpoints
- Catalog 19 Album and artist pages: editions, tracklists, similar music and where to buy. Open Catalog endpoints
- Discover 28 Discover shelves, the queue deck, discovery batches and playlist suggestions. Open Discover endpoints
- Collections 33 Follows, favourites, auto-download, new releases and playlists. Open Collections endpoints
- Concerts 6 Upcoming gigs for the artists you follow, in the cities you save. Open Concerts endpoints
- Requests 33 Album requests, the approval queues and the Wanted list. Open Requests endpoints
- Downloads 19 The download queue, manual searches, the quality cutoff and the release blocklist. Open Downloads endpoints
- Held 7 Downloads held for review: play, import, match or discard their files. Open Held endpoints
- Imports 18 Lidarr and Spotify imports, drop uploads, and slskd and SABnzbd status. Open Imports endpoints
- Library 19 Browse the albums, artists and tracks in your library. Open Library endpoints
- Library management 142 Scans, tags, reviews, duplicates, identity repairs, MusicBrainz contributions and the recycle bin. Open Library management endpoints
- Playback 8 Playback sessions, now playing and scrobbles from the web player. Open Playback endpoints
- Stream 7 Audio bytes with range support, and track or album files to download. Open Stream endpoints
- Listening 4 The ListenBrainz link and scrobble preferences. Open Listening endpoints
- Remotes 37 The Plex, Jellyfin and Navidrome libraries you have connected. Open Remotes endpoints
- YouTube 9 Saved YouTube videos for albums and tracks. Open YouTube endpoints
- Platform 12 Cover art, library artwork and version information. Open Platform endpoints
- Plugins 11 Install, configure and remove plugins, and call their own routes. Open Plugins endpoints
- Events 1 The live server-sent event stream for the signed-in user. Open Events endpoints
- Settings 108 Server settings. Admin only, apart from your own section preferences and reading the Connect Apps settings. Open Settings endpoints
- Admin 15 Backups, caches, precache runs and queue and provider stats. Open Admin endpoints
- Upgrade 8 The v2 upgrade page. Only a server started on v2 data serves these. Open Upgrade endpoints
- Health 2 The liveness probe and this OpenAPI document. Open Health endpoints