ServiceNow REST API - How to GET required/mandatory fields and data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2019 10:26 AM
We are looking for a ServiceNow API to get all required/mandatory fields and its data, that a user has to provided before creating a new incident. Please let us know if you know it.
Refer to the attached image below for more detail.
Example:
-
required/mandatory fields --> [Category, Subcategory, Impact, Urgency, etc ...]
-
Data of fields:
Urgency --> [1: Critical, 2 - High, etc …]
Category --> [Security, Repair, Remove, ….] ....
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2019 11:25 PM
Hi,
You can refer below link where Josh.Neirus has shown how to throw error in response of REST if mandatory fields are not filled.
Refer this link as example it will help you
Mark my ANSWER as CORRECT n also HELPFUL if it works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2019 09:37 AM
Hi CreativeThinker,
Thank you for your solution. However, we think it's not a full solution that we need. If ServiceNow server changes or adds new required fields, we have to change our code to create incidents through API.
Is there any way we can get all the required fields FIRST before creating a new incident through API? We don't think ServiceNow supports any RST APIs to get required fields, right?
Thank you,