ORESTAPI record read
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"]
Item | Description | Notes |
---|---|---|
endpoint | /orestapi/record/read | |
type | GET | |
Header | ||
Authorization | Bearer access_token | |
Params | ||
model | the related model
| Required parameter, if not supplied, than the request will be denied |
ids | list of record ids
| 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
| 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}]}]
Parent | Key | Value Type | Description | Notes |
---|---|---|---|---|
header | parent element with generic info about the resultset | |||
model | model | model name | ||
action_id | integer | action id to be used for URL generation | An action (ir.actions.act_window) id for the model, integer, eg: 45 | |
menu_id | integer | menu 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 |