Record data is accessible via the search_read() (shortcut which as its name suggests is equivalent to a search() followed by a read(), but avoids having to perform two requests and keep ids around).
It takes similar arguments of search() and optionally a list of fields to fetch. By default, it will fetch all the records and relevant fields the current user can read, which tends to be a huge amount.
GET /restapi/1.0/object/{object_name}/?domain={comma_separated_list_of_args}
Request:
GET /restapi/1.0/object/res.partner?domain=[('is_company','=',True),('customer','=',True)] HTTP/1.1
Host: {your_Odoo_server_url}
domain – OPTIONAL. A search domain. Use an empty list to match all records.
fields – OPTIONAL. list of field names to return (default is all fields).
offset – OPTIONAL. Number of results to ignore (default: none)
limit – OPTIONAL. Maximum number of records to return (default: all)
order – OPTIONAL. Sort string
count – OPTIONAL. if True, only counts and returns the number of matching records (default: False)
Headers and Status Codes
Description
Request Headers
Response Headers
Status Codes
Conversely, picking only three fields deemed interesting.
Request:
GET /restapi/1.0/object/res.partner?domain=[('is_company','=',True),('customer','=',True)]&fields=['name','country_id']&limit=5 HTTP/1.1
Host: {your_Odoo_server_url}