WSO2 APIM storing files in gov registry - wso2

I have another question on WSO2 APIM 2.6.0
I am working in one scenario where I have to store one file which is in json in gov registry. I can do that manually from the dashboard but I am looking for a way to perform that using API or in automated way.
Research done till now
1) Checking on the link which ideally enable WSO2 ESB to maintain a remote registry. But I am unable to get how the registry DB will be shared between the applications (APIM and ESB).
Like, ESB has property where we can store the data in registry directly from proxy or an API and also enables us to retrieve them accordingly.
But how do we do in APIM to store the file with json content.
Any suggestions here.
Thanks

Related

wso2 EI/ESB setting up a antivirus possible?

I'm working on a project that needs to subscribe to the api's of multiple social media channels, for this reason we are using wso2 EI and for security protection I would like to intercept the message contents having attachements and fire an antivirus if possible to check the contents.
I have been searching over the web and the wso2 documentation but I have very few info regarding this.Kindly suggest if there is any alternative or if possible any configuration that can be done in the esb.

Disable analzer in WSO2 API Manager

So quick question regarding WSO2 API manager and BAM from what I can tell Bam saves the basic requests to the API manager to the DB and the Publisher then reads from the DB when displaying the stats. At what point in the analyzer part of BAM in action ie Casandra and Hadoop. Or does that just get used if I write my own hive queries?
Thanks
When you integrate WSO2 BAM with API Manager for Analytics following happens.
API Manager publishers data using thrift for BAM.
There are hive scripts which is included in the toolbox. There are scheduled and when they are running summarized data will be inserted into the databases.

WSO2 APIM - api file deployment

deploying the WSO2 APIM 2.1.0 using puppet, we consider to deploy the API itself with the CICD as well.
In theory - I could copy (template) the synapse files (proxy, api) and the api is available for the call, however - the API is not visible in the store. I assume there's more data in the database than just a synapse config file.
Is there a way to define / deploy API (including to the store) using the configuration files or it needs to be done manually?
Edit:
I thought there's a way to deploy API using the API Admin Services. But when calling addAPI with the metadata XML, looks ok. But trying to see the API in the publisher throws an exception
ERROR - index:jag org.wso2.carbon.apimgt.api.APIManagementException: Unable to find the API: admin-myapi-v1.0.0 in the database
Thank you for any hint
g.
Based on your requirements it looks like you can use one of the following options.
Migrate APIs - You can export APIs from one environment and import those APIs to the new environment. When you import APIs in the new environment, those APIs will be in created state. You need to manually publish those APIs. May be using the jaggery API or REST API you will be able to publish the APIs.
REST API
Jaggery API - This is deprecated at the moment and discourage for using this.
Once you create the APIs, APIs related details will be saved in the database. Additionally, synapse configuration can be found in the file system. If you point the previous database to the new deployment and deploy the synapse artifacts, APIs will work. But then again API creation/publishing and entire flow will not be tested. For CICD, you need to consider above mentioned options. In the future releases, there is more focus towards the REST API and it will be more useful for the CICD.

Accessing WSO2 BPS and ESB registry from code

I am trying to access the registry of WSO2 BPS and WSO2 ESB from Java in order to automatically fill the registry based on the data I provide.
I have already found a number of resources about the required Java code and dependencies, this being the most helpful one: [WSO2 Governance Registry]Using WSRegistryServiceClient. However, the approach described in these resources depends on the WSRegistryService service. This service is included in Governance Registry by default, but not in the other WSO2 products. I have verified that my code works for the Governance Registry. For any other WSO2 product on my machine, I get this error:
The service cannot be found for the endpoint reference (EPR) https://localhost:9445/services/WSRegistryService
I found an old thread suggesting that it should be possible to install the WSRegistryService on other WSO2 products as well, but I have not been able to find out how to do so. I can't seem to find it within the features I can install from the web console of the products. I have also tried manually copying the relevant jar from the plugins directory of Governance Registry into the plugins directory of other products, but that doesn't seem to be sufficient.
Note that my application for filling the registry will not be running on the carbon server whose registry I want to access, so using CarbonContext.getThreadLocalCarbonContext() (an approach I found in some other articles) is not an option.
I think your referring to how to install features to WSO2 products,
Please find this documentation.

Is there a option to import downloaded APIs from WSO2 API Manager

I have downloaded one API (as api.zip file), which I created in WSO2 API Manager from the Administation console. Is there a way to import this API in different WSO2 instance?
Any suggestions??
Data of a published API from APIPublisher stored in three places.
In file-system [as a synapse config API element]
In database level
-- as registry data [stored API static meta-data]
-- as directly stored data in APIM db [stored API runtime data]
I believe you have downloaded the API element from Metadata-> List-> APIs in management console,which is stored in registry space.To restore a created API in another wso2 AM instance,this downloaded API element is not sufficient.
If you want to backup API data from one APIManager instance and restore in another instance,what you have to do is backup both above file-system and database specific data and restore.Other than that,currently there's no direct download and upload mechanism to do API backup and restoring process in WSO2 APIManager.
Thanks;