Export an API version

GET https://{controlplane_path}/api/1/rest/public/apim/export_version/{export_path}      

Export a published or unpublished API version using the GET method between control planes/Orgs. The API version is an exported ZIP file that has all the API version-related metadata encapsulated in an export JSON file.

Important: This page describes a Classic APIM API.

Prerequisites

  • Read permission to export the API version

Example

This example uses Basic authentication. For a JWT example, refer to Authentication.

curl -X 'GET' \
  'https://elastic.snaplogic.com/api/1/rest/public/apim/export_version/acme/apim/BookStore/1.0?asset_types=Pipeline,Account&force=true' \
  -H 'Authorization: Basic {base64_encoded email:password}'

Path parameters

Key Description
export_path The path to the source API.

Format:{org_name}/apim/{api_name}/{api_version name}

Note: The path is case-sensitive.

Query parameters

Key Type Description
asset_types array

The list of Asset types to export:

  • Account
  • File
  • Job (task)
  • Pipeline
  • Policy

Default: All valid asset types.

force boolean

If true, the API version is exported regardless of the file size limit:

  • true

  • false

Note: The query parameter setting to export API versions between Orgs is same as the above table.

Request header

Use the multipart/form-data content type with basic authentication (email and password). For examples, refer to Authentication.

Request body

None

Response

 A .zip file containing the API version files is downloaded.
  

Error handling

{
    "http_status_code": 404,
    "response_map": {
        "error_list": [
            {
                "message": "The asset does not exist: Automation2/apim/test2/1.1"
            }
        ]
    }
}
HTTP status codes Status Description Resolution
200 Successful

An array of objects that contain, the successfully exported node ID, asset, or expression file.

N/A

404 Not Found

When you export an API version that does not exist in the APIM, you receive this message.

Verify that you have entered a correct API version.