Hi,
I want know difference between "/" and "/**" in the resource path, while adding Proxy to the product.I created proxy without resource by enabling security with API-Key.And selected resource path as "/**" while adding the API-Proxy to the product.
When i select resource path as "/" or not select any resource path while adding proxy to the product, above both cases are working fine
Solved! Go to Solution.
Hi Veerendra -
Few questions to help troubleshoot:
Do you have any resources defined on the proxy? If so, what are the exact "Paths" (include exact setup with forward slashes, wildcards, etc.)?
Where is the API key policy attached? PreFlow, or one of the resources?
Have you gotten call 1 to work with a correct API key? (Make sure you have a developer and an associated developer app that's tied to a product. Then in the App Details page of the UI -- Publish > Developer Apps > app -- make sure the status next to the product is "Approved", and the Consumer Key is the API key.)
The answers will help narrow down what's going on.
And regarding resources defined on the product:
/
by default acts the same as
/**
But I'm guessing that's not the root of the problem.
Thanks,
Floyd
Hi Veerendra -
Thanks so much for the extra info. I've been able to duplicate this on my side.
So is hitting http://sample.com (or the Apigee proxy equivalent) supposed to return something? If not, that could be your problem--making a call to a resource that doesn't exist on the backend.
However, if it *is* supposed to return something, remove the resource on the product, or change it to **. The way you have it, you're telling the product to allow calls to all resource *after* the slash, but your first call isn't using a slash before the query param.
OR, add a slash to your first call, like this:
...<basePath>/?apikey=<key>
Hi Veerendra -
Few questions to help troubleshoot:
Do you have any resources defined on the proxy? If so, what are the exact "Paths" (include exact setup with forward slashes, wildcards, etc.)?
Where is the API key policy attached? PreFlow, or one of the resources?
Have you gotten call 1 to work with a correct API key? (Make sure you have a developer and an associated developer app that's tied to a product. Then in the App Details page of the UI -- Publish > Developer Apps > app -- make sure the status next to the product is "Approved", and the Consumer Key is the API key.)
The answers will help narrow down what's going on.
And regarding resources defined on the product:
/
by default acts the same as
/**
But I'm guessing that's not the root of the problem.
Thanks,
Floyd
Thanks Floyd Jones, for your quick response.please find the answer for your questions
Please let me know if need some more information on same.
Thanks,
Veerendra
Hi Veerendra -
Thanks so much for the extra info. I've been able to duplicate this on my side.
So is hitting http://sample.com (or the Apigee proxy equivalent) supposed to return something? If not, that could be your problem--making a call to a resource that doesn't exist on the backend.
However, if it *is* supposed to return something, remove the resource on the product, or change it to **. The way you have it, you're telling the product to allow calls to all resource *after* the slash, but your first call isn't using a slash before the query param.
OR, add a slash to your first call, like this:
...<basePath>/?apikey=<key>
Hi,
Just started looking into this myself. Through testing, there is indeed a difference between a Resource Path in a Product with just "/", "/*", or "/**". My proxy has the ValidateAPIKey policy in the Request PreFlow.
Here are my results, which shows there is no way to match the basepath and only resources one level deep, which just so happens to be my desire.
Documentation here says there's a property that effects this but I dont know in which properties file, we are On Premise.
http://apigee.com/docs/developer-services/content/creating-api-products#resourcebehavior
Proxy Path Resource Paths, exclusively in Product / /* /** ----------------------------------------------- /v1/basepath Y N N /v1/basepath/ Y N N /v1/basepath/1 Y Y Y /v1/basepath/1/ Y Y Y /v1/basepath/1/2 Y N Y /v1/basepath/1/2/ Y N Y /v1/basepath/1/2/3/* Y N Y
Hey Kurt - Not sure if there's a property file that gets updated. But the change is made via cURL command, per that topic you pointed to.