Rest API
  • Odoo REST API: Version 1.0 documentation
  • Connection
    • Configuration
    • Demo
    • Logging In
      • How you can do
        • Odoo Version Information
        • Oauth1 Authentication
        • OAuth2 Authentication
        • Basic Authentication
  • Calling Methods
    • Check Access Rights
    • List Records
      • Pagination
    • Count Records
    • Read Records
      • Read Single Record
      • Read List Records
      • Read Filter Records
    • Listing Record Fields
    • Create Records
    • Update Records
      • Update Single Record
      • Update List Records
    • Delete Records
      • Delete Single Record
      • Delete List Records
  • Report Printing
    • Print Single Report
    • Print List Reports
  • Inspection and Introspection
    • ir.model
    • ir.model.fields
Powered by GitBook
On this page
  1. Calling Methods
  2. List Records

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>
PreviousList RecordsNextCount Records

Last updated 1 year ago