0

I want to generate a rest api in odoo so that it can be used in other languages. I have used below api's

  1. http://URL_with_PORT/{}/xmlrpc/2/common
  2. http://URL_with_PORT/{}/xmlrpc/2/object

but when I validated it using postman it is giving me error.

Shraddha Bagde
  • 131
  • 2
  • 10

2 Answers2

1

You don't need the curly braces in the URL. Just send it to the xmlrpc/2/common endpoint, as per...

http://<server:?port>/xmlrpc/2/common

You need to set the verb to POST, and the body to raw with XML.

Then send in the following XML in the form as per the documentation.

<?xml version='1.0'?>
<methodCall>
    <methodName>version</methodName>
</methodCall>

This will return the server version info as per the examples used in the External API documentation in an XML response.

Calvin
  • 423
  • 3
  • 12
-3

Postman isn't the best client to use XML-RPC calls, take a look at XML RPC GUI for developers in Windows?. You have to create a raw request and then send it. Using SoapUI would be much easier.

Community
  • 1
  • 1
Mariusz Mizgier
  • 527
  • 2
  • 13