How to validate mandatory variables through REST API?

User205031
Tera Contributor

Hi All,

 

I am trying to submit a catalog item and  using Service Catalog REST API (OOTB). I want to check validation for mandatory variables. I am passing the below parameters with one mandatory variable value as empty but still it is creating REQ. It should not create a REQ and show an error message 'Mandatory Variables are required'

 
Request Body:
User205031_0-1760001374246.png

 

 
Response Body:
User205031_2-1760001481029.png

 


 

 

How do I fix this issue so that it will through Mandatory variables check error?

 

Please help!

5 REPLIES 5

@User205031 

Hope you are doing good.

Did my reply answer your question?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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