Libraries
Library CRUD, scanning, browsing, completeness, capacity and connection tests
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Response Body
application/json
curl -X GET "https://example.com/api/v1/libraries"[ { "id": "string", "name": "string", "path": "string", "enabled": 0, "scan_interval_minutes": 0, "last_scanned_at": "string", "created_at": "string", "updated_at": "string" }]Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/libraries" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "path": "string" }'{ "id": "string", "name": "string", "path": "string", "enabled": 0, "scan_interval_minutes": 0, "last_scanned_at": "string", "created_at": "string", "updated_at": "string"}Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/libraries/browse" \ -H "Content-Type: application/json" \ -d '{}'[ { "name": "string", "path": "string", "is_dir": true, "children": [ {} ] }]Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Response Body
application/json
curl -X GET "https://example.com/api/v1/libraries/discover-network"[ { "host": "string", "name": "string" }]Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/libraries/test-connection" \ -H "Content-Type: application/json" \ -d '{}'{ "ok": true, "error": "string"}Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/libraries/string"{ "id": "string", "name": "string", "path": "string", "enabled": 0, "scan_interval_minutes": 0, "last_scanned_at": "string", "created_at": "string", "updated_at": "string"}Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
curl -X DELETE "https://example.com/api/v1/libraries/string"Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PUT "https://example.com/api/v1/libraries/string" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "path": "string" }'{ "id": "string", "name": "string", "path": "string", "enabled": 0, "scan_interval_minutes": 0, "last_scanned_at": "string", "created_at": "string", "updated_at": "string"}Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/libraries/string/anime"[ { "bangumi_id": 0, "anilist_id": 0, "title": "string", "title_original": "string", "title_en": "string", "cover_image": "string", "air_date": "string", "episode_count": 0, "score": 0 }]Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
curl -X DELETE "https://example.com/api/v1/libraries/string/anime/string"Returns total/used/free bytes for the library's root path (local sources only). Remote sources or unreachable paths report available=false with zero values.
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/libraries/string/capacity"{ "total_bytes": 0, "free_bytes": 0, "used_bytes": 0, "available": true, "downloaded_this_month_bytes": 0}Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/libraries/string/connection-status"{ "connected": true, "error": "string"}Returns one DupSet per episode that has 2+ media files, grouped across all anime in the library.
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/libraries/string/duplicates"[ { "anime_id": "string", "anime_title": "string", "episode_id": "string", "episode_number": 0.1, "preferred_id": "string", "manually_set": true, "files": [ { "id": "string", "path": "string", "filename": "string", "size_bytes": 0, "resolution": 0, "subgroup": "string", "mod_time": "2019-08-24T14:15:22Z" } ], "wasted_bytes": 0 }]Iterates duplicate episodes and deletes every file that isn't the preferred copy. Episodes with no preferred copy are skipped (no rank → nothing to keep). Returns counts and reclaimed bytes.
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
application/json
curl -X POST "https://example.com/api/v1/libraries/string/duplicates/cleanup"{ "deleted": 0, "reclaimed_bytes": 0, "skipped": 0, "errors": [ "string" ]}Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/libraries/string/file-tree"[ { "name": "string", "path": "string", "is_dir": true, "children": [ {} ] }]Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
curl -X POST "https://example.com/api/v1/libraries/string/match"Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Query Parameters
Value in
- "asc"
- "desc"
Response Body
application/json
curl -X GET "https://example.com/api/v1/libraries/string/media-files"[ { "id": "string", "library_id": "string", "path": "string", "filename": "string", "size": 0, "duration": 0, "bangumi_id": 0, "bangumi_episode_id": 0, "episode_number": 0, "created_at": "string", "updated_at": "string" }]Returns one CompletenessReport per anime in the library; useful for dashboards that surface incomplete series. Always emits an array (empty when nothing is missing).
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/libraries/string/missing-summary"[ { "anime_id": "string", "bangumi_id": 0, "title": "string", "total": 0, "have": [ 0 ], "missing": [ 0 ], "airing_pending": [ 0 ], "unknown_total": true, "generated_at": "2019-08-24T14:15:22Z" }]Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
curl -X POST "https://example.com/api/v1/libraries/string/scan"Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/libraries/string/scan-summaries"[ { "id": "string", "library_id": "string", "started_at": "string", "completed_at": "string", "files_found": 0, "files_matched": 0, "files_unmatched": 0, "errors": "string" }]Used by CLI/agents to block on scan completion. Returns immediately when no scan is running, or polls (default 300s, max 1800s) until completion. Note the singular /library/... path (CLI surface), distinct from the plural /libraries/... group.
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Query Parameters
Seconds to wait (1-1800, default 300)
1 <= value <= 1800300Response Body
application/json
curl -X GET "https://example.com/api/v1/library/string/scan/wait"{ "library_id": "string", "status": "complete", "started_at": "2019-08-24T14:15:22Z", "completed_at": "2019-08-24T14:15:22Z"}curl -X GET "https://example.com/api/v1/rclone/remotes"[ "string"]