Software Development Kits (SDKs) contain the necessary tool kits and documentation to create an application in a specific programming language/framework. SDKs provide native programming libraries that enable application developers to gain natural access to the APIs within the application code. If an API consumer wants to create an application, they can generate a client side SDK for a supported language/framework and use it to write a software application which can be used to consume the subscribed APIs.
Generating client SDKs
You need to have a valid API subscription in order to use the SDK. WSO2 API Manager (WSO2 API-M) allows SDK generation per API.
WSO2 API-M provides SDKs for Android, Java, and Python by default. If required, you can enable other languages/frameworks from a list of supported languages/frameworks.
If you plan on using one of the default languages/frameworks (i.e., Android, Java, and Python), then move to Step 3 to discover the default SDKs.
Step 1 - Define the SDK in the deployment.yaml
If you define at least one language/framework, only the SDK for the language/framework that you defined appears.
If you do not define any languages/frameworks the default three SDKs, namely Android, Java, and Python, appear.
- Open the
<API-M_HOME>conf/default/deployment.yamlfile and edit the file as follows.
Define the language/framework configurations.
Decide on the SDKs that you wish to define.
Add the connfigurations related to
apimgt:is not already defined, you need to define that as well as shown in the example below.
Copy and paste the language/framework definition from the Supported languages/frameworks for SDKs section.
It is important to use the exact terminology and indentation when defining the language/framework configurations.
For example let's define Android, Java, Python, C#, and Ruby as the languages/frameworks as follows:
Step 2 - Restart the WSO2 API-M server
After the file is saved, restart the WSO2 API-M server.
Step 3 - Select the SDK
- Sign in to the WSO2 API Store.
- Click on the API to view its details.
Click on the SDKS tab to see the list of downloadable SDKs.
The SDK list shows all the languages/frameworks that you defined.
You can use the search to filter out the specific SDK if there is a long list. The filter for the search option only appears if there are more than 5 languages/frameworks in the list.
Step 4 - Download the SDK
Click DOWNLOAD to download the SDK that corresponds to the preferred language/framework. You can use the SDK to write software applications in order to consume the API.
As mentioned above, a valid subscription should exist for the API. The SDK cannot be used without a valid access token for the subscription.
Supported languages/frameworks for SDKs
The following table lists the supported language/framework configurations to generate client SDKs.