This sample code dowloads all the API documentations from WSO2 API Manager to local machine. Later this API definitons can be used to view the APIs using private Swagger UI.
org.wso2.api.client.constantAPIDownloaderConstant class should bemodified before running the main class. You have to modify the user name,password, client trust store information etc.