Marbles


GET /api/demo/marbles
HTTP 200 OK
{
  "count": 6,
  "page": 1,
  "page_size": 30,
  "total_pages": 1,
  "results": [
    {
      "id": 1,
      "name": "Example Marble 1",
      "radius_mm": 10,
      "price": "4.0",
      "is_discounted": false,
      "created_at": "2024-10-25T22:08:21.588Z",
      "updated_at": "2024-10-25T22:08:21.588Z",
      "user": {
        "id": 1,
        "login": "example"
      },
      "description": "",
      "picture": null
    },
    {
      "id": 2,
      "name": "Example Marble 2",
      "radius_mm": 8,
      "price": "8.0",
      "is_discounted": false,
      "created_at": "2024-10-25T22:08:21.588Z",
      "updated_at": "2024-10-25T22:08:21.588Z",
      "user": {
        "id": 1,
        "login": "example"
      },
      "description": "",
      "picture": null
    },
    {
      "id": 3,
      "name": "Admin Marble 1",
      "radius_mm": 11,
      "price": "9.23",
      "is_discounted": false,
      "created_at": "2024-10-25T22:08:21.592Z",
      "updated_at": "2024-10-25T22:08:21.592Z",
      "user": {
        "id": 2,
        "login": "admin"
      },
      "description": "",
      "picture": null
    },
    {
      "id": 4,
      "name": "Admin Marble 2",
      "radius_mm": 20,
      "price": "149.23",
      "is_discounted": false,
      "created_at": "2024-10-25T22:08:21.592Z",
      "updated_at": "2024-10-25T22:08:21.592Z",
      "user": {
        "id": 2,
        "login": "admin"
      },
      "description": "",
      "picture": null
    },
    {
      "id": 5,
      "name": "Orphan Marble 1",
      "radius_mm": 300,
      "price": "4000.0",
      "is_discounted": false,
      "created_at": "2024-10-25T22:08:21.594Z",
      "updated_at": "2024-10-25T22:08:21.594Z",
      "description": "",
      "picture": null
    },
    {
      "id": 6,
      "name": "Orphan Marble 2",
      "radius_mm": 314,
      "price": "5000.0",
      "is_discounted": false,
      "created_at": "2024-10-25T22:08:21.595Z",
      "updated_at": "2024-10-25T22:08:21.595Z",
      "description": "",
      "picture": null
    }
  ]
}
<?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>Example Marble 1</name>
      <radius-mm type="integer">10</radius-mm>
      <price type="decimal">4.0</price>
      <is-discounted type="boolean">false</is-discounted>
      <created-at type="dateTime">2024-10-25T22:08:21Z</created-at>
      <updated-at type="dateTime">2024-10-25T22:08:21Z</updated-at>
      <user>
        <id type="integer">1</id>
        <login>example</login>
      </user>
      <description></description>
      <picture nil="true"/>
    </result>
    <result>
      <id type="integer">2</id>
      <name>Example Marble 2</name>
      <radius-mm type="integer">8</radius-mm>
      <price type="decimal">8.0</price>
      <is-discounted type="boolean">false</is-discounted>
      <created-at type="dateTime">2024-10-25T22:08:21Z</created-at>
      <updated-at type="dateTime">2024-10-25T22:08:21Z</updated-at>
      <user>
        <id type="integer">1</id>
        <login>example</login>
      </user>
      <description></description>
      <picture nil="true"/>
    </result>
    <result>
      <id type="integer">3</id>
      <name>Admin Marble 1</name>
      <radius-mm type="integer">11</radius-mm>
      <price type="decimal">9.23</price>
      <is-discounted type="boolean">false</is-discounted>
      <created-at type="dateTime">2024-10-25T22:08:21Z</created-at>
      <updated-at type="dateTime">2024-10-25T22:08:21Z</updated-at>
      <user>
        <id type="integer">2</id>
        <login>admin</login>
      </user>
      <description></description>
      <picture nil="true"/>
    </result>
    <result>
      <id type="integer">4</id>
      <name>Admin Marble 2</name>
      <radius-mm type="integer">20</radius-mm>
      <price type="decimal">149.23</price>
      <is-discounted type="boolean">false</is-discounted>
      <created-at type="dateTime">2024-10-25T22:08:21Z</created-at>
      <updated-at type="dateTime">2024-10-25T22:08:21Z</updated-at>
      <user>
        <id type="integer">2</id>
        <login>admin</login>
      </user>
      <description></description>
      <picture nil="true"/>
    </result>
    <result>
      <id type="integer">5</id>
      <name>Orphan Marble 1</name>
      <radius-mm type="integer">300</radius-mm>
      <price type="decimal">4000.0</price>
      <is-discounted type="boolean">false</is-discounted>
      <created-at type="dateTime">2024-10-25T22:08:21Z</created-at>
      <updated-at type="dateTime">2024-10-25T22:08:21Z</updated-at>
      <description></description>
      <picture nil="true"/>
    </result>
    <result>
      <id type="integer">6</id>
      <name>Orphan Marble 2</name>
      <radius-mm type="integer">314</radius-mm>
      <price type="decimal">5000.0</price>
      <is-discounted type="boolean">false</is-discounted>
      <created-at type="dateTime">2024-10-25T22:08:21Z</created-at>
      <updated-at type="dateTime">2024-10-25T22:08:21Z</updated-at>
      <description></description>
      <picture nil="true"/>
    </result>
  </results>
</hash>
Path Verb Controller#Action
marbles GET api/demo/marbles#index
marbles POST api/demo/marbles#create
marbles PUT api/demo/marbles#update_all
marbles PATCH api/demo/marbles#update_all
marbles DELETE api/demo/marbles#destroy_all
marbles OPTIONS api/demo/marbles#options
marbles/:id GET api/demo/marbles#show
marbles/:id PUT api/demo/marbles#update
marbles/:id PATCH api/demo/marbles#update
marbles/:id DELETE api/demo/marbles#destroy
marbles/:id/adjust_price PATCH api/demo/marbles#adjust_price
marbles/:id/toggle_is_discounted PATCH api/demo/marbles#toggle_is_discounted