{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
0
Question by maneesh.poyil · Dec 17, 2014 at 10:45 PM · 375 Views edge

While exporting APIs which environment APIs gets downloaded ?

I was trying to export some of the APIs created in my org. I noticed that export URL does not take environment parameter, so would like to know by default which environment's APIs gets download

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

5 Answers

  • Sort: 
avatar image
2
Best Answer

Answer by arghya das · Mar 24, 2015 at 06:24 AM

The export api is not specific environment , but revision number. So if you want to export an apiproxy which is deployed to the test environment, you need to get the revision number deployed in the test environment using the following api:

The response would look like this:

test myorg http://www.w3.org/2001/XMLSchema-instance" xsi:type="revisionStatusInEnvironment" name="2"> ....

You can then use the export api to export that specific revision. I believe you already have the details for the export api and its signature. Hope this solves your query. Have fun...

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0
Best Answer

Answer by Michael Malloy   · Jan 07, 2015 at 10:00 PM

I think this API should help you: https://api.enterprise.apigee.com/v1/organizations/{org_name}/apis/{api_name}/deployments

This will give you the deployments on all of your environments and you should be able to download whichever you want and upload it to a different environment.

Comment
Add comment Show 2 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image maneesh.poyil · Jan 10, 2015 at 01:25 AM 0
Link

I am not sure whether you really understood what I was trying to convey. I do agree that I can deploy any environment using below API,

https://api.enterprise.apigee.com/v1/organizations/{org_name}/environments/{env_name}/apis/{api_name}/revisions/{revision_number}/deployments

avatar image maneesh.poyil · Jan 10, 2015 at 01:25 AM 0
Link

I am looking for similar API to export APIs as well [API which has {env_name} So suppose I have deployed my APIs in test environment, once that is qualified jenkins can export it from test environment and promote to stage and prod environment. How will I know when i export the APIs from which environment is it getting exported? Say If i have to promote something to prod environment, I shouldn't export the test environment APIS and promote correct? it should come from stage environment.

avatar image
0

Answer by Michael Malloy   · Dec 17, 2014 at 11:39 PM

The API https://api.enterprise.apigee.com/v1/organizations...{org_name}/apis/{api_name}/revisions/{revision_number}

exports an API based on its revision number, regardless of which environment it is deployed to. You can read more about it here. Other APIs are available that give information such as the API revision deployed to each environment (see here).

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by maneesh.poyil · Jan 07, 2015 at 08:53 PM

I was actually trying to integrate the API promotion process with Jenkins. So typically what I will be doing is, export APIs from one environment, say test environment and promote that to stage environment. I understand I can export a particular revision number but I am little confused how would that help me here. May be the point you are trying to convey is, any revision (say revision 2) should be deployed across all environments ?

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Michael Malloy   · Jan 10, 2015 at 01:59 AM

I see what you are doing now. I don't believe that this requires you to download and upload your API unless you are using different orgs. What you do need to do to promote from test to prod is find out the version of the API deployed on test and then deploy the same API revision to prod.

There are some customers who do download each revision of their API as a precaution and there is certainly no harm in doing that.

Comment
Add comment Show 2 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image maneesh.poyil · Jan 10, 2015 at 08:11 AM 0
Link

But the problem here is, we don't always promote from test environment to prod. There can be n environments, dev -> test -> stage ->prod etc. This pipeline is in parallel with our code development platform environment. so dev api will be for dev stacks, test for test stacks, stage for stage stacks and prod for prod stacks. So to be able to export from one environment and promote next environment is very important for us. So we can actually automate the promotion process. That is how our code promotion works.

avatar image Michael Malloy ♦   · Jan 10, 2015 at 07:46 PM 0
Link

Thanks. I think I understand your situation a little better. What can certainly be automated and plugged into Jenkins is a script that chooses a particular environment and uses the Management Server API to find the deployed version of the API there and then downloads the API to a zip file that you can use to promote to whichever branch you choose.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Use of XPath function in Message Template 2 Answers

EDGE 13 node cluster installation doubt 1 Answer

Error in deployment for environment test 5 Answers

how do I save data structure which content object, array and nested array into Baas? 1 Answer

Mask passwords with JSONPath issue 2 Answers

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges