Inbound REST call logging
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2018 12:26 AM
For an integration with a third party system, we are building a REST integration using import sets with the Import API. We would like to track all REST communication (incoming and outgoing).
Is it possible in the REST Import API to see and log (e.g. in a table) the incoming REST message, either the actual complete REST request or only the body (JSON). I couldn't find the question on the community. You can see the REST message if you enable REST debugging (glide.rest.debug=true), but I don't think you can access that in a script.
Anyone found a solution for this without resorting to a Scripted REST API?
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2018 01:08 AM
Hi Sebastiaan,
The transformation occurs synchronously, would you have access to the request object in the transform script?
Just wondering.
HTH
Sylvain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2018 02:07 AM
That would be ideal, but I don't know if/how I can access the request from there.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2018 02:12 AM
In your transform script, you can add something like:
gs.log("request constructor: " + (request !== undefined ? request.constructor : "undefined"),"your source");
Then import 1 record, and search the system logs for the source "your source".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2018 05:24 AM
Hi Syvo,
That is the idea, but this doesn’t work, since there is no reference to the actual request that I know of. Your example gives an error on “request not not defined”.
anyone any idea how this would be possible.
regards,
Sebastiaan