Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

REST API for UI Policy and Data Policy

lexicalunit
Giga Expert

I have tried to search the documentation for an API that allows me to fetch information on the current UI Policy or for Data Policies and I can't find it. Is there such an API?

 

Particularly, I am interested in learning about mandatory fields for incidents. I understand that you can set fields as mandatory in the UI Policy and in Data Policies.

 

As such, I need a REST API that will allow me to query the current UI Policy and Data Policies to build a full picture of the list of mandatory fields.

 

I'm sure these REST APIs and/or GraphQL APIs must exist. Right?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@lexicalunit 

I don't think any such API exists

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@lexicalunit 

I don't think any such API exists

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

AnilAnnavarapu
Tera Contributor

Hey @lexicalunit  -- there is any OOB APIs available in ServiceNow. But still, you can achieve this via Scripted REST API, where you can query these sys_ui_policy, sys_ui_policy_action, sys_data_policy, sys_data_policy_rule tables, to filter the mandatory enforcement. 

Give a try and let the community know, the solution worked or not.

Regards,
Anil Annavarapu