Upload and download integrations

You can download your integrations as a JSON file and save it in your local system. As a result, your entire integration is available in a file, which you can directly upload in another integration project without any modifications. Uploading an integration creates a new version of the integration in the project where the file is uploaded.

Having an entire integration in a file format provides you with the following advantages:
  • You can copy your integration from one project to another without much effort.
  • You can programmatically update the integration file for repetitive changes, such as renaming of tasks or dynamically modifying variable names.

Download an integration

To download an integration, perform the following steps:

  1. In the Apigee UI, select your Apigee Organization.
  2. Click Develop > Integrations.
  3. Select an existing integration. This opens the integration in the integration editor.
  4. Click the Versions dropdown and select the version you want to download.
  5. In the designer toolbar, click (Actions menu) and select Download.

    The INTEGRATION_NAME.json file is automatically saved in your web browser's default download folder.

Upload an integration

To upload an integration, perform the following steps:

  1. In the Apigee UI, select your Apigee Organization.
  2. Click Develop > Integrations.
  3. Select an existing integration or create a new integration by clicking Create integration.

    If you are creating a new integration:

    1. Enter a name and description in the Create Integration dialog.
    2. Select a region for the integration.
    3. Click Create.

    This opens the integration in the integration editor.

  4. In the designer toolbar, click (Actions menu) and select Upload.
  5. In the file browser dialog, select the file that you want to upload, and then click Open.

    A new version of the integration is created using the uploaded file.

Download and upload using API

You can use the integration APIs to upload or download an integration.

Download integration using API

To download an integration, issue a GET request to the following API:
https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/products/apigee/integrations/INTEGRATION_NAME/versions/INTEGRATION_VERSION:download

The following example shows you how to download a specific version of an integration:

curl -v -s \
-H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
-H "X-GFE-SSL: yes" \
-X GET "https://integrations.googleapis.com/v1/projects/demo-project/locations/us-east1/products/apigee/integrations/test-integration/versions/0e90d453-5fcf-4aae-b164-2e8344d1ac11:download"

For more information, see projects.locations.products.integrations.versions.download.

Upload integration using API

To upload an integration, issue a POST request to the following API:
  https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/products/apigee/integrations/INTEGRATION_NAME/versions/INTEGRATION_VERSION}:upload
  

The following example shows you how to upload an integration:

curl -v -s -H "Content-Type: application/json"  -H "Authorization: Bearer $TOKEN"  \
-X POST -d '{"content": 
  "{\"name\":\"projects/450954726404/locations/us-east1/products/apigee/integrations/test-workflow/versions/0e90d453-5fcf-4aae-b164-2e8344d1ac11\",
  \"origin\":\"UI\",
  \"snapshotNumber\":\"3\",
  \"updateTime\":\"2022-01-06T04:26:58.137Z\",
  \"lockHolder\":\"abc@test.com\",
  \"createTime\":\"2022-01-06T04:26:42.734Z\",
  \"lastModifierEmail\":\"abc@test.com\",
  \"state\":\"DRAFT\",
  \"triggerConfigs\":[{\"label\":\"API Trigger\",\"startTasks\":[{\"taskId\":\"1\"}],
  \"properties\":{\"Trigger name\":\"rj-test-workflow_API_1\"},\"triggerType\":\"API\",\"triggerNumber\":\"1\",\"triggerId\":\"api_trigger/rj-test-workflow_API_1\"}],\"taskConfigs\":[{\"task\":\"EmailTask\",\"taskId\":\"1\",\"taskExecutionStrategy\":\"WHEN_ALL_SUCCEED\",\"displayName\":\"Send Email\"}]}"}' 
  \https://integrations.googleapis.com/v1/projects/apigee-1/locations/us-east1/products/apigee/integrations/test-integration/versions:upload

For more information about the API, see projects.locations.products.integrations.versions.upload.

Considerations

When using the upload or download feature, consider the following points:

  • Uploading an integration creates a new version of the integration. For example, if you have an integration by name IP-Test at version 5, and you upload an integration file in IP-Test, a new version 6 is created for the integration.
  • If you don't have an existing integration in which you can upload a file, you must first create a new integration and then upload. In this case, the new integration you create will be at version 1 and the uploaded integration will be at version 2.
  • Details of authentication profiles configured for an integration will not be available in the downloaded file. After uploading the file, you must re-configure the authentication profiles in the uploaded integration.