REST API GET - input parameters

REST API GET - input parameters

  

Hi,

I test a REST API get in Outssytems with http://json.api-postcode.nl?postcode=9013CB&number=8 and I recieve the correct respons. When I close the Get dialog the URL path is strange: 

I also want to use input parameters instead of 9013CB and 8 and I created them.

But this happens:

What is the correct way of using input parameters with the URL path? I could not find this in the docs or did I overlook it.

Regards, Harry

 


in the popup of consuming the rest-method you should have an url like this

http://json.api-postcode.nl?postcode={postcode}&number={number}

this will create input-parameters for you and it will work as expected.


J,


Thank you for the solution!


Regards,Harry

Hi

I cheered too soon. I got an 404 not found (in production). This is why:

The created URL path (after closing the Get dialog) is

?postcode={postcode}&number={number}

So I made it fit: 

//json.api-postcode.nl?postcode={postcode}&number={number}

However then the rest API get dialog (if you open it again) shows

http://json.api-postcode.nl//json.api-postcode.nl?postcode={postcode}&number={number}

So it's added an extra //json.api-postcode.nl

How to soilve this strange behaviour (if I strip the extra //.. in the dialog then the URL path shows it from ?.. again, so it seems to be a circle that I cannot escape.

Regards, Harry

Solution

Changing the URL to

//?postcode={postcode}&number={number}

did the job! Strange though..

Regards, Harry


Solution