GET /api/demo/movies
HTTP 200 OK
{
"count": 6,
"page": 1,
"page_size": 30,
"total_pages": 1,
"results": [
{
"id": 1,
"name": "Star Wars IV: A New Hope",
"price": "14.99",
"created_at": "2024-09-09T21:29:41.584Z",
"updated_at": "2024-09-09T21:29:41.584Z",
"main_genre": {
"id": 1,
"name": "Action"
},
"genres": [
],
"genres.count": 0,
"users": [
{
"id": 1,
"login": "example"
},
{
"id": 2,
"login": "admin"
}
],
"users.count": 2,
"description": "",
"cover": null,
"pictures": [
]
},
{
"id": 2,
"name": "The Dark Knight",
"price": "13.99",
"created_at": "2024-09-09T21:29:41.585Z",
"updated_at": "2024-09-09T21:29:41.585Z",
"main_genre": {
"id": 1,
"name": "Action"
},
"genres": [
],
"genres.count": 0,
"users": [
{
"id": 1,
"login": "example"
}
],
"users.count": 1,
"description": "",
"cover": null,
"pictures": [
]
},
{
"id": 3,
"name": "The Lord of the Rings: The Fellowship of the Ring",
"price": "12.99",
"created_at": "2024-09-09T21:29:41.586Z",
"updated_at": "2024-09-09T21:29:41.586Z",
"main_genre": {
"id": 5,
"name": "Adventure"
},
"genres": [
],
"genres.count": 0,
"users": [
{
"id": 2,
"login": "admin"
}
],
"users.count": 1,
"description": "",
"cover": null,
"pictures": [
]
},
{
"id": 4,
"name": "The Matrix",
"price": "14.5",
"created_at": "2024-09-09T21:29:41.587Z",
"updated_at": "2024-09-09T21:29:41.587Z",
"main_genre": {
"id": 1,
"name": "Action"
},
"genres": [
],
"genres.count": 0,
"users": [
{
"id": 2,
"login": "admin"
}
],
"users.count": 1,
"description": "",
"cover": null,
"pictures": [
]
},
{
"id": 5,
"name": "The Avengers",
"price": "7.0",
"created_at": "2024-09-09T21:29:41.588Z",
"updated_at": "2024-09-09T21:29:41.588Z",
"main_genre": {
"id": 1,
"name": "Action"
},
"genres": [
],
"genres.count": 0,
"users": [
],
"users.count": 0,
"description": "",
"cover": null,
"pictures": [
]
},
{
"id": 6,
"name": "Inception",
"price": "15.99",
"created_at": "2024-09-09T21:29:41.589Z",
"updated_at": "2024-09-09T21:29:41.589Z",
"main_genre": {
"id": 4,
"name": "Fantasy"
},
"genres": [
],
"genres.count": 0,
"users": [
],
"users.count": 0,
"description": "",
"cover": null,
"pictures": [
]
}
]
}
<?xml version="1.0" encoding="UTF-8"?>
<hash>
<count type="integer">6</count>
<page type="integer">1</page>
<page-size type="integer">30</page-size>
<total-pages type="integer">1</total-pages>
<results type="array">
<result>
<id type="integer">1</id>
<name>Star Wars IV: A New Hope</name>
<price type="decimal">14.99</price>
<created-at type="dateTime">2024-09-09T21:29:41Z</created-at>
<updated-at type="dateTime">2024-09-09T21:29:41Z</updated-at>
<main-genre>
<id type="integer">1</id>
<name>Action</name>
</main-genre>
<genres type="array"/>
<genres.count type="integer">0</genres.count>
<users type="array">
<user>
<id type="integer">1</id>
<login>example</login>
</user>
<user>
<id type="integer">2</id>
<login>admin</login>
</user>
</users>
<users.count type="integer">2</users.count>
<description></description>
<cover nil="true"/>
<pictures type="array"/>
</result>
<result>
<id type="integer">2</id>
<name>The Dark Knight</name>
<price type="decimal">13.99</price>
<created-at type="dateTime">2024-09-09T21:29:41Z</created-at>
<updated-at type="dateTime">2024-09-09T21:29:41Z</updated-at>
<main-genre>
<id type="integer">1</id>
<name>Action</name>
</main-genre>
<genres type="array"/>
<genres.count type="integer">0</genres.count>
<users type="array">
<user>
<id type="integer">1</id>
<login>example</login>
</user>
</users>
<users.count type="integer">1</users.count>
<description></description>
<cover nil="true"/>
<pictures type="array"/>
</result>
<result>
<id type="integer">3</id>
<name>The Lord of the Rings: The Fellowship of the Ring</name>
<price type="decimal">12.99</price>
<created-at type="dateTime">2024-09-09T21:29:41Z</created-at>
<updated-at type="dateTime">2024-09-09T21:29:41Z</updated-at>
<main-genre>
<id type="integer">5</id>
<name>Adventure</name>
</main-genre>
<genres type="array"/>
<genres.count type="integer">0</genres.count>
<users type="array">
<user>
<id type="integer">2</id>
<login>admin</login>
</user>
</users>
<users.count type="integer">1</users.count>
<description></description>
<cover nil="true"/>
<pictures type="array"/>
</result>
<result>
<id type="integer">4</id>
<name>The Matrix</name>
<price type="decimal">14.5</price>
<created-at type="dateTime">2024-09-09T21:29:41Z</created-at>
<updated-at type="dateTime">2024-09-09T21:29:41Z</updated-at>
<main-genre>
<id type="integer">1</id>
<name>Action</name>
</main-genre>
<genres type="array"/>
<genres.count type="integer">0</genres.count>
<users type="array">
<user>
<id type="integer">2</id>
<login>admin</login>
</user>
</users>
<users.count type="integer">1</users.count>
<description></description>
<cover nil="true"/>
<pictures type="array"/>
</result>
<result>
<id type="integer">5</id>
<name>The Avengers</name>
<price type="decimal">7.0</price>
<created-at type="dateTime">2024-09-09T21:29:41Z</created-at>
<updated-at type="dateTime">2024-09-09T21:29:41Z</updated-at>
<main-genre>
<id type="integer">1</id>
<name>Action</name>
</main-genre>
<genres type="array"/>
<genres.count type="integer">0</genres.count>
<users type="array"/>
<users.count type="integer">0</users.count>
<description></description>
<cover nil="true"/>
<pictures type="array"/>
</result>
<result>
<id type="integer">6</id>
<name>Inception</name>
<price type="decimal">15.99</price>
<created-at type="dateTime">2024-09-09T21:29:41Z</created-at>
<updated-at type="dateTime">2024-09-09T21:29:41Z</updated-at>
<main-genre>
<id type="integer">4</id>
<name>Fantasy</name>
</main-genre>
<genres type="array"/>
<genres.count type="integer">0</genres.count>
<users type="array"/>
<users.count type="integer">0</users.count>
<description></description>
<cover nil="true"/>
<pictures type="array"/>
</result>
</results>
</hash>
Path | Verb | Controller#Action |
---|---|---|
movies | GET | api/demo/movies#index |
movies | POST | api/demo/movies#create |
movies | PUT | api/demo/movies#update_all |
movies | PATCH | api/demo/movies#update_all |
movies | DELETE | api/demo/movies#destroy_all |
movies | OPTIONS | api/demo/movies#options |
movies/:id | GET | api/demo/movies#show |
movies/:id | PUT | api/demo/movies#update |
movies/:id | PATCH | api/demo/movies#update |
movies/:id | DELETE | api/demo/movies#destroy |