Module powertoolsdeveloper.collections

ballerinax/powertoolsdeveloper.collections Ballerina library



This is a generated connector for Apptigent PowerTools Developer API v2021.1.01 OpenAPI specification. Apptigent PowerTools Developer Edition is a powerful suite of API endpoints for custom applications running on any stack. Manipulate text, modify collections, format dates and times, convert currency, perform advanced mathematical calculations, shorten URL's, encode strings, convert text to speech, translate content into multiple languages, process images, and more. PowerTools is the ultimate developer toolkit. This connector provides the capability to modify collections.


Before using this connector in your Ballerina application, complete the following:

  • Create Apptigent account
  • Obtain tokens
    1. Log into Apptigent Developer Portal by visiting
    2. Create an app and obtain the Client ID which will be used as the API Key by following the guidelines described here.


To use the Apptigent PowerTools Developer connector in your Ballerina application, update the .bal file as follows:

Step 1: Import connector

Import the ballerinax/powertoolsdeveloper.collections module into the Ballerina project.

import ballerinax/powertoolsdeveloper.collections as pc;

Step 2: Create a new connector instance

Create a collections:ApiKeysConfig with the Client ID obtained, and initialize the connector with it.

pc:ApiKeysConfig config = {
    xIbmClientId: "<CLIENT_ID>"
pc:Client baseClient = check new Client(config);

Step 3: Invoke connector operation

  1. Now you can use the operations available within the connector. Note that they are in the form of remote operations.

    Following is an example on how to sort a collection of strings using the connector by providing the collection of strings to sort and the sort order.

    Sort a collection of strings

    public function main() {
        pc:InputCollectionSort inputCollectionSort = {
            input: ["a","d","c","b","e"],
            'order: "Ascending"
        pc:OutputCollectionResult|error response = baseClient->sortCollection(inputCollectionSort);
        if (response is pc:OutputCollectionResult) {
        } else {
  2. Use bal run command to compile and run the Ballerina program.


import ballerinax/powertoolsdeveloper.collections;Copy


Released date: 12 months ago

Version: 1.5.0

License: Apache-2.0


Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes

Pull count

Total: 0

Current verison: 0

Weekly downloads

Source repository


Website & App Building/App Builders



Other versions

See more...