Skip to main content
GET
/
api
/
series
/
{showId}
/
seasons
List Seasons
curl --request GET \
  --url https://api.example.com/api/series/{showId}/seasons
{
  "data": [
    {
      "_id": "<string>",
      "title": "<string>",
      "description": "<string>",
      "images": [
        {
          "_id": "<string>",
          "path": "<string>",
          "basePath": "<string>"
        }
      ]
    }
  ],
  "error": {
    "message": "<string>",
    "status": 123
  }
}

Overview

Retrieves a list of all seasons for a specific series. Seasons are used to organize episodes within a series, following a traditional TV show structure.

Endpoint

GET /api/series/{showId}/seasons

Path Parameters

showId
string
required
The unique identifier of the series. This is the MongoDB ObjectId of the series.

Response

data
array
Array of season objects
_id
string
Unique identifier for the season (MongoDB ObjectId)
title
string
The title of the season (e.g., “Season 1”, “Temporada 2”)
description
string
A description of the season and its content
images
array
Array of image objects associated with the season
_id
string
Unique identifier for the image
path
string
Relative path to the image file
basePath
string
Base path for constructing the full CDN URL. Prepend https://platform-static.cdn.mdstrm.com to access the image.

Example Request

curl -X GET "https://your-domain.com/api/series/507f1f77bcf86cd799439011/seasons" \
  -H "Accept: application/json"

Example Response

{
  "data": [
    {
      "_id": "507f191e810c19729de860ea",
      "title": "Season 1",
      "description": "The first season introduces the main characters and storyline",
      "images": [
        {
          "_id": "507f191e810c19729de860eb",
          "path": "/seasons/season1-cover.jpg",
          "basePath": "/images/seasons/507f191e810c19729de860ea/season1-cover.jpg"
        }
      ]
    },
    {
      "_id": "507f191e810c19729de860ec",
      "title": "Season 2",
      "description": "The second season continues the story with new challenges",
      "images": [
        {
          "_id": "507f191e810c19729de860ed",
          "path": "/seasons/season2-cover.jpg",
          "basePath": "/images/seasons/507f191e810c19729de860ec/season2-cover.jpg"
        }
      ]
    }
  ]
}

Error Responses

error
object
Error object returned when the request fails
message
string
Description of the error
status
number
HTTP status code

404 Not Found

Returned when the series does not exist:
{
  "error": {
    "message": "Series not found",
    "status": 404
  }
}

500 Internal Server Error

Returned when there’s a server-side error:
{
  "error": {
    "message": "Internal server error",
    "status": 500
  }
}

Implementation Notes

  • This endpoint uses Laravel’s apiResource routing with nested resources
  • The controller proxies requests to the MediaStream API service
  • Images are served from the MediaStream CDN at https://platform-static.cdn.mdstrm.com
  • The response structure wraps the seasons array in a data key

Create Season

Add a new season to the series

Get Season

Retrieve a specific season by ID

List Series

View all available series

List Episodes

View episodes for a season

Build docs developers (and LLMs) love