Hi Imesh,

On Mon, Jan 16, 2017 at 10:54 AM, Imesh Gunaratne <[email protected]> wrote:

> Hi Isuru,
>
> The proposed design looks good! One question, will we also be able to
> extract and import API subscriptions similar to this from one environment
> to another assuming that both environments are connected to the same user
> store?
>
Currently, this effort is focused on importing an API only. AFAIU sharing
the user store between environment is not very common, specially between
prod and non-prod environments. Its technically possible to move
subscriptions between environments. But not sure if this will be required
in a practical situation.

>
> Thanks
> Imesh
>
> On Tue, Jan 10, 2017 at 11:22 AM, Isuru Haththotuwa <[email protected]>
> wrote:
>
>> Hi Devs,
>>
>> This is to discuss subject.
>>
>> *Requirement:*
>>
>> Once an API is exported, its possible to be directly imported in to
>> another APIM deployment in a separate environment. For an admin user, it
>> should be possible to export all APIs in one deployment to another one.
>>
>> The following information will be available in exported data, related to
>> a single API:
>>
>>    - Docs
>>    - API definition (JSON formatted)
>>    - Swagger file (JSON formatted)
>>    - Gateway configuration
>>    - API thumbnails (image)
>>
>> Several new resources will be added to the publisher rest API to cater
>> this, as follows:
>>
>> *GET **/apis/{apiId}**/export-config*
>>
>>    - Produces a form/multipart output as a zip archive, which will have
>>    the following structure and which will comprise of the above mentioned
>>    items:
>>
>> *          <provider-name>-<api-name>-<*
>>
>> *api-version>.zip                    |*
>>
>>
>> *                    | --- Docs                    |        |*
>> *                    |        | --- *<documentation_id>
>>                    * |  *
>> * |*
>> *                    |                        | ---* documentation
>> metadata (json)
>>                   *  |                        | ---* documentation
>> content (optional)
>>
>> *                    |*
>>
>>
>> *                    | --- Gateway-Config                    |
>>              |*
>> *                    |              | --- *gateway config file
>>
>> *                    |*
>> *                    | --- *thumbnail file
>>
>> *                    |*
>> *                    | --- *api definition (json)
>>
>> *                    |*
>> *                    | --- *swagger definition (json)
>>
>>
>> Note that there can be multiple docs for a single API.
>>
>> *GET **/apis/export-config*
>>
>>    - Produces a zip archive comprising of the above structure for each
>>    API in the system. This operation will be permitted for admin users only.
>>
>>
>> *POST **/apis**/{apiId}**/import-config*
>>
>>    - Consumes the same zip archive produced by the
>>    /{apiId/}export-config resource as a form/multipart input, extracts and
>>    inserts the relevant data.
>>
>>
>> *POST *
>> */apis/import-config*
>>
>>    - Consumes the same zip archive produced by the /export-config
>>    resource as a form/multipart input, extracts and inserts the relevant data
>>    for all APIs. Should be permitted only for admin users.
>>
>>
>> This does not consider the endpoint information [1] yet. Would need to
>> incorporate that here in a suitable way.
>>
>> Please share your feedback.
>>
>> [1]. [Architecture] [APIM][C5] - Definining Endpoint for Resource from
>> Rest API
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048 <071%20635%208048>* <http://wso2.com/>*
>>
>>
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> *Imesh Gunaratne*
> Software Architect
> WSO2 Inc: http://wso2.com
> T: +94 11 214 5345 M: +94 77 374 2057 <077%20374%202057>
> W: https://medium.com/@imesh TW: @imesh
> lean. enterprise. middleware
>
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* <http://wso2.com/>*
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to