Skip to Content
0
Apr 24, 2020 at 10:02 AM

API Proxy - Using path parameter as variable

292 Views

I have a box standard API Proxy where I can call the endpoint using the GET verb. The path suffix looks like below:

/order/58

The resource is setup as follows:

The problem I'm having is with the DefaultFaultFlow policy. When enabled, the policy always gets triggered, when turned off the endpoint successfully makes the SOAP call to my backend server and returns the results for the passed order id.

I suspect it has something to do with the pattern matching of the URL. The condition string for the policy is:

proxy.pathsuffix MatchesPath "/order/" OR proxy.pathsuffix MatchesPath "/order//**" OR proxy.pathsuffix MatchesPath "/order/(**" OR proxy.pathsuffix MatchesPath "/order/{orderId}" OR proxy.pathsuffix MatchesPath "/order/{orderId}/**" OR proxy.pathsuffix MatchesPath "/order/{orderId}(**"

The error returned, which doesn't really tell me much is:

{
    "fault": {
        "faultstring": "Raising fault. Fault name : defaultRaiseFaultPolicy",
        "detail": {
            "errorcode": "steps.raisefault.RaiseFault"
        }
    }
}


I've searched around for working examples, but so far I'm stuck. Does anyone have any ideas what the issue could be?

Attachments