Pagination

By default a restapi/1.0/object/{object_name} will return the ids of all records matching the condition, which may be a huge number. offset and limit parameters are available to only retrieve a subset of all matched records.

Request:

GET /restapi/1.0/object/res.partner/search?domain=[('is_company','=',True),('customer','=',True)]&offset=10&limit=5 HTTP/1.1
Host: {your_Odoo_server_url}

JSON Response:

HTTP/1.1 200 OK

{
  'Partner': [
      13, 20, 30, 22, 29
  ]
}

XML Response:

HTTP/1.1 200 OK

<res.partner type="list">
    <item type="int">13</item>
    <item type="int">20</item>
    <item type="int">30</item>
    <item type="int">22</item>
    <item type="int">29</item>
</res.partner>

Last updated