The CreatorCon Call for Content is officially open! Get started 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  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader