Similar to the pages available by navigating to…
Data Exchange > API Endpoint >
select endpoint > Requests History
I’d like to create a page that consolidates logging for all all our endpoints in a single location.
Using the Request and Response Data Processors, I’m able to get access to the data being sent/received…
request_data = context[‘function’][‘request_data’]
response_data = context[‘function’][‘response_data’]
…but not the extra info (source IP Address, Status etc). Is it possible to get hold of this programmatically?
Since v22.2 you are able to log inbound API requests as records automatically (same as for outbound), meaning you then have access to the full request details and can show them in normal Listing and Information widgets for example.
See the “Save inbound requests to records” setting on the API Endpoint basics page.
Ensure you set your data retention settings for the selected API Request object suitably, to prevent building up too much log data over time. It may be advisable to automatically clear these log older then X days for example.
Hi @bob.twells ,
I’m also looking at doing something like this and whilst the functionality in v22.2 sounds perfect, we’re a few versions behind currently and it would take extensive testing to follow that upgrade path.
Is there an alternative way to be able to view more extensive inbound API request data that you could recommend?
Unfortunately not that I know of, the processors you mentioned may be your best bet in older versions.