We moved an application from the paid environment to the lifetime environment. This application worked without issue in the paid environment. In the lifetime environment all the API gets work, but anything API that does a POST fails with 405 Method not allowed. These API were written by our development team and work in Swagger and Postman.
We found the issue the API calls were using HTTP. This use to work.
We updated the all API calls to use HTTPS and all call work now.
We were able to recreate the issue with Postman and that pointed us to the solution.
Ah! The HTTP vs HTTPS issue!
Glad you could solve that mystery. And thanks for updating the thread :)
Hey Ralph,
405 Method No Allowed means that you are not using the correct HTTP Method with that endpoint. For this specific case I'd say that the endpoints you are consuming do not accept the POST method.
Since it seems this works with Postman and the team moved the application it could happen that some of URL paths were changed mistakenly or the move triggered that. My advice would be to use Service Center to check if the endpoints and URL paths have the correct value in the Effective Value input.
Thanks for the response. If I am looking in the correct place the URL looks correct.
Also all the get calls are working correctly.
If you enter the detail of that Consumed API is the effective url value correct as well (or empty)?
Also do you have the documentation of that API? In the documentation it should be clear what endpoints accept what HTTP methods. So you should be able to see that for the endpoints that you are having that error it only accepts the GET method, for example.
The 405 error is pretty straightforward so there should be a tiny little detail here that is being overlooked.
I don’t see why moving the code could do this but just in case it’s because of that, can you try consuming that API in another OutSystems environment (that is not the lifetime one)
Sorry I have gotten back to you sooner, I have been reviewing code and talk with the developer of the app and review the server logs. Still no answer. According to the code we using a POST.
Did you had the chance to try consuming this API in another environment?
With this level of detail it's hard to help you further... What I would do if faced with this problem:
With all that said, I'd recommend:
If all that fails, I can only see two options:
Thank you for the your help. I have not tried the API in another environment because we didn't renew our contract for a few reasons. I do think OutSystems is one of the better low code solutions. What I can tell you is that ever Post or Delete method we use in our application fails with a 405 error. Our app uses APIs for all CRUD and business logic operations. I will work on this in the coming weeks. I can still demo the system since all Get operations work and we have scripts that run on a daily bases that keep the data fresh.
Let me know if I can help you further, and if you want provide me more details via direct message.