Specify "?" and queryparams in Proxy Endpoint BasePath

Hello comunity, I'm still new to Apigee, and I'm trying to setup a Pass-through Proxy endpoint, which holds QueryParams in the BasePath in the format:

/v1/patients?device_Id={{dev}}&devDate={{date}}

but this every time I try to save the Proxy, I get an error indicating:

Invalid base path, reason:"?" character in the base path.

I believe I have to somehow manage this with queryparam but I could not find precise info. Can someone help me?

Thank you all for any help

Tommaso


0 3 542
3 REPLIES 3

You can't add a question mark to a basepath.

a basepath for an API proxy is a path. By definition, that is everything before the question mark.

I believe I have to somehow manage this with queryparam but I could not find precise info. Can someone help me?

Sure. What are you really trying to do? Apigee acts as a pass-through proxy. You don't have to specify which query params or headers to pass through. All of them pass through in the proxied request, unless you specify otherwise.

Hello Dino,

let me first of all thank you very much for your help and the clear explanation.

Let me explain what I am trying to do, as I believe then I'm starting from the wrong approach. I have a series of API which are for organizational/business logic divided different functional areas (e.g. Patient operations, Device operations, etc.) on my Target endpoint.

Now we are setting up Apigee, and for different organizational / technical constraint, we wanted to setup Apigee as a Pass through Proxy, and I thought in order to organize my endpoints I create one Proxy Endpoint for each of my API targets, then create a Product, for each of my functional area (e.g. Patient, Device, etc), and then group the Proxy Eendpoints into the correct functional group.

I wanted to do this, as many of the Target API has the same base bath (in my example above /v1/Patients for example is used for some API linked to the Patient function and for some linked to the Device) and therefore I wanted to specify each time the entire endpoint (including parameters).

So at this point I understand that my logic was wrong and I cannot do this, what is then the best possible way to divide the target API into different areas to then manage access to the different areas if the base path is the same?

So at this point I understand that my logic was wrong and I cannot do this

Yes I agree with that.

What is then the best possible way to divide the target API into different areas to then manage access to the different areas if the base path is the same?

It's hard to say, but I will give you some additional information and maybe that will help you.

  1. Apigee basepaths can overlap. Apigee will route requests to proxies based on the most specific basepath match. For example proxy1 might have basepath /v1/foo and proxy2 might have basepath /v1/foo/bar . In that case,

    If a request arrives with /v1/foo/bar/bam as the path, then Apigee routes it to proxy2.

    If a request arrives with /v1/foo/bam as the path, then proxy1.

  2. it makes most sense to not have a single basepath that points to different backends. If /v1/Patients is used to access Devices, there's something odd going on. It seems like the RESTful model might be out of order. Or I could be misunderstanding.
  3. For API Products - think not in terms of "what your team has built" in terms of APIs. But think in terms of "how will these APIs be consumed?". The API Product is the consumable unit. Be wary to avoid Conway's Law. You don't want to force your org structure on developers who use your APIs. Build the API product to enable the user scenario that the OUTSIDE developer wants to build. Not to protect what the INSIDE developer has already built. This might mean the API Product subsumes 3 or 4 proxies. That's totally fine and normal.

You might benefit from an architecture discussion session. Have you contacted your salesrep or Sales engineer?