This documentation is for WSO2 API Manager 2.0.0 View documentation for the latest release.
Page Comparison - Migrating the APIs to a Different Environment (v.16 vs v.19) - API Manager 2.0.0 - WSO2 Documentation
Provide Feedback

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Code Block
curl -H "Authorization:Basic <base64-encoded-credentials-separated-by-a-colon>" 
-X GET "https://<APIM_HOST:Port>/api-import-export-<product-version>-<tool-version>/export-api?name=<API-name>&version=<API-version>
&provider=<API-provider>" -k > <exportedApiName>.zip
Tip

To obtain <base64-encoded-credentials-separated-by-a-colon> use a base64 encoder (e.g., https://www.base64encode.org/) to encode your client ID and client secret username and password which has admin role using the following format: <clientId><username>:<clientSecret><password> Thereafter, enter the encoded value for this parameter.


Here's an example:

...

  • To export an API from a tenant, follow the steps in Export an API. Use the tenant-specific encoded credentials in the cURL command. Here's an example: 

    Code Block
    curl -H "Authorization:Basic AbCdEfG" -X GET "https://<host>:port/api-import-export-2.0.0-v0v3/export-api?name=sample&version=1.0.0&provider=user@domain.com" -k > exportedApiName.zip
  • To import the API in another tenant, follow the steps in Importing an API. Use the encoded credentials for this tenant in the cURL command. Here's an example:

    Code Block
    curl -H "Authorization:Basic AbCdEfG" -F file=@"/home/user/Desktop/exportedApiName.zip" -k -X POST "https://<host>:port/api-import-export-2.0.0-v0v3/import-api?preserveProvider=false"

    Note that the preserveProvider parameter value should be set to false.

...