تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
9087 أدوات العرض

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

الصورة الرمزية
إهمال
أفضل إجابة

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

الصورة الرمزية
إهمال
أفضل إجابة

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.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أغسطس 25
375
2
يوليو 25
2820
3
يوليو 25
633
1
يونيو 25
2095
1
أغسطس 25
1003