How to capture inbound json and response json logs using import set

String
Kilo Sage

Hi all,

Iam using import Set API to create incident ticket ,but iam bit confused to capture the logs .Please guide me to capture inbound json and response json  in logs.

8 REPLIES 8

String
Kilo Sage

I want to capture the inbound json in logs ,just like create record Transactions  Request Json ,Response find_real_file.png

On the default import API that is not possible. You have to either use the 2 options provided to see logs or create a scripted REST API. In that you do have access to the JSON object and can easily log it like so:

gs.log(new JSON.parse(request.body));

 

Refer to this thread:

https://community.servicenow.com/community?id=community_question&sys_id=337435a2db2be7005d782183ca96...

String
Kilo Sage

okay,How to capture the raw inbound json and response using default import set API ..?

Willem
Giga Sage
Giga Sage

@kiranchand 

Hope you are doing well.

Is your question resolved? Or do we need to follow-up on this?

Please mark the answer as correct if it solves your question. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.

Kind regards,

Willem