Skip to content

Movies_put

Luigi Minardi edited this page Mar 2, 2022 · 1 revision

Return to Movies

Update movie with given pk

Change data of movie with specified pk. You can pass all the fields or just the fields you want to change.

Endpoint: /:pk

Request:

This endpoint need login.

This endpoint is Admin Only.

If you're using postman or insomnia to check the API remember to put the token of the logged user on the header, as Authorization: Bearer <token>.

Request Body:
{
    "title": "My Movie With New Name",
    "description": "The other description was bad so this is a new one",
    "popularity": 6.5
}
Response Body:
Response code: 200
{
	"msg": "Movie with id 2 was updated."
}