Layer7 API Management

  • 1.  Path params

    Posted Oct 19, 2018 05:41 AM

    I have rest services like this: 
    POST / v1 / {payment-service} / {payment-product}
    where {payment-service} has 25 occurrences and the {payment-product} around 30, besides they have different request method, such as GET, POST or DELETE, is there some way to resolve it without having to evaluate the request-uri and doing a split 20*25*3 times on the same url method?



  • 2.  Re: Path params

    Posted Oct 19, 2018 06:38 PM

    This is a good question. I can't think of anything of the top of my head right now, but I'll give this some more thought and see what we can come up with. Depending on how this goes, you may want to consider creating a support case just so you can attach a copy of your policy for review, and we may be able to get a better idea with that so we know how your policy logic works currently.



  • 3.  Re: Path params

    Broadcom Employee
    Posted Oct 19, 2018 10:30 PM

    It would help if you can provide what you want to accomplish once the gateway resolves the URI so we can help craft out some suggestions. Some initial thoughts would be to either do some logic in a global policy that analyzes the various sections and pushes them through to different services using the Resolve Service assertion or consume them through to a /v1/* service that would go down different paths of logic.

     

    Any type of variance of how the request is handled like are 95% of the requests no matter the combination handled a certain way and the 5% are outliers with different logic? We have mapping assertions that can control things like routes or such or it can be parsed from cluster wide properties at run time/possible cached.

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support



  • 4.  Re: Path params

    Broadcom Employee
    Posted Oct 21, 2018 06:17 PM

    Hello,

    Service method is usually limited  on service level (in service properties), but you  can also validate it in policy logic.

    Ie. both url and request method can be validate in policy logic.

     

    Therefore, you may only have one service, /v1/*

     

    And in the service policy, you should validate all the combinations of ${request.http.uri} and ${request.http.method}

     

    Regards,

    Mark