How to test outbound web service (REST)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2016 06:20 AM
Hello,
I am new to ServiceNow and web development, and so my knowledge of REST is very limited.
I would like to create a REST web service (I have already done this portion) and then on the test run, send the sample data I filled in to an endpoint. This endpoint is not a ServiceNow instance so I am not sure if it is configured to receive this data. When I do test runs, the http status code appears as "500."
Is there a way to test my web service by having it post this simple data to some PHP file? Does this PHP file have to be hosted on the web? Finally, where can I find the resources to write the PHP code to receive the info from ServiceNow and echo the information?
Thanks!
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2016 06:43 AM
I found this to play with. I haven't tested it, but it looks promising until you build your own PHP app to respond.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2016 02:03 PM
Hi Ambika,
You can create a simple REST inbound service on the same instance where you are testing your outbound REST service. This inbound service can just echo what you are sending it. That way you can ensure your outbound service is working as expected and then modify it to the actual thrid party end point where you really intend to post data.
You can read more at https://docs.servicenow.com/bundle/helsinki-servicenow-platform/page/integrate/custom-web-services/c...
Best Regards,
Siri
Please select Like/Helpful/Correct if this helps