REST API Request log

REST API Request log

  

Hi all,

 i want to know if there is any method or logs where i can trace out from which application/espace, the rest API request has been called?

My API is at a separate espace (ex .APIEspace) and the log at server is giving me some errors at API. But Now the requests are huge and every request is giving error which is kind of filling the log tables. I need to check from where the requests are coming from. 

Hi Debasis,

In Service Center there's the Integration Logs (Monitoring tab). There you can find (and filter) on both consume and expose of REST and SOAP.

Hi Killian,

Thanks for the reply, but the Integration Logs is showing the logs about the e-space at which the API is there. It doesnot show from which espace the API has been called.

To be more Precise, I have an application with Espace1 which has got an exposed API REST1.

Now Rest1 is calling Outlook API internally which is failing.

There are another applications which are calling REST1 and since REST1 is unable to result the data from outlook, logs are getting generated for Espace1 stating that API REST1 is failing(Outlook API error).

Now I need to know which are the applications / espaces who are calling REST1.

Hi Debasis,

The Integration Logs show both REST consume and REST expose, like I said. Example from our log:

You can see here that eSpace MSS_CustomizedOffer performs two REST calls ("REST (Consume)"), "SalesChannels.SalesChannelsGet" and "CrmRest.CustomerGroupsGet", and also that EMS_SalesInterface and EMS_CRM_WS are getting called ("REST (Expose)") because of that (because it's all within one second, the sorting is fairly random, and the consumes are listed first, followed by the exposes).

You can also filter on eSpace and type of service (expose or consume).

Hi Kilian,

I checked the logs but the consumers of API REST1 are not shown in Service center. Rather it is just showing the logs for Espace1 with API REST1 being exposed.

Not sure where to get the logs of its consumers. My DB is getting huge failure logs and i am having to purge it every alternate days. Any traces at server level or Database table level can be much helpful.

Hi Debasis,

Are the consuming eSpaces running on the same server that you checked the logging on? If the consuming eSpaces are on a different server, you need to check Service Center of that server.

Hi Kilian,

Since the expose API is the generic and reusable one, so any application running on any server can call that API.

I tried to check the logs at other server as well but they didn't show any call to that API.

Hi Debasis,

Of course it is not possible to know what kind of application calls you if you expose a REST API for the world to know. But like I said (and showed), if you have an OutSystems Web App that calls a REST API, whether that API is a REST Expose of another OutSystems App, or some external REST API like Twitter or Facebook, this is logged in the Service Center of the server that the consuming Web App runs on.