REST API works locally, after publish it does not

Hi Community!   I have a problem, after creating a REST API and testing it locally, everything works without a problem and I can add new records to the database without problems via api. However, the problem arises when I already publish the application. Then I receive information that I am not able to do it, an error appears:   "code": "404", "message": "Resource not found."   I should add that I tried to do it with the help of Postman as well as swagger. What could be wrong? Where to look for the problem?  
2 answers

Hi Adam,

When you run your application locally, it has the address ‘http://localhost:8080’, but when you publish your application, the rest address also changes accordingly,

Make sure, that you have made changes to the consuming services, for the address of the rest call.

This way, it won’t give any errors,

Let me know, if you have any issues,

Hope it helps!!


Be aware that when deploying your application the path to the rest handler needs to have permissions.

Open your project in the cloud portal and navigate to the environment and select the tab network.

Then review the permssions setup under “Path based access restrictions”. As you are getting a 404 (resource does not exist) the permissions for the /rest path is probably incorrectly configured.