How to test the inbound API using the script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2023 07:17 AM - edited 08-30-2023 07:58 AM
Hi All,
I need to check the inbound API in script,
I tried with the giving endpoint in the script like this
Script: 400 {"error":{"message":"Invalid Quantity value","detail":""},"status":"failure"}
I tried with the calling REST message
var restMessage = new sn_ws.RESTMessageV2('Datactics Test', 'Post Datactics');
var response = restMessage.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
gs.print(httpStatus+" "+responseBody);
It's working but RITM is created, How to restrict the RITM creation when we want to just check the inbound connectivity.
Thanks in advance,
Vinuth

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2023 07:43 AM
Hello @vinuth v,
What is your use-case?
I see in the first script you are doing a POST to sr_submission_api, which is an API to submit catalog item.
So, even though you are getting an error message, but that is most probably after the RITM creation.
Best Regards,
Swarnadeep Nandny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2023 08:00 AM - edited 08-30-2023 08:02 AM
I have added the wrong error message,
This is the error message I am getting
Script: 400 {"error":{"message":"Invalid Quantity value","detail":""},"status":"failure"}
I need to check the inbound API connectivity and user name, password in the ServiceNow dev instance.
Internally I need to do.
Thanks,
Vinuth