Application (Individual)


Export an Application
GET https://apis.wso2.com/api/am/admin/v0.11/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/store/v0.11/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.11/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.\nExport Successful.\n

file

400

Bad Request.\nInvalid request or validation error\n

Error

404

Not Found.\nRequested Application does not exist.\n

Error

406

Not Acceptable.\nThe requested media type is not supported\n

Error

Import an Application
POST https://apis.wso2.com/api/am/admin/v0.11/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/store/v0.11/import/applications Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8

Response

HTTP/1.1 201 Created Location: https://localhost:9443/api/am/admin/v0.11/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.11/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.\nSuccessful response with the updated object information as entity in the body.\n

ApplicationInfo

207

Multi Status.\nPartially successful response with skipped APIs information object as entity in the body.\n

APIInfoList

400

Bad Request.\nInvalid request or validation error\n

Error

406

Not Acceptable.\nThe requested media type is not supported\n

Error