milmilmilmil
API 参考

Downloads

Active and historical torrent downloads

GET
/api/v1/downloads

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

Response Body

application/json

curl -X GET "https://example.com/api/v1/downloads"
[  {    "gid": "string",    "status": "active",    "name": "string",    "total_length": 0,    "completed_length": 0,    "download_speed": 0,    "error_message": "string",    "rule_id": "string",    "created_at": "string"  }]
POST
/api/v1/downloads

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

application/json

curl -X POST "https://example.com/api/v1/downloads" \  -H "Content-Type: application/json" \  -d '{    "url": "string"  }'
{  "gid": "string",  "status": "active",  "name": "string",  "total_length": 0,  "completed_length": 0,  "download_speed": 0,  "error_message": "string",  "rule_id": "string",  "created_at": "string"}
DELETE
/api/v1/downloads

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

Query Parameters

delete_files?boolean

Also delete downloaded files

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X DELETE "https://example.com/api/v1/downloads" \  -H "Content-Type: application/json" \  -d '{}'
Empty
GET
/api/v1/downloads/grouped

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

Response Body

application/json

curl -X GET "https://example.com/api/v1/downloads/grouped"
{}
DELETE
/api/v1/downloads/{gid}

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

gid*string

Query Parameters

delete_files?boolean

Response Body

curl -X DELETE "https://example.com/api/v1/downloads/string"
Empty
GET
/api/v1/downloads/{gid}/files

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

gid*string

Response Body

application/json

curl -X GET "https://example.com/api/v1/downloads/string/files"
[  {    "path": "string",    "length": 0,    "completed_length": 0  }]
POST
/api/v1/downloads/{gid}/pause

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

gid*string

Response Body

curl -X POST "https://example.com/api/v1/downloads/string/pause"
Empty
POST
/api/v1/downloads/{gid}/resume

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

gid*string

Response Body

curl -X POST "https://example.com/api/v1/downloads/string/resume"
Empty