Export an API version

GET /apim/export_version/{export_path}

Overview

This API exports 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}
     

Example

https://cdn.elastic.snaplogic.com/api/1/rest/public/apim/export_version/test_org/openapi/1.0?asset_types=[pipeline,job]/

Path Parameters

Key Description
export_path The path to the source API.

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

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 parameter setting is the same for the export of an API between different control planes/Orgs.

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

Example Response Body

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

Error Handling

Table 1.
HTTP Status Codes Status Description Resolution
200 Successful

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

N/A

404 Not Found

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

Verify if you have entered a correct API version.