问题
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:
Example:
required/mandatory fields --> [Category, Subcategory, Impact, Urgency, etc ...]
Data of fields:
Urgency --> [1: Critical, 2 - High, etc …]
Category --> [Security, Repair, Remove, ….]
回答1:
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.
来源:https://stackoverflow.com/questions/58612263/servicenow-api-get-required-mandatory-fields-and-data