Export an API version

GET /apim/export_version/{export_path}

Overview

This API exports either 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.

Prerequisites

  • Read permission to export the API version

Request

 GEThttps://{control_plane_path}/api/1/rest/public/apim/export_version/{export_path}?{query_parameter}
     

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

Specify Basic for authorization and multipart/form-data for content type.

 Authorization: Basic {your_encoded_security_credentials}
Content-Type: multipart/form-data

Request body

None

Response

Response body

 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.