Mendix REST API call from Postman

0
Hi Reader,   I have exposed a REST API from Mendix. It is working fine on Swagger but when I am trying to call the API from POSTMAN, it does not give the expected output. Here is the link to the exposed REST: https://demptestapplication-sandbox.mxapps.io/rest/myservice/v1   Please respond why it is not working on POSTMAN??
asked
3 answers
0

hi Harshraj Singh,

 can you post the error code or picture which you are getting in postman?

answered
0

Hi Harsharaj,

Have the given the content type as application/json in Postman? 

answered
0

It looks like you are using the base url (https://demptestapplication-sandbox.mxapps.io/rest/myservice/v1) as an endpoint, but you need to add the resource '/resource' as well.

 

So using the endpoint https://demptestapplication-sandbox.mxapps.io/rest/myservice/v1/resource should work in Postman.

 

Also look at the Postman documentation of importing a swagger.json, this will immediately create a working GET call (use the URL for your swagger.json: https://demptestapplication-sandbox.mxapps.io/rest-doc/rest/myservice/v1/swagger.json).

 

Hope this helps.

 

answered