milmilmilmil
API 參考

Media Files

Match/unmatch and inspect individual files

POST
/api/v1/media-files/bulk-match

Authorization

bearerAuth
AuthorizationBearer <token>

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

curl -X POST "https://example.com/api/v1/media-files/bulk-match" \  -H "Content-Type: application/json" \  -d '{}'
Empty
POST
/api/v1/media-files/bulk-unmatch

Authorization

bearerAuth
AuthorizationBearer <token>

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

curl -X POST "https://example.com/api/v1/media-files/bulk-unmatch" \  -H "Content-Type: application/json" \  -d '{}'
Empty
DELETE
/api/v1/media-files/{id}

Removes the file from the underlying storage provider and deletes the media_files row. Use cautiously — there is no undo.

Authorization

bearerAuth
AuthorizationBearer <token>

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

id*string

Response Body

curl -X DELETE "https://example.com/api/v1/media-files/string"
Empty
GET
/api/v1/media-files/{id}/info

Authorization

bearerAuth
AuthorizationBearer <token>

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

id*string

Response Body

application/json

curl -X GET "https://example.com/api/v1/media-files/string/info"
{  "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"}
DELETE
/api/v1/media-files/{id}/match

Authorization

bearerAuth
AuthorizationBearer <token>

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

id*string

Response Body

curl -X DELETE "https://example.com/api/v1/media-files/string/match"
Empty
PUT
/api/v1/media-files/{id}/match

Authorization

bearerAuth
AuthorizationBearer <token>

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

id*string

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/media-files/string/match" \  -H "Content-Type: application/json" \  -d '{}'
{  "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"}