Siirry sisältöön
Odoo Menu
  • Kirjaudu sisään
  • Kokeile ilmaiseksi
  • Sovellukset
    Talous
    • Kirjanpito
    • Laskutus
    • Kulut
    • Datataulukot (BI)
    • Asiakirjat
    • Allekirjoita
    Myynti
    • CRM
    • Myynti
    • Kassajärjestelmä myymälään
    • Kassajärjestelmä ravintolaan
    • Tilaukset
    • Vuokraus
    Verkkosivut
    • Verkkosivun Rakennustyökalu
    • Verkkokauppa
    • Blogi
    • Foorumi
    • Livechat
    • Verkko-oppiminen
    Toimitusketju
    • Varastointi
    • Tuotanto
    • Tuotteen elinkaaren hallinta (PLM)
    • Ostot
    • Huolto
    • Laatu
    Henkilöstöhallinto
    • Työntekijät
    • Rekrytointi
    • Vapaat
    • Arvioinnit
    • Suositukset
    • Kuljetuskalusto
    Markkinointi
    • Somemarkkinointi
    • Sähköpostimarkkinointi
    • Tekstiviestimarkkinointi
    • Tapahtumat
    • Markkinoinnin automaatio
    • Kyselyt
    Palvelut
    • Projekti
    • Työaikakirjaukset
    • Kenttähuolto
    • Asiakaspalvelu
    • Suunnittelu
    • Ajanvaraukset
    Tuottavuus
    • Viestintä
    • Hyväksynnät
    • IoT
    • IP-puhe
    • Tietokirjasto
    • WhatsApp
    Kolmannen osapuolen sovellukset Odoo-Studio Odoo-Pilvialusta
  • Toimialat
    Vähittäiskauppa
    • Kirjakauppa
    • Vaatekauppa
    • Huonekaluliike
    • Ruokakauppa
    • Laitteistokauppa
    • Lelukauppa
    Ruoka & Majoitus
    • Baari ja Pubi
    • Ravintola
    • Pikaruoka
    • Majatalo
    • Juomien jakelija
    • Hotelli
    Kiinteistöt
    • Kiinteistönvälitystoimisto
    • Arkkitehtitoimisto
    • Rakentaminen
    • Kiinteistönhallinta
    • Puutarhanhoito
    • Kiinteistön omistajien yhdistys
    Konsultointi
    • Tilitoimisto
    • Odoo-kumppani
    • Markkinointitoimisto
    • Lakitoimisto
    • Osaajahankinta
    • Tilintarkastus & sertifiointi
    Tuotanto
    • Tekstiili
    • Metalli
    • Huonekalut
    • Ruoka
    • Panimo
    • Yrityslahjat
    Terveys & Liikunta
    • Urheiluseura
    • Silmälasiliike
    • Kuntokeskus
    • Hyvinvointialan ammattilaiset
    • Apteekki
    • Kampaamo
    Kaupat
    • Yleismies
    • IT-laitteisto & Tuki
    • Aurinkoenergiajärjestelmät
    • Suutari
    • Siivouspalvelut
    • LVI-palvelut
    Muut
    • Voittoa tavoittelematon järjestö
    • Ympäristötoimisto
    • Mainostaulujen vuokraus  
    • Valokuvaus
    • Leasing-pyörät
    • Ohjelmistojen jälleenmyyjä
    Selaa kaikkia toimialoja
  • Yhteisö
    Opi
    • Kurssit
    • Dokumentaatio
    • Todistukset
    • Koulutus
    • Blogi
    • Podcast
    Kannusta kouluttautumaan
    • Koulutusohjelmat
    • Scale Up! Liiketoimintapeli
    • Vieraile Odoolla
    Hanki ohjelmisto
    • Lataa
    • Vertaile versioita
    • Julkaisut
    Tee yhteistyötä
    • Github
    • Foorumi
    • Tapahtumat
    • Käännökset
    • Ryhdy kumppaniksi
    • Kumppanipalvelut
    • Rekisteröi tilitoimistosi
    Hanki palveluja
    • Löydä kumppani
    • Löydä kirjanpitäjä
    • Varaa asiantuntijatapaaminen
    • Implementaatiopalvelut
    • Asiakasreferenssit
    • Tuki
    • Versionkorotukset
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Varaa demo
  • Hinnoittelu
  • Asiakaspalvelu

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Kirjanpito
  • Varastointi
  • PoS
  • Projekti
  • MRP
All apps
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Apua

External API documentation (JSON-RPC)

Tilaa

Saat ilmoituksen, kun tähän viestiin ilmaantuu aktiviteettia

Tämä kysymys on merkitty
documentationapijsonrpcExternalAPI
7 Vastaukset
32583 Näkymät
Avatar
Allan

I have a big pet peeve with Odoo documentation. I have previously worked with XML-RPC but is now switching to JSON-RPC. But I have always struggled to find good documentation. Only a few simple examples are to be found online - and often in some SDK of a certain language - not language-agnostic so that anyone can figure it out for their language. So I have a couple of core questions:


1. Why are there absolutely no instructions on how to find out which methods, fields and values are available in a JSON-RPC call? At the very minimum it could be stated that one can inspect the network requests in the browser to see examples...!


2. Why is there no explanation of the difference between the JSON-RPC API calls used in the browser and the JSON-RPC API meant for external use? This could help translating the browser requests into normal JSON-RPC requests.


This makes it very difficult (= very time consuming => waste of money) for people unfamiliar with Odoo to make integrations to it. A very undesirable effect.

2
Avatar
Hylkää
MARCO FABIAN ARREOLA PEREZ

The same experience. However i had the task done thanks to some LLM. You can use claude or grok. Somehow they know how it works. I am not a chatgpt fan

Avatar
Ray Carnes (ray)
Paras vastaus

For Odoo 19 and higher, please review https://www.odoo.com/documentation/19.0/developer/reference/external_api.html

There is now a /doc endpoint that dynamically generates documentation on the models, fields and methods available for a specific database.



You might also want to know about the Odoo Language Server at https://github.com/odoo/odoo-ls that provides autocompletion, file validation, hover requests, go to definition, and more for VS Code, PyCharm, Vim and Zed.


1
Avatar
Hylkää
Allan
Tekijä

Finally! Now I just have to wait for my community server to be upgraded to 19....!

Avatar
Nikolaus Weingartmair
Paras vastaus

My 2 cents on the topic. 
Some tipps for beginners (which would have been very helpful for me:

If you want to create a simple interface for JSON RPC and are lucky enough to have python:


The plane request to create it in a different language (here in postman):
1) get Authentication (Then the Credentials get stored as cookies, standard web auth)

where newstart9 is your database name and admin admin are your username and password

2) Then you can, like in rest, create update(write in odoo), delete like in REST

http://localhost:8069/web/dataset/call_kw/forum.post/create
{

"id": 5,

"jsonrpc": "2.0",

"method": "call",

"params": {

"model": "forum.post",

"method": "create",

"args": [

{

"name": "PowerPoint Karaoke",

"subtitle": "Die besten Erfindungen der Neuzeit"

}

]

}


Why Json-RPC is cool:
The permission concept of odoo is honored, that means you don't have to worry about it, if the user has permissions he get's the data if he doesn't he won't get it.

And most importantly you are not limited to create, update, you basically can do everything your user has permission to do. So together with minor odoo developments it's very easy to achive complex workflows compared to the very limited cumbersome REST capabilites where you need a lot of development to do basic things.

But of course you can't get Swagger/OpenAPI interface files for JSON-RPC, correct em if I'm wrong.

You could use 
https://github.com/OCA/rest-framework than you get swagger/OpenAPI Interface but you still have to create everything yourself. 

There are also some commercial Products 
https://apps.odoo.com/apps/modules/18.0/muk_rest should be good, but never really used it myself.

As a Bonus: if you only need to get access to data have a look at web_search_read, it's a not well documented feature of odoo which they use heavily inhouse. It's basically graphql for odoo. So you tell him exactly what you need spanning multiple related models and he gives you just that. If you have to do some more complex requirements - you will save yourself a lot of tears and work compared to an REST based approach not speaking of speed as you need for the same request a lot REST requests ...

0
Avatar
Hylkää
Avatar
Sébastien Feugère
Paras vastaus

NOTE: would have like to use the "commenting tool", but I don't have enough XP for that, so here is a non-answer :)

All the external ressources (tutorial, YouTube videos) are useful.

This is not enough, though: why the APIs does not have a clear auto-generated documentation? It makes it's usage overcomplicated. Also, the lack of examples makes things incredibly experimental. 

I had to rely on alternative documentation content from GitHub (created by the community, see link) to understand things. I think it could be reviewed by the Odoo team and merged to the existing doc. That would be very helpful for newcomers.

  • https://github.com/amlaksil/Odoo-JSON-RPC-API/

It's also confusing and not clear why the "External API" and "Web Services" docs are separated.

  • https://www.odoo.com/documentation/17.0/developer/reference/external_api.html#
  • https://www.odoo.com/documentation/master/developer/howtos/web_services.html


0
Avatar
Hylkää
Avatar
Martin Krafft
Paras vastaus

(tried to use the "commenting tool", but that doesn't seem to work, so here is a non-answer:)

I can relate. We're migrating to Odoo DMS from Paperless, and this means I have to script the transfer of a couple tens of thousand documents, while preserving the metadata, such as tags, correspondents, notes, etc..

I've looked around but I cannot find a proper API description, nor any actual examples. It seems the external API is a simple wrapper around the models, but how do I get a list of models, and of the fields, and yes, it would really be useful to have an example of e.g. creating a DMS record with some tags and notes using the API.

0
Avatar
Hylkää
Avatar
Niyas Raphy (Walnut Software Solutions)
Paras vastaus

Hi,
See this tutorial about json rpc in odoo:  Odoo JSON RPC

Thanks

0
Avatar
Hylkää
Avatar
Sébastien Denis
Paras vastaus

Did you find any valuable documentation ? Looking for the same stuff without success

0
Avatar
Hylkää
Niyas Raphy (Walnut Software Solutions)

see: https://www.youtube.com/watch?v=J61gRPVSex4

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Paras vastaus

Hi,
Refer to the following documentation
https://www.cybrosys.com/blog/how-to-configure-the-json-rpc-api-in-odoo-15

https://www.cybrosys.com/blog/how-to-configure-json-rpc-and-xml-rpc-using-postman-for-sending-api-requests


Hope it helps

-1
Avatar
Hylkää
Nautitko keskustelusta? Älä vain lue, vaan osallistu!

Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!

Rekisteröidy
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
Odoo JSON-RPC API
api jsonrpc
Avatar
0
helmik. 25
2878
Endpoint for external API
api ExternalAPI
Avatar
Avatar
1
toukok. 24
7917
What is the syntax for Update in JSON External API?
jsonrpc ExternalAPI
Avatar
1
marrask. 22
7172
What is the API endpoint for JSON-RPC?
api jsonrpc
Avatar
0
lokak. 20
5813
jsonrpc bulk write
api odoo jsonrpc
Avatar
Avatar
1
huhtik. 25
1896
Yhteisö
  • Kurssit
  • Dokumentaatio
  • Foorumi
Avoin lähdekoodi
  • Lataa
  • Github
  • Runbot
  • Käännökset
Palvelut
  • Odoo.sh hosting
  • Tuki
  • Versionkorotus
  • Räätälöidyt kehitykset
  • Koulutus
  • Löydä kirjanpitäjä
  • Löydä kumppani
  • Ryhdy kumppaniksi
Meistä
  • Yrityksemme
  • Tavaramerkki
  • Ota yhteyttä
  • Työpaikat
  • Tapahtumat
  • Podcast
  • Blogi
  • Asiakkaat
  • Oikeudellinen ilmoitus • Yksityisyys
  • Tietoturva
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo on kokoelma avoimen lähdekoodin yrityssovelluksia, jotka kattavat kaikki yrityksesi tarpeet: asiakkuudenhallinta eli CRM, verkkokauppa, kirjanpito, varastointi, kassajärjestelmä, projektinhallinta, jne.

Odoon uniikki arvolupaus on olla samanaikaisesti erittäin helppokäyttöinen ja täysin integroitu.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now