Application (Individual)


Export an Application

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

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

OAuth 2.0 Scope

apim:app_import_exporti

Request

GET https://localhost:9443/api/am/admin/v0.14/export/applications?appName=sampleApp&appOwner=admin Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8

Response

HTTP/1.1 200 OK Connection: keep-alive Content-Disposition: attachment; filename="exported-application.zip" Content-Type: application/zip

Sample CURL

curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -X GET https://localhost:9443/api/am/admin/v0.14/export/applications?appName=sampleApp&appOwner=admin > admin_sampleApp.zip

Parameters

Type Name Description Schema Default
Query

appName

required

Application Name

String

Query

appOwner

required

Owner of the Application

String

Responses

HTTP Code Description Schema

200

OK. Export Successful.

file

400

Bad Request. Invalid request or validation error

Error

404

Not Found. Requested Application does not exist.

Error

406

Not Acceptable. The requested media type is not supported

Error

Import an Application

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

This operation can be used to import an Application.

OAuth 2.0 Scope

apim:app_import_exporti

Request

POST https://localhost:9443/api/am/admin/v0.14 /import/applications Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8

Response

HTTP/1.1 201 Created Location: https://localhost:9443/api/am/admin/v0.14/applications/c30f3a6e-ffa4-4ae7-afce-224d1f820524 Content-Type: application/json { "groupId": "", "callbackUrl": "http://my.server.com/callback", "owner": "admin", "applicationId": "c30f3a6e-ffa4-4ae7-afce-224d1f820524", "status": "APPROVED", "name": "sampleapp" }

Sample CURL

curl -k -F "file=@exported.zip" -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" https://localhost:9443/api/am/admin/v0.14/import/applications

Parameters

Type Name Description Schema Default
Form

file

required

Zip archive consisting of exported Application Configuration.

File

Query

preserveOwner

optional

Preserve Original Creator of the Application

Boolean

Query

skipSubscriptions

optional

Skip importing Subscriptions of the Application

Boolean

Query

appOwner

optional

Expected Owner of the Application in the Import Environment

String

Responses

HTTP Code Description Schema

200

OK. Successful response with the updated object information as entity in the body.

ApplicationInfo

207

Multi Status. Partially successful response with skipped APIs information object as entity in the body.

APIInfoList

400

Bad Request. Invalid request or validation error

Error

406

Not Acceptable. The requested media type is not supported

Error