address of rest api invoked

address of rest api invoked

  

hi there,

I create a REst api, and give the address. How to get back the address (is there a built-in function for that)?

thank you

Hi Pasar,

I'm not sure I understand what you are after. You want to know, in the exposed REST API, what the URL is that invoked that API? Why would you need that?

thank you Killian,

I create an audit trail, and said that the URL of the web service can be overridden using Service Studio. So, i need that function to get the effective URL of the REST.

regards,

Hi Pasar,

But what is the functional need behind it? Why would you care what the URL is? You shouldn't implement different behaviour based on the specific URL.

hi Killian.

It is for Audit trail that the client makes, it needs to record that REST URL.

thank you.

Hi Pasar,

There is already such an audit trail: in Service Center, go to Monitoring, Integrations.

hi,

So, there is no function to get the effective URL REST?

thank you.

Solution

I'm not saying that (there could be something in the HTTPRequestHandler), but I am saying that you shouldn't want to do that, as it is the wrong approach. You already have a good, out-of-the-box solution for logging REST calls.

Solution