Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Scripted REST API - How to send 404 http error code response for url with wrong endpoint in scripted rest api?

leo17
Giga Contributor

Hi,

 

I want to return 404 HTTP status code when user enters url with wrong endpoint for a Scripted REST API.

eg: Correct url: "https://<instance.service-now.com>/api/name_space/correct_endpoint".

      Incorrect url: "https://<instance.service-now.com>/api/name_space/wrong_endpoint" should return 404 HTTP status code. 

I am getting HTTP status code 400 now.

Any suggestions?

 

Thanks,

Leo

5 REPLIES 5

Not possible from ServiceNow.

Regards
Ankur

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