Movie Details

This section provides detailed information about movies from our database. You can view extensive details such as title, URL stream, synopsis, and rating. This feature is designed to offer in-depth insights into each movie, enhancing the user's experience by providing all necessary information in one place.

Endpoint Information

Endpoint URL

{baseUrl}/movie/:id
GET

Required Parameter

To fetch the details of a specific movie, the id parameter is required. This ID should be passed in the URL as shown in the endpoint information above.

Example URL with ID

{baseUrl}/movie/123

Example Response

200 OK - Successful Response

This response indicates that the request was successful and the movie details were retrieved.

{
  "statusCode": 200,
  "status": "success",
  "message": "Movie fetched successfully",
  "results": {
    "id": "123",
    "title": "Inception",
    "genre": "Action",
    "year": 2010,
    "rating": "PG-13",
    "synopsis": "A thief who steals corporate secrets through the use of dream-sharing technology is given the inverse task of planting an idea into the mind of a CEO.",
    "urlStream": "https://example.com/stream/inception"
  }
}

400 Bad Request - Invalid Movie ID Format

This response is returned when the movie ID provided does not meet the expected format.

{
  "statusCode": 400,
  "status": "error",
  "message": "Invalid movie ID format",
  "results": null
}

404 Not Found - Movie Not Found

This response is returned when no movie matches the ID provided in the database.

{
  "statusCode": 404,
  "status": "error",
  "message": "Movie not found",
  "results": null
}

API Demonstration

Try out the Movie Details API with this interactive demonstration. Enter a movie ID below and click the button to make an API call.

API Call Example

import axios from 'axios';

const fetchMovies = async () => {
  try {
    const response = await axios.get('{baseUrl}/api/v1/movie/?&api_token=undefined');
    console.log(response.data);
  } catch (error) {
    console.error('Error fetching movies:', error);
  }
};

fetchMovies();

Please sign in and obtain an API token to use this demonstration.