API (Individual)


Export an API

GET https://apis.wso2.com/api/am/admin/v0.16/export/api

This operation can be used to export the details of a particular API as a zip file.

OAuth 2.0 Scope

Not required

Examples

Parameters

Type Name Description Schema Default
Query

name

required

API Name

String

Query

version

required

Version of the API

String

Query

providerName

required

Provider name of the API

String

Query

format

required

Format of output documents. Can be YAML or JSON.

Accepted values:

JSON YAML
String

Query

preserveStatus

optional

Preserve API Status on export

Boolean

Responses

HTTP Code Description Schema

200

OK. Export Successful.

file

404

Not Found. Requested API does not exist.

Error

500

Internal Server Error. Error in exporting API.

Error

Import an API

POST https://apis.wso2.com/api/am/admin/v0.16/import/api

This operation can be used to import an API.

OAuth 2.0 Scope

Not required

Examples

Parameters

Type Name Description Schema Default
Form

file

required

Zip archive consisting on exported api configuration

File

Query

preserveProvider

optional

Preserve Original Provider of the API. This is the user choice to keep or replace the API provider.

Boolean

Query

overwrite

optional

Whether to update the API or not. This is used when updating already existing APIs.

Boolean

Responses

HTTP Code Description Schema

200

Created. API Imported Successfully.

403

Forbidden Not Authorized to import.

Error

404

Not Found. Requested API to update not found.

Error

409

Conflict. API to import already exists.

Error

500

Internal Server Error. Error in importing API.

Error