Error 404:The requested resource is not available.

ishaanvohra
Kilo Contributor

Hello,

I have created a REST Web service to record data in tables in servicenow.And I am calling this web service from an external client.

But sometimes whenever I call the web service,it gives me "Error 404:requested resource is not found" in response and when I refresh the page or send the request from client again,it executes and web service starts to work normally.

When I checked about this reponse,so I found a term ACL constraint.What effect does it implies.As I am already using ACL authorization on my web services.

Please help me out,how can I overcome this problem so that my web service works smoothly.

1 ACCEPTED SOLUTION

Hi Ishaan,



I don't think it is something to do with the timeout issue.


Can you check the configuration done to consume the servicenow api in the third party application.



What do you mean restarting and then working fine?



What do you restart? Is it the client application which consumes the API or ServiceNow instance refresh.



if you are saying that you need to restart the client application in order to remove that error then it is something to do with the third party application and not with ServiceNow.



If every time you are getting correct response from servicenow api endpoint from Postman tool then there is no issue with ServiceNow.



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


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

View solution in original post

9 REPLIES 9

Hi Ishaan,



Error 404 is usually when end point is not correct.


Whatever you are consuming are you sure it is giving valid response.


Example: if you are getting details for incident using incident number then are you sure that incident is present and response is sent correctly.



If you don't mind you can share the API i.e. code and how you are consuming it? Whether it is SOAP or REST based?



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


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

Yes I am sure,it is giving a valid response.


Whenever I am testing it with the rest api explorer it gives the valid reponse.


But when I call the web service through third party client then in that case this error problem occurs.I am not getting the reason that why sometimes it throws error 400,when I am using the same thing.


Hi Ishaan,



Error 400 comes when you are sending some invalid data may be in the body of POST/PUT method etc i.e. bad request.


Error 404 comes when resource path doesn't exist and is wrong i.e. resource not found or particular url is not found.



Can you share the code snippet and how you are consuming that in third party or may be you can try consuming the ServiceNow api in Postman tool and share the screenshot.



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


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

Is there any possibility of timeout issue?


Because right now it is working smoothly.But in morning it has thrown the error 404.But after restarting, it started to work correctly.And till now it has not returned any error.


On service now wiki it says that error 404 can occur when the requested resource was not found.This can be caused by an ACL constraint or if the resource does not exist.I am doing everything right.It is working absolutely fine with rest api explorer and Postman.But each day when I call the service from client it returns error.But after restarting,it started working correctly.


Hi Ishaan,



I don't think it is something to do with the timeout issue.


Can you check the configuration done to consume the servicenow api in the third party application.



What do you mean restarting and then working fine?



What do you restart? Is it the client application which consumes the API or ServiceNow instance refresh.



if you are saying that you need to restart the client application in order to remove that error then it is something to do with the third party application and not with ServiceNow.



If every time you are getting correct response from servicenow api endpoint from Postman tool then there is no issue with ServiceNow.



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


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