odoo/odoo#197801
Created by SM Learn, Julien Castiaux (juc)
Merged
at 0afec0db8a19971c9581c6221939d583ceeaa5e8
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Overridden by @rco-odoo
- ci/l10n: (runtime 0s)
Linked pull requests
- label
- odoo-dev:master-json2rpc-juc
- head
- bec61f25e364bb4ed453f7af8203f4ad3032eb90
- merged
- 4 months ago by SM Learn, Julien Castiaux (juc)
odoo/odoo | odoo/enterprise | |
---|---|---|
master | #197801 | #80365 |
[IMP] web: /json/2/<model>/<method>
A RPC endpoint that supports API Key.
Request:
POST /json/2/res.partner/read HTTP/1.1
Host: <yourcompany>.odoo.com
Authorization: bearer <api-key>
Content-Type: application/json
{
"ids": [3, 4],
"kwargs": {
"fields": ["name"]
},
"context": {}
}
Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{"id": 3, "name": "Mitchell Admin"},
{"id": 4, "name": "Public user"}
]
Error responses use proper HTTP codes!
HTTP/1.1 422 UNPROCESSABLE ENTITY
Content-Type: application/json; charset=utf-8
"got an unexpected keyword argument 'badparameter'"