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
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to