跳至内容
菜单
此问题已终结
2 回复
9093 查看

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
8月 25
379
2
7月 25
2825
3
7月 25
636
1
6月 25
2100
1
8月 25
1007