@extends('layouts.admin') @section('title', 'API Documentation') @section('content')

API Documentation

Access our powerful API to integrate movie data and episodes into your own applications.

Open Interactive Playground

Personal Access Token

Total Hits

{{ number_format($token_hits) }}

@if($last_used_at)

Last Used

{{ $last_used_at->diffForHumans() }}

@endif
@if($token)

New Token Generated:

{{ $token }}

Warning: For security, this token will only be shown once. Please store it safely.

@endif
Generate a token to authenticate your requests. Generating a new token will revoke any existing token for your account.
@csrf

Quick Reference

GET /api/movies

Returns a paginated list of all movies along with a count of their completely downloaded episodes.

Query Parameters

Example Response

{
  "success": true,
  "data": [
    {
      "id": 1,
      "resource_id": 1,
      "external_id": "42000006096",
      "title": "Asalku dari Zaman Kuno",
      "cover": "https://hwztchapter...",
      "chapter_count": 73,
      "tags": ["Perjalanan Waktu", "Modern"],
      "play_count": "5M",
      "episodes_count": 73
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 5,
    "per_page": 12,
    "total": 60
  }
}
GET /api/movies/{id}

Returns the details of a specific movie. This endpoint fully eager-loads the actual episodes array of the movie but only includes episodes that have been successfully downloaded to the server. It also parses a ready-to-use download_url pointing directly to your local storage.

Example Response

{
  "success": true,
  "data": {
    "id": 1,
    "title": "Asalku dari Zaman Kuno",
    "episodes": [
      {
        "id": 101,
        "movie_id": 1,
        "external_id": "ep_1",
        "title": "Episode 1",
        "status": "completed",
        "local_path": "episodes/1/episode_ep_1.mp4",
        "download_url": "https://yourdomain.com/storage/episodes/1/episode_ep_1.mp4"
      }
    ]
  }
}
@endsection