Skip to Content
Menu

Rest API Read

by
Odoo

29.99

v 18.0 Third Party
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 2
Technical Name mrm_rest_api_read
LicenseLGPL-3
You bought this module and need support? Click here!

Rest API All System Read

REST API Documentation



Logged-in session

## Authentication
'''URL
/web/session/authenticate
```json
{
    "jsonrpc": "2.0",
    "params": {
        "db": "odoo",
        "login": "",
        "password": ""
    }
}

## Current Session info
'''URL
/web/session/get_session_info

## Logout
'''URL
/web/session/destroy


Use Odoo API keys.

**Header**
```
Authorization: Bearer (API_KEY)
Content-Type: application/json
```

Odoo applies normal access rights and record rules of the authenticated user.

## Endpoints

Base URL:
```
/api/(slug)
```

### Health
- **GET** `/api/health` → `{ "status": "ok" }`

### List
- **GET** `/api/(slug)?domain=(py-list)&fields=a,b,c&limit=80&offset=0&order=create_date desc`
- **Response**
```json
{
    "count": 2,
    "total": 125,
    "limit": 80,
    "offset": 0,
    "results": [ { /* record with M2O expanded */ }, ... ]
}
```

**Notes**
- `domain` is a Python-style list, e.g. `[("state", "=", "sale")]` URL-encoded.
- `fields` is optional; if omitted, all readable fields are returned.

### Retrieve
- **GET** `/api/(slug)/(id)
- **Response**: a single record dict with many2one expanded.

## Examples

### 1) List confirmed sale orders (id, name, partner)
```
GET /api/sale_order?domain=[("state","=","sale")]&fields=id,name,partner_id
Authorization: Bearer (API_KEY)
```
**Response**
```json
{
    "count": 1,
    "total": 1,
    "limit": 80,
    "offset": 0,
    "results": [
    {"id": 5, "name": "SO005", "partner_id": {"id": 12, "name": "Azure Interior"}}
    ]
}

## Error format
```json
{"error": "message"}
```



                

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.