@Path(value="/") public class APIService extends Object
| Constructor and Description |
|---|
APIService() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
exportAPI(String name,
String version,
String providerName,
javax.ws.rs.core.HttpHeaders httpHeaders)
This service exports an API from API Manager for a given API ID
Meta information, API icon, documentation, WSDL and sequences are exported
This service generates a zipped archive which contains all the above mentioned resources
for a given API
|
javax.ws.rs.core.Response |
importAPI(InputStream uploadedInputStream,
String defaultProviderStatus,
javax.ws.rs.core.HttpHeaders httpHeaders)
This is the service which is used to import an API.
|
@GET
@Path(value="/export-api")
@Produces(value="application/zip")
public javax.ws.rs.core.Response exportAPI(@QueryParam(value="name")
String name,
@QueryParam(value="version")
String version,
@QueryParam(value="provider")
String providerName,
@Context
javax.ws.rs.core.HttpHeaders httpHeaders)
name - Name of the API that needs to be exportedversion - Version of the API that needs to be exportedproviderName - Provider name of the API that needs to be exported@POST @Path(value="/import-api") @Consumes(value="multipart/form-data") @Produces(value="application/json") public javax.ws.rs.core.Response importAPI(InputStream uploadedInputStream, @QueryParam(value="preserveProvider") String defaultProviderStatus, @Context javax.ws.rs.core.HttpHeaders httpHeaders)
uploadedInputStream - uploadedInputStream input stream from the REST requestdefaultProviderStatus - user choice to keep or replace the API providerhttpHeaders - HTTP headers for the authentication mechanismCopyright © 2018 WSO2 Inc. All rights reserved.