Page tree
Skip to end of metadata
Go to start of metadata


Get field values for one or more records using read operation



Request

Sample request
https://example.com/orestapi/record/read?model=project.task&ids=[30,33]&fields=["name", "id","write_date","write_uid"]
ItemDescriptionNotes
endpoint/orestapi/record/read
typeGET
Header
Authorization

Bearer access_token

See ORESTAPI authorization header

Params
model

the related model

  • string
  • mandatory
  • sample: project.task

Required parameter, if not supplied, than the request will be denied

ids

list of record ids

  • list of integers
  • mandatory
  • sample: [30,33]

Required parameter, if not supplied, than the request will be denied

Use one item in the list if you need only one record

Non-existing ids will be ignored

fields

list of fields for which the value should be returned

  • list of strings
  • optional
  • sample: ["name", "id","write_date","write_uid"]

If empty, than all fields are returned which can be a huge list

Non-existing field names will be ignored



Response

id is always returned


Sample response
[{"header": {"action_id": 203, "model": "project.task", "menu_id": 138}}, {"data": [{"name": "Integration of core components", "write_uid": [1, "Administrator"], "write_date": "2018-07-12 08:42:13", "id": 30}, {"name": "Create new components", "write_uid": [1, "Administrator"], "write_date": "2018-07-12 08:42:13", "id": 33}]}]
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 (ir.ui.menu) id for the model, integer, eg: 312

data

parent element for the list of records

  • No labels