Skip to content

Movies_post

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

Return to Movies

Create new movie

Create a new movie on the database.

Endpoint: /

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",
    "description": "This is a movie",
    "adult": true,
    "popularity": 7,
    "image": "http:/your.site/image-folder/any.jpg",
    "date": "2022-02-24 15:42:47"
}
Response Body:
Response code: 201
{
    "msg": "My Movie, created!"
}