v1

latestOpenAPI 3.1.02026-07-176914.2 KB

Update a movie by ID

Update the details of an existing movie by providing a movie ID

put/movies/{id}

Path parameters

idstring required

Movie ID

Request body

idnumber

Movie ID

namestring

Movie name

yearinteger

Release year

ratingnumber

Rating

directorstring

Director

Example request

{
  "id": 1,
  "name": "Inception",
  "year": 2010,
  "rating": 7.5,
  "director": "Christopher Nolan"
}

Response

Movie updated successfully

statusinteger required

Response status code

errorstring

Error message, if any

Example response

{
  "status": 200,
  "data": {
    "id": 1,
    "name": "Inception",
    "year": 2010,
    "rating": 7.5,
    "director": "Christopher Nolan"
  }
}