Hi all,
This is the file structure of the exported zip file by the export API
exportedApp.zip
└── sampleApp
└── sampleApp.json
This is a sample.json file which is available within the exported zip file
{
"name": "sampleApp",
"uuid": "37f64328-1cd4-43ac-9eb1-ef9cd834c77e",
"description": "sample app",
"policy": {
"policyName": "50PerMin",
"isDeployed": false
},
"status": "APPROVED",
"createdUser": "admin",
"createdTime": {
"date": {
"year": 2017,
"month": 11,
"day": 15
},
"time": {
"hour": 11,
"minute": 4,
"second": 41,
"nano": 514000000
}
},
"updatedUser": "admin",
"updatedTime": {
"date": {
"year": 2017,
"month": 11,
"day": 15
},
"time": {
"hour": 11,
"minute": 4,
"second": 41,
"nano": 529000000
}
},
"applicationKeys": []
}
On Wed, Nov 15, 2017 at 11:44 PM, Randilu Soysa <[email protected]> wrote:
> Hi Nirmal,
>
> Currently only the application is migrated without subscriptions. Since
> the user base present in one environment won’t be available in the other we
> can migrate all applications regardless of the sharing. As i’m not
> migrating the OAuth applications, access tokens are not being dealt with.
>
>
> On Tue, Nov 14, 2017 at 5:05 PM, Nirmal Fernando <[email protected]> wrote:
>
>> Hi,
>>
>> On Tue, Nov 14, 2017 at 6:26 AM, Randilu Soysa <[email protected]> wrote:
>>
>>> Hi,
>>>
>>>
>>> Im working on Application Import Export feature for APIM 3.0.0 in order
>>> to migrate an application to different environments.
>>>
>>
>> Could you please elaborate more on the feature? How will it work? Will
>> you import all subscriptions as well? How will you deal with the access
>> tokens?
>> What happens if the application is a shared one? Will it be still shared?
>>
>>
>>> Two REST endpoints were implemented to export an application from one
>>> environment which could be imported to another environment in return to
>>> create a particular application.
>>>
>>>
>>> The implementation for this feature is as follows,
>>>
>>>
>>>
>>> 1.
>>>
>>> REST api to export an application
>>>
>>> Exports a prevailing application as a zip file which can be saved to a
>>> desired location.
>>>
>>>
>>> Sample request: GET https://localhost:9292/api/am/
>>> store/v1.0/export/applications?appId=xxx
>>>
>>> Headers Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
>>>
>>>
>>>
>>> 1.
>>>
>>> REST api to import an application
>>>
>>> Imports an application from an exported archive file.
>>>
>>> Sample request: POST https://localhost:9292/api/am/
>>> store/v1.0/import/applications
>>>
>>> Headers Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
>>>
>>
>> Can we not support bulk export/import?
>>
>>
>>>
>>>
>>>
>>> Need suggestions,
>>>
>>> 1.
>>>
>>> To come up with a suitable method name to extract application
>>> details from the imported file [1].
>>> 2.
>>>
>>> To find out file permission issues which may occur while
>>> write/delete to/from a file, creating directories and getting tmp
>>> directory
>>> path in different platforms including Windows and Mac OS.
>>>
>>>
>>> [1]https://github.com/randilu/carbon-apimgt/blob/importExpor
>>> tAppsFeature/components/apimgt/org.wso2.carbon.apimgt.rest.a
>>> pi.store/src/main/java/org/wso2/carbon/apimgt/rest/api/store
>>> /utils/FileBasedApplicationImportExportManager.java
>>>
>>>
>>> Appreciate your feedback!
>>>
>>>
>>>
>>> Regards,
>>>
>>> --
>>> *Randilu Soysa*
>>> Software Engineering Intern | WSO2
>>>
>>> Email : [email protected]
>>> Mobile : +94 77 197 5078 <+94%2077%20197%205078>
>>> linkedin : linkedin.com/in/randilusoysa
>>> Web : http://wso2.com
>>>
>>> <http://wso2.com/signature>
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> [email protected]
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>>
>> --
>>
>> Thanks & regards,
>> Nirmal
>>
>> Technical Lead, WSO2 Inc.
>> Mobile: +94715779733 <+94%2071%20577%209733>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>>
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> *Randilu Soysa*
> Software Engineering Intern | WSO2
>
> Email : [email protected]
> Mobile : +94 77 197 5078 <+94%2077%20197%205078>
> linkedin : linkedin.com/in/randilusoysa
> Web : http://wso2.com
>
> <http://wso2.com/signature>
>
--
*Randilu Soysa*
Software Engineering Intern | WSO2
Email : [email protected]
Mobile : +94 77 197 5078
linkedin : linkedin.com/in/randilusoysa
Web : http://wso2.com
<http://wso2.com/signature>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture