[Apiman-user] How to Define a Service with Path Parameters – like /porfolio/{id} ?
Eric Wittmann
eric.wittmann at redhat.com
Tue Oct 27 07:05:37 EDT 2015
OK - let's assume that the endpoint for your backend system is this (for
example):
http://example.org:8080/backend/portfolio/{id}
Typically what you want to do is configure the Implementation Endpoint
in apiman to be:
http://example.org:8080/backend/
Assuming you named your apiman service "Bar" and created it inside
organization "Foo", then your managed endpoint would be something like this:
http://apiman-host:8080/apiman-gateway/Foo/Bar/1.0
Now, any additional path information is simply passed through as-is to
your backend. So for example, you could do this:
http://apiman-host:8080/apiman-gateway/Foo/Bar/1.0/portfolio/12345
This will result in apiman proxying the request here:
http://example.org:8080/backend/portfolio/12345
It does this because the extra path information beyond the base managed
endpoint is:
/portfolio/12345
So that bit is simply appended to the implementation endpoint of:
http://example.org:8080/backend/
which results in:
http://example.org:8080/backend/portfolio/12345
-Eric
On 10/26/2015 9:38 PM, CAI wrote:
> My backend system provide REST APIs like /porfolio/{id}, how can I
> define a service proxying request to such APIs with path parameter?
> After I filled in /Service Name/ with “/porfolio/{id}” and configured
> application, I can only access through “/backend/porfolioid/”.
>
> I tried searching documents of APIMan but couldn’t find a solution.
> Thanks for your help.
>
> Best regards,
>
> Kelvin Cai
>
>
>
> _______________________________________________
> Apiman-user mailing list
> Apiman-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/apiman-user
>
More information about the Apiman-user
mailing list