Any possibility to have two basepath for single proxy ?

Hi team,

I am trying to alow below base path for single proxy. [/v1/data*].

base path 1: /v1/data/

base path 2: /v1/dataTeam1/

base path 3: /v1/dataTeam2/

Aiming provide different url and configure different endpoint for single proxy.

I have a restriction, the basepath cannot be like /v1/data/Team1/ , /v1/data/Team2/

Please let me know if there is any possibility.

Thanks,

Satheesh.K

Dear @kumarsathe ,

Yes, It’s possible. Just add multiple proxy endpoints in single proxy. For example, please find attached proxy.

multibasepath-rev1-2016-03-30.zip

Similarly, You can create multiple target endpoints within single proxy & use route rules to route traffic as needed.

3 Likes

Hi Anil,

Here the problem is not endpoint. its a basepath. i want to allow basepath like below to one proxy [/v1/data*].

https://apigee.net/v1/data

https://apigee.net/v1/dataTeam1

https://apigee.net/v1/dataTeam2

Thanks,

Satheesh.K

Hi @kumarsathe,

I am curious to know how single proxy bundle is going to help for different base path. Could you elaborate the use case.

Assuming that given example given is to explain the requirement and it’s really not the implementation.

Best Regards,

Rajesh Doda

Did you try Anil’s bundle? Based on my understanding of what you’re looking to get, the bundle does exactly that.

1 Like

Please check @Anil Sagar 's bundle, I believe it serves well your requirement.

1 Like

Hi @Anil Sagar, @Carlos Eberhardt, @Sunandita Dam

I tried the same approach but am unable to have same Response cache in all those three proxyEndpoint xml. I get below error,

{

“code” : “steps.cache.ResponseCacheStepAttachmentNotAllowedReq”,

“message” : “Response cache step definition c1_rescache_by_header_uri can not be attached more than once in the request path”,

“contexts” :

}

Why it is so, those are two different ProxyEndpoint xml, and when one ProxyEndpoint executes, other will not come into picture, how it becomes duplicate of caching policy?.

Hi @Anil Sagar, @Sunandita Dam @ @Carlos Eberhardt

I tried the same approach but am unable to have same Response cache in all those three proxyEndpoint xml. I get below error,

{

“code” : “steps.cache.ResponseCacheStepAttachmentNotAllowedReq”,

“message” : “Response cache step definition c1_rescache_by_header_uri can not be attached more than once in the request path”,

“contexts” :

}

Why it is so, those are two different ProxyEndpoint xml, and when one ProxyEndpoint executes, other will not come into picture, how it becomes duplicate of caching policy?.

@Ameenun Try to add your bundle code. Problem lies somewhere else. It might be the case for same endpoint you added response cache policy more than once.

@Sunandita Dam since i cannot give my project code, I have now tried a new one, and attched the zip.

content-rev1-2016-06-22.zip

@Ameenun I made one change then it’s not giving the problem mentioned by you. Just check.2983-content-rev1-2016-06-22-rev1-2016-06-22.zip

@Sunandita Dam You are creating one more policy, which doesn’t solve the problem. If I have 10 different base paths, then i end up copying same policy 10 times with different name, This is a bug in the product.

@Ameenun I agree..looks like a bug. Hope someone has taken note of it.

Can you log a defect with your system, this fix would help us in reducing number of proxy we are writing.

I view the ResponseCache as the “easy-button” for caching. As such it may be designed to expect a single proxy endpoint. You can likely accomplish what you want using the more fine-grained cache policies. Lookup, Populate, etc. The same lookup policy can be attached to all three proxy endpoints. You could then use conditional steps to return the cached value or populate when there’s a cache miss.

@Carlos Eberhardt Response policy does store headers, cookies and body all together, so if i wanna do the same with cache-policies, what “source” i should mention in the cache policies?.

Hi Anil,

How can we deploy multiple proxy endpoints from cmd

Right now I am able to deploy only one. using Apigee Edge deploy.py script

@rsekhar , You mean multiple API Proxies at once ?

Yes, Multiple proxy endpoints in same proxy

@rsekhar , I believe when you deploy proxy all the endpoints are deployed along with it.. Are you using any specific tool to deploy instead of Management UI ?