- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 09:37 AM
Hello, I am developing a custom client implementation that will create new incidents in ServiceNow using the REST interface. I am looking for detailed documentation on the fields that can be passed in the payload. I've used the on-line REST API tester interface. I can see that there are many fields that are supported in the request payload, but I need some detailed documentation on these fields that includes a full list of the available fields. Is there a full PDF or on-line reference for the Incident REST interface? Thanks.
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 03:04 PM
Patrick,
This is your own personal developer instance? And you're logging in as admin? Or are you logging in to a client instance with limited access?
There are a couple of ways you can handle what you want to do. If the IBM system can send an email, you can send an email to the servicenow instance, and you can script an inbound action to create whatever type of record you want. Problem is a different table/process, but you can very well create a Problem record as opposed to an Incident; it really depends on the internal process and how you want to handle the incoming record.
The second option (and third) would be to use the REST API in servicenow; a) the table API which already exists or b) write a scripted rest api to handle the incoming REST request and create the record that way.
Email is probably the easiest/quickest, depending on if you require additional scripting to create anything the than an incident. Otherwise, if you just send an email to your instance, the default inbound email action will create an Incident.
Hopefully that clarifies a couple of things for you, let me know if you need any other assistance!
Cheers,
Tim

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 10:29 AM
Patrick,
As far as I know, you can basically pass any field in the request using the table API. There isn't a 'Incident REST interface', rather it's the SN table API which allows you to access the tables directly via REST.
If you haven't already, start here:
https://developer.servicenow.com/app.do#!/rest_api_doc?v=istanbul&id=c_TableAPI
The REST API explorer is also helpful, as you can generate the code for various languages you may be using (Javascript, Python, etc)
Cheers,
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2017 01:11 PM
Hi Tim,
Thanks for your response. I can see the examples of a POST operation to the Incident table and this is helpful. But I still don't understand which fields are available in the request payload. The curl example shows this:
--data "{'short_description':'Unable to connect to office wifi','assignment_group':'287ebd7da9fe198100f92cc8d1d2154e','urgency':'2','impact':'2'}"
So I can see that there is a field named 'short_description'. And other fields named 'assignment_group', 'urgency' and 'impact'. Where can I find a complete list of these fields? I have a long description and other information that should be added to the new instance.
Any pointers you can provide will be much appreciated.
Patrick

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2017 02:41 PM
You can find a complete list of the fields on the Incident table on the instance. Check 'Tables & Colums' in the app navigator and select the 'Incident' table. That will list all of the fields on that table. You should be able to send any of those fields in the payload, save for the system ones (i.e sys_created_on, etc). Do you have admin access to the instance to view this information?
You could also use a scripted REST API to customize how the data is received to the API, and then inserted into the table. As an example, if you want to check the value of the property in the JSON payload to either ensure it's populated or compare it against some of the value in another table using a GlideRecord query.
Hope that answers your question(s)!
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 02:16 PM
Hi Tim,
I logged into my developer instance and activated it. I have a number of options on the left side-bar menu, but Tables and Columns is not one of them. I have a Data Management icon in the center of the panel. I click on that and can get to an item called Incident table. It shows a few fields, but does not have fields like short description, long description, etc.
I wonder if I am barking up the wrong tree. I have an application on an IBM enterprise platform and when certain conditions occur I want to raise a problem ticket in ServiceNow. Perhaps this is not an "Incident"? Any guidance you can provide would be most appreciated. It seems like a simple thing I am trying to do, but I keep floundering on this.
Patrick