Authored by Dmytro Katyukha

Odoo JSON-RPC specification

Odoo json-rpc specification

This is basic description of Odoo JSON-RPC protocol

JSON-RPC requests should look like

HTTP request structure:

        "jsonrpc": "2.0",
        "method": "call",
        "params": {
            "service": odoo_service,
            "method": odoo_method,
            "args": odoo_args,
        "id": random.randint(0, 1000000000),


Term Description
odoo_service one of Odoo services
odoo_method method of selected odoo_service
odoo_args arguments for selected odoo_method. must be list.

Available Odoo services:

Service Description
common Common methods (server info, login, etc)
db database management service
object Access odoo models

Odoo Service common

This service has following methods

  • login(db, login, password) -> User ID
    • Login to Odoo and return ID of user on success
  • authenticate(db, login, password, user_agent_env)
    • Verifies and returns the user ID corresponding to the given login and password combination, or False if there was no matching user.
    • param str db: the database on which user is trying to authenticate
    • param str login: username
    • param str password: user password
    • param dict user_agent_env: environment dictionary describing any relevant environment attributes
    • return int
  • version() -> Odoo Version
    • Return dict with following keys:
      • server_version
      • server_version_info
      • server_serie
      • protocol_version
  • about()

Odoo Service db

This service has following methods

  • create_database(master_password, dbname, demo, lang, ...)
  • `duplicate_database(master_password, db_original_date, db_name)
  • drop(master_password, db_name)
  • restore(master_password, db_name, data, copy=False)
  • rename(master_password, old_name, new_name)
  • db_exists(db_name) - check if database exists
  • list() - list databases
  • server_version()

Odoo Service object

This service has following methods

  • execute(db, user_id, password, model_name, method, *args)
    • *args means any number of positional arguments for method method called on model model_name
  • execute_kw(db, user_id, password, model_name, method, args, kw)
    • args - list of positional arguments
    • kw - dict with parametrs (keyword arguments)
dummy.txt 5 Bytes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment