Docs (v1.0)

Download OpenAPI specification:Download

movies

get movie

get /{id}
http://127.0.0.1:3000/api/v1.0/movies/{id}
path Parameters
id
required
integer [ 1 .. 9007199254740991 ]

Responses

200
Response Schema: application/json
id
integer
name
string
released_at
string
rating
number
400

Invalid or insufficient request data. Please modify the request in order to proceed

500

Please, contact official support. Don't repeat the request in the nearest future.

Request samples

Copy

const axios = require('axios');

return axios.get({
  url: 'http://127.0.0.1:3000/api/v1.0/movies/4877167574531982',
  headers: {},
  params: {},
}).then(function(response) {
  console.log(response.data);
  console.log(response.status);
  console.log(response.headers);
}).catch(function(err) {
  if(err.response) {
    console.log(err.response.data);
    console.log(err.response.status);
    console.log(err.response.headers);
  }
});

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "name": "string",
  • "released_at": "string",
  • "rating": 0
}

update a movie

put /{id}
http://127.0.0.1:3000/api/v1.0/movies/{id}
path Parameters
id
required
integer [ 1 .. 9007199254740991 ]
header Parameters
content-type
string <media-type> (application/json)
Request Body schema: application/json
name
string^[a-zA-Z0-9 ]+$
description
string <= 256 characters
released_at
string <date>

Responses

200
Response Schema: application/json
id
integer
name
string
released_at
string
rating
number
400

Invalid or insufficient request data. Please modify the request in order to proceed

500

Please, contact official support. Don't repeat the request in the nearest future.

Request samples

application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "description": "string",
  • "released_at": "2019-02-24"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "name": "string",
  • "released_at": "string",
  • "rating": 0
}

delete movie

delete /{id}
http://127.0.0.1:3000/api/v1.0/movies/{id}
path Parameters
id
required
integer [ 1 .. 9007199254740991 ]

Responses

204
400

Invalid or insufficient request data. Please modify the request in order to proceed

410

resource does not exist or is already deleted

500

Please, contact official support. Don't repeat the request in the nearest future.

Request samples

Copy

const axios = require('axios');

return axios.delete({
  url: 'http://127.0.0.1:3000/api/v1.0/movies/597197115367036',
  headers: {},
  params: {},
}).then(function(response) {
  console.log(response.data);
  console.log(response.status);
  console.log(response.headers);
}).catch(function(err) {
  if(err.response) {
    console.log(err.response.data);
    console.log(err.response.status);
    console.log(err.response.headers);
  }
});

Response samples

application/json
Copy
Expand all Collapse all
null

find movies

get /
http://127.0.0.1:3000/api/v1.0/movies/
query Parameters
_sort
string <= 128 characters ^(-?[a-zA-Z0-9_]+,)*(-?[a-zA-Z0-9_]+){1}$
_limit
integer [ 0 .. 500 ]
Default: 0
_offset
integer >= 0
Default: 0
id
integer [ 1 .. 9007199254740991 ]
name
string^[a-zA-Z0-9 ]+$
released_at
string <date>
rating
number [ 0 .. 10 ]

Responses

200
Response Schema: application/json
Array
id
integer
name
string
released_at
string
rating
number
400

Invalid or insufficient request data. Please modify the request in order to proceed

500

Please, contact official support. Don't repeat the request in the nearest future.

Request samples

Copy

const axios = require('axios');

return axios.get({
  url: 'http://127.0.0.1:3000/api/v1.0/movies',
  headers: {},
  params: {
    _sort: '6M,-8A4Bj5,uq,-uPrV,XTjAWwdXks,-uFr81N_e,-zNb,w7YCJ2uikS',
    _limit: 250,
    _offset: 2036763,
    id: 8745848421536992,
    name: 'QTPA7AIGDl',
    released_at: '2019-02-24T13:55:39.326Z',
    rating: 8,
  },
}).then(function(response) {
  console.log(response.data);
  console.log(response.status);
  console.log(response.headers);
}).catch(function(err) {
  if(err.response) {
    console.log(err.response.data);
    console.log(err.response.status);
    console.log(err.response.headers);
  }
});

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

create a new movie

post /
http://127.0.0.1:3000/api/v1.0/movies/
header Parameters
content-type
string <media-type> (application/json)
Request Body schema: application/json
name
required
string^[a-zA-Z0-9 ]+$
description
required
string <= 256 characters
released_at
required
string <date>

Responses

201

empty response with value of Location header pointing to the created resource

Response Schema: application/json
any
400

Invalid or insufficient request data. Please modify the request in order to proceed

500

Please, contact official support. Don't repeat the request in the nearest future.

Request samples

application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "description": "string",
  • "released_at": "2019-02-24"
}

Response samples

application/json
Copy
Expand all Collapse all
null

delete matching movies

delete /
http://127.0.0.1:3000/api/v1.0/movies/
query Parameters
id
integer [ 1 .. 9007199254740991 ]
name
string^[a-zA-Z0-9 ]+$
released_at
string <date>
rating
number [ 0 .. 10 ]

Responses

204
400

Invalid or insufficient request data. Please modify the request in order to proceed

500

Please, contact official support. Don't repeat the request in the nearest future.

Request samples

Copy

const axios = require('axios');

return axios.delete({
  url: 'http://127.0.0.1:3000/api/v1.0/movies',
  headers: {},
  params: {
    id: 2252248486522092,
    name: 'sAj3',
    released_at: '2019-02-24T13:55:39.331Z',
    rating: 8,
  },
}).then(function(response) {
  console.log(response.data);
  console.log(response.status);
  console.log(response.headers);
}).catch(function(err) {
  if(err.response) {
    console.log(err.response.data);
    console.log(err.response.status);
    console.log(err.response.headers);
  }
});

Response samples

application/json
Copy
Expand all Collapse all
null