milmilmilmil
API Reference

Sync

Tracker watch-state sync (pull/push) for AniList, Bangumi and Trakt

GET
/api/v1/sync/status

Reports connection state, last successful sync timestamp, pending outbox count and the most recent errors (up to 10) for each supported tracker (anilist, bangumi, trakt).

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/sync/status"
[  {    "provider": "anilist",    "connected": true,    "last_sync": "2019-08-24T14:15:22Z",    "pending": 0,    "last_errors": [      {        "anime_id": "string",        "error": "string",        "at": "2019-08-24T14:15:22Z"      }    ]  }]
POST
/api/v1/sync/{provider}/pull

Fetches the user's remote watched list and applies a max-wins conflict resolution: for each anime milmil already tracks, if remote progress is ahead of local, watch_progress rows are inserted so local catches up. last_pulled_at is written on every run for freshness display.

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

provider*string

Value in

  • "anilist"
  • "bangumi"
  • "trakt"

Response Body

application/json

curl -X POST "https://example.com/api/v1/sync/anilist/pull"
{  "provider": "anilist",  "checked": 0,  "updated_local": 0,  "skipped": 0,  "errors": [    "string"  ]}
POST
/api/v1/sync/{provider}/pull-enabled

Persists per-user pull-enabled state in sync_provider_state. The background pull worker honours this flag.

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

provider*string

Value in

  • "anilist"
  • "bangumi"
  • "trakt"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/api/v1/sync/anilist/pull-enabled" \  -H "Content-Type: application/json" \  -d '{    "enabled": true  }'
Empty