I able to deploy proxies one at a time from cmd.
I able to deploy two proxy end points in same proxy from Apigee Edge UI, like below
how can we achieve above functionality from cmd
Solved! Go to Solution.
Good question.
In Apigee Edge, the "proxy" is really a combination of
When you deploy a proxy, you deploy the whole lot. Everything.
When you deploy a proxy with multiple proxy endpoints, then all of the proxy endpoints are deployed at the same time. This is true whether you use the Edge administrative UI, or the Edge administrative API. In fact the UI layers directly on the API, so ... they both amount to the same thing.
The API call that deploys a proxy is defined here in the documentation. (Thanks! to the Apigee docs team!)
In curl, it looks like this:
curl -u username:password -X POST \ -H content-type:application/x-www-form-urlencoded \ "${mgmtserver}/v1/o/${orgname}/e/${envname}/apis/${apiproxyname}/revisions/${apirevision}/deployments" \ -d "override=true&delay=30"
So really, no difference at all when you deploy an api proxy that has one endpoint, versus multiple endpoints. But this is such a straightforward answer, I'm thinking... maybe that's not what you were asking.
Maybe you are asking - what does an offline API Proxy bundle look like, if it has multiple proxy endpoints?
And for that - you can easily see the structure of the bundle if you just download the revision of the api proxy that you have, which has multiple proxy endpoints. That option is under the Project button in the UI, within the proxy editor page.
You will see something like this:
apiproxy/ apiproxy/your-proxy-name.xml apiproxy/policies/ apiproxy/policies/AM-CleanResponseHeaders.xml apiproxy/policies/AM-NoContent.xml apiproxy/policies/AM-Response.xml apiproxy/policies/BasicAuth-1.xml apiproxy/policies/... apiproxy/proxies/ apiproxy/proxies/resource.xml apiproxy/proxies/token-dispensary.xml apiproxy/resources/ apiproxy/resources/jsc/ apiproxy/resources/jsc/dateFormat.js apiproxy/resources/jsc/groomTokenResponse.js apiproxy/resources/jsc/... apiproxy/resources/java/... apiproxy/resources/node/... apiproxy/targets/target1.xml apiproxy/targets/...
Notice - 2 XML files within the proxies subdirectory.
Good question.
In Apigee Edge, the "proxy" is really a combination of
When you deploy a proxy, you deploy the whole lot. Everything.
When you deploy a proxy with multiple proxy endpoints, then all of the proxy endpoints are deployed at the same time. This is true whether you use the Edge administrative UI, or the Edge administrative API. In fact the UI layers directly on the API, so ... they both amount to the same thing.
The API call that deploys a proxy is defined here in the documentation. (Thanks! to the Apigee docs team!)
In curl, it looks like this:
curl -u username:password -X POST \ -H content-type:application/x-www-form-urlencoded \ "${mgmtserver}/v1/o/${orgname}/e/${envname}/apis/${apiproxyname}/revisions/${apirevision}/deployments" \ -d "override=true&delay=30"
So really, no difference at all when you deploy an api proxy that has one endpoint, versus multiple endpoints. But this is such a straightforward answer, I'm thinking... maybe that's not what you were asking.
Maybe you are asking - what does an offline API Proxy bundle look like, if it has multiple proxy endpoints?
And for that - you can easily see the structure of the bundle if you just download the revision of the api proxy that you have, which has multiple proxy endpoints. That option is under the Project button in the UI, within the proxy editor page.
You will see something like this:
apiproxy/ apiproxy/your-proxy-name.xml apiproxy/policies/ apiproxy/policies/AM-CleanResponseHeaders.xml apiproxy/policies/AM-NoContent.xml apiproxy/policies/AM-Response.xml apiproxy/policies/BasicAuth-1.xml apiproxy/policies/... apiproxy/proxies/ apiproxy/proxies/resource.xml apiproxy/proxies/token-dispensary.xml apiproxy/resources/ apiproxy/resources/jsc/ apiproxy/resources/jsc/dateFormat.js apiproxy/resources/jsc/groomTokenResponse.js apiproxy/resources/jsc/... apiproxy/resources/java/... apiproxy/resources/node/... apiproxy/targets/target1.xml apiproxy/targets/...
Notice - 2 XML files within the proxies subdirectory.
Hi Dino,
Thanks for answer my question. using above curl I able to deploy my proxy from terminal and postman without any issue.
But I replaced existing the deploy command with above command, I am getting 404 error.
I thing it is problem with import files into apigee, I am using below url to import my files into apigee
https://api.enterprise.apigee.com/v1/organizations/{org-name}/apis?action=import&name={proxy-name}
I import files like below
apiproxy/programs-programs.xml
apiproxy/policies/Response-Cache-1.xml
apiproxy/policies/Invalidate-Cache-1.xml
apiproxy/proxies/programsV1.xml
apiproxy/proxies/default.xml
apiproxy/policies/Verify-API-Key.xml
apiproxy/policies/JSON-Threat-Protection.xml
apiproxy/policies/Auth-Key.xml
apiproxy/policies/Add-Auth-Header.xml
apiproxy/policies/Quota-1.xml
apiproxy/policies/Spike-Arrest.xml
apiproxy/policies/Raise-Fault-1.xml
apiproxy/policies/Regular-Expression-Protection.xml
apiproxy/targets/BOD-Programs-programs-v1-EndPoint.xml
Kindly advise me, If I done any wrong while import the files into apigee
Hi Dino,
Thanks, I resolved my issue now I able to deploy more than one proxy end points
But I unable to add Response-Cache for it. I getting below error that is Response cache already added. how can I resolve this problem.
Shall I need to add one more ResponseCache for it!
{
"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" : [ ]
}
Thank you @Dino . @rsekhar , Glad to know your issue is resolved. Since your original query is resolved please accept the answer by clicking on Accept link below the answer so that it will be helpful for others too.
Regarding your query in comment, please post it as a new question for better context. Thank you.
yes, please ask new questions in new threads.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |