Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
9139 Zobrazení

hello.. is it possible to get a list of DB in odoo from external? (use API)

Avatar
Zrušit
Nejlepší odpověď

Hi,

Use odoorpc library for this,

import odoorpc

# Prepare the connection to the server
odoo = odoorpc.ODOO('localhost', port=8069)
print(odoo.db.list())

odoo.db.list() will return all the db names


Know more about odoo rpc library: OdooRPC: Connect To Odoo Database and Perform All Operations


Thanks

Avatar
Zrušit
Nejlepší odpověď

Hi! I know it's a late reply, just found this URL in Odoo's base code. This answer to anyone who needs it.

You can find this URL:

/web/database/list

Make sure you have "Content-Type" as "application/json" in headers and an empty {} in body. I tested this successfully in Postman.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
srp 25
480
2
čvc 25
2908
3
čvc 25
686
1
čvn 25
2168
1
srp 25
1061