Resolve 405 POST method not allowed on a REST service subresource

0
Running Studio Pro 10.23.0, though upgrading to 10.24.7 did not resolve the issue.   We have multiple REST services (one for each module) with the same base url (api/v1). Each service after that has a unique resource name.   Let's say there are 2 modules, programs and assets. Programs defines api/v1/programs while Assets defines api/v1/assets.   We have several GET, POST, PUT and DELETE handlers, and many subresources. All except POST work just fine (but see below).   We define a POST handler for api/v1/programs (note no subresource), and this works fine. We also define subresources, such as api/v1/programs/workorders; everything but POSTs work for these subresources.   If we move workorders to be api/v1/workorders (resource, not subresource), the POST works fine. If we move api/v1/programs to api/v1/programs/programs, the POST stops working, all with 405 Method not allowed 'POST'.   We've been careful to copy portions of the URL directly from the rest service to ensure that the URL is correct. The data is correct, too, but breakpoints on the microflow do not trigger. Tracing REST consume does not show anything, presumably because the error occurs before any REST call is made. If there is some other tracing that we can enable, please advise. We've also varied the URLs, introduced errors into the JSON, etc., etc., just to ensure that we are doing the right thing(s). We have also reordered the URLs in the service definition, such as putting POST /programs/workorders ahead of, and after, GET /programs/workorders. We do have GET, POST and DELETE on the same subresource, while the PUT is on subresource/{identifier}. Here's the top-level service definition for workorders where POST works: Here's the subresource POST definition where POST does not work (but everything else does):
asked
1 answers
1

Hi Josef, 

 

The REST Consume log node is for when you consume REST services but I guess you are publishing this REST service so you should set the log node of REST Publish to Tracing in order to get the more detailed logs for this. Hopefully this will get you a bit more information to see where the call drops off before it is reaching the breakpoint.

 

KR, Jurre

answered