The CreatorCon Call for Content is officially open! Get started here.

Outbound REST - What's the need of REST Message endpoint when we give the full URL at HTTP GET/POST method endpoint?

tkrishna29
Giga Guru

Hi,

I'm struggling to understand the significance in mentioning the endpoint URL on outbound REST message form where my GET method anyways picking up from the URL mentioned at HTTP method form. I felt it like it's a repetition.

In REST - I have 

find_real_file.png

And it GET method , 

find_real_file.png

If you see, the first part of both the URL endpoints is the same. In that case, why don't I just mention it only in the HTTP method instead of having it on the REST Message form. 

Why don't I just continue mentioning the same name at both places and not bother?

I'm looking on the best practice to configure these URLs so that I migrate these REST APIs to PROD environment and just change the URL through properties configuration.

The above REST when migrated to PROD, my PROD URL will differ from DEV.

Suppose, it says - https://api-prod.iextrading.com/1.0/stock/NOW/quote

So, I would use ${trading_url}/1.0/stock/NOW/quote in the HTTP method form and configure the variable "trading_url" as property.

But, I'm not sure what I have to do with the URL that was on REST message form. I don't think we can give these kind of dynamic variables over there.

Kindly help me with the best practice to follow here.

Thank you,

Krishna

 

 

 

 

 

 

1 ACCEPTED SOLUTION

I figured out the better way through this video!

https://www.youtube.com/watch?v=WeeDW_iRM8k&t=568s

 

Thanks,

Krishna

View solution in original post

3 REPLIES 3

felixacostac
Giga Guru

Hi Krishna, the method URL will always overwrite the parent REST message endpoint URL.

I think this one of those cases where functionality just evolved over time, but in most cases the parent REST message URL doesn't do anything workflow related other than for display purposes.

tkrishna29
Giga Guru

Hi,

Understood!

What would be the best practice in general for creating the outbound REST messages that need to have URL changes across environments? Should we be using the ${variable} and set it up as a system property ?

I figured out the better way through this video!

https://www.youtube.com/watch?v=WeeDW_iRM8k&t=568s

 

Thanks,

Krishna