Search code examples
servicenowservicenow-rest-api

ServiceNow API - Get required/mandatory fields and data


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.

Refer to this image:

enter image description here

Example:

  • required/mandatory fields --> [Category, Subcategory, Impact, Urgency, etc ...]

  • Data of fields:

    Urgency --> [1: Critical, 2 - High, etc …]

    Category --> [Security, Repair, Remove, ….]


Solution

  • Normally this information is stored in the dictionary (right click field label -> dictionary). So you could a request to table sys_dictionary (where table=incident AND mandatory=true) and get the fields from there.

    But there are many ways (data policies, business rules, dictionary) and evaluations in servicenow, which will be hard to obtain via REST.

    I would advise you to just make a list of fields you want from an incident and make this configurable.