Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


Oregional Odoo RestAPI endpoint: /orestapi/record/name_search

Search for records of a model by display_name


Sample request
curl -v -i -k -H "Authorization: Bearer vWRXap0Iyojs8hxNO9IQKeWRLFpyhGfU" -X GET -d "model=res.partner" -d "name=Web"

Bearer access_token

Info: oRestAPI authorization header


model name (eg: res.partner, crm.lead, account.invoice, etc)

  • string
  • mandatory


the string to search for

  • string
  • optional


which chunk of the result should be returned

  • integer
  • optional
eg: if offset is 40, than results between 41-60 will be returned

how to order the results

  • string
  • optional
  • default: last_modification

follows Odoo domain conventions, so:

  • default result ordering is ascending, you need to specify only if you want descending order, eg: "name desc"
  • multiple ordering can be given, eg: "name desc, assignee, id"

how many results should be returned

  • integer
  • optional
  • default: 20


Sample response
[{"header": {{"model": "res.partner", "action_id": 121, "menu_id": 91, "count": 4, "offset": 0, "limit": 20}}, {"data": [{"id": 13, "name": "Camptocamp"}, {"id": 31, "name": "Camptocamp, Ayaan Agarwal"}, {"id": 37, "name": "Camptocamp, Benjamin Flores"}, {"id": 30, "name": "Camptocamp, Phillipp Miller"}]}]
ParentKeyValue TypeDescriptionNotes
headerparent element with generic info about the resultset

modelmodelmodel name

action_idintegeraction id to be used for URL generation

An action (ir.actions.act_window) id for the model, integer, eg: 45

menu_idintegermenu id to be used for URL generation

A menu ( id for the model, integer, eg: 312

countintegercount of total results

offsetintegernumber of results to ignore (default: 0)

limitintegermaximum number of records to return (default: 20)

parent element for the list of records

idintegerthe id of the record (eg: 1, 413, 4356, etc)The id of the record in the database, eg: 1, 413, 4356, etc

display_namestringthe display_name of the record (eg: John Doe, etc)The value of the record's display_name as defined by the model's name_get function, eg: "INVOICE/2018/314", "John Doe", "Confluence DC sales opportunity for BigCompany"
  • No labels