Hyper Agile API Development Platform

What is Chancla.io?

Cloud-Native IDE Dedicated for API Development

With Chancla.io, software developers may rapidly develop APIs that integrate with third-party services, such as, MongoDB (mLab.com), Redis (redislabs.com), and Amazon Aurora to name a few.

Software developers, of all skill levels, are amazed how effortlessly they are able to build and deploy APIs with Chancla.io.

Click here to try our Add to Cart and View Cart APIs Using MongoDB (mLab.com).

A Rapid Dev Environment to Build Mock APIs and Prototypes

Front-end developers and designers, we did not forget about you. Chancla.io allows non-developers to build Mock APIs for rapid application prototyping.

With Chancla.io, non-software developers may create Mock APIs with the Groovy scripting language, or using a simple macro language that we developed. When it's time to deploy the APIs, only a single mouse click is required to publish the APIs to cloud.

Click here to build your first JSON-based Mock API

A Cloud-Based API Test Client

Testers, we know how difficult and important your role is in API software development projects. The project does not ship until the APIs pass your test cases and validations.

With Chancla.io, testers are able to build, and execute API test cases in the cloud to verify the APIs are working as expected. As always with Chancla.io, there is no software to install on your local machines.

Click here to build your first Cloud-based API Test Client

Features

Hyper Agile Development

At the heart of Chancla.io, is an Java/Groovy framework optimized for serverless application development and deployment.

Chancla.io possesses the dynamic development features of Python and the compiled code advantages of Java.

Real-Time Application Deployment

Chancla.io compiles code according to JVM bytecode best practices and deploys it instantly to the cloud. No more lengthy, late-night deployments needed.

With Chancla.io, zero downtime is required to deploy new features to production.

Exceptional Performance

Chancla.io is fast! Behind the scenes, Chancla.io applies a series of code optimization techniques to ensure your code is running on all cylinders.

Performance is top of mind for Chancla.io, our goal is to proivde our clients the industry's fastest cloud-based application run-time.

Quick Start Tutorials

Hello World Run in Code Editor

This is the first software program usually developed when learning a new programming language.

                                        
println("Hello World");
                                
                            

Simple Mock JSON API Run in Code Editor

Create Mock APIs in minutes! Run this code example in the Code Editor and see for yourself.

                                chanclaJSONBuilder.customer(
  firstName: 'John',
  lastName: 'Smith',
  streetAddress: '12 Brooks Street',
  city: 'Lemoore',
  state: 'CA',
  country: 'US'
);                                
                            

Simple Mock XML API Run in Code Editor

Learn how simple it is create Mock XML API with the Chancla.io XML library.

chanclaXMLBuilder.customer() { 
        firstName("John");
        lastName ("Smith"); 
        streetAddress("12 Brooks Street");
        city("Lemoore");
        state("CA");
        country("US")
};
                            

Mock JSON API with a Data Set Run in Code Editor

A slightly more complicated Mock JSON API that returns a list of customers.

                                   def customer = [ 
    [ getFirstName : { 'John' }, getLastName : { 'Smith' }, 
    getStreetAddress : { '12 Brooks Street' }, getCity : { 'Lemoore' }, 
    getState : { 'CA' },getCountry : { 'US' }],

    [ getFirstName : { 'Jorge' }, getLastName : { 'Lopez' }, 
    getStreetAddress : { '2 Zapato Calle' }, getCity : { 'Tijuana' },
    getState : { 'BC' },getCountry : { 'MX' }], 
    
    [ getFirstName : { 'Stymie' }, getLastName : { 'Jackson' },
    getStreetAddress : { '232 Broadway' }, getCity : { 'New York' },
    getState : { 'BNYC' },getCountry : { 'US' } ]     
];

chanclaJSONBuilder {
    customers customer.collect { 
        [ 
            firstName: it.getFirstName(), 
            lastName: it.getLastName(), 
            streetAddress: it.getStreetAddress(),
            city: it.getCity(),
            state: it.getState(),
            country: it.getCountry()
        ] 
    }
};
                            

Simple API JSON-Based Test Client Run in Code Editor

This starter example provides the foundation to build your own JSON API client for your specific project needs. The API used in this example is NASA's Planet of the Day API.

For security purposes, Chancla.io stores and encrypts all third-party API security keys on its servers. During run-time, Chancla.io replaces the security token with the real API security key before calling the third-party API.

                                def jsonContents = 
"https://api.nasa.gov/planetary/apod?api_key={{nasa_gov_security_key}}"
.toURL().text;
 
def json = chanclaJSONParser.parseText(jsonContents);

println "Copyright: " + json.copyright;
println "Date:  "  + json.date;
println "Explanation: " + json.explanation;

Date date = new Date();
println "Date Time Ran: " + date.toString();
                                
                            

Add to Cart and View Cart APIs Using mLab.com (MongoDB-as-a-Service) Run in Code Editor

Learn how to quickly create a practical Add to Cart and View Cart APIs with this example. You will the use the Chancla.io mLab.com (https://www.mlab.com) account to help familiarize yourself with creating an add to cart service using MongoDB.

As a reminder, Chancla.io stores and encrypts all third-party API security keys on its servers. During run-time, Chancla.io replaces the security token with the real API security key before calling the third-party API.

                                chanclaJSONBuilder.cart(
 cartId: cartId,
 productSku: productSku,
 productName: productName,
 productPrice: productPrice,
 productQty: productQty
);

def post = 
new URL("https://api.mlab.com/api/1/databases/commerce-db/collections/cart?apiKey={{mlab_security_key}}")
.openConnection();
def message = chanclaJSONBuilder.toPrettyString();
post.setRequestMethod("POST");
post.setDoOutput(true);
post.setRequestProperty("Content-Type", "application/json");
post.getOutputStream().write(message.getBytes("UTF-8"));
def postRC = post.getResponseCode();

/** get the cart contents */
def cart = new URL(
"https://api.mlab.com/api/1/databases/commerce-db/collections/cart?apiKey={{mlab_security_key}}&q={'cart.cartId':'"+cartId+"'}")
.text;

println cart;
                            

API Test Client (JSON Response) Run in Code Editor

Create your own API Client testing harness, and generate JSON-based API testing data reports.

As a reminder, Chancla.io stores and encrypts all third-party API security keys on its servers. During run-time, Chancla.io replaces the security token with the real API security key before calling the third-party API.

                                def jsonContents = 
"https://api.nasa.gov/planetary/apod?api_key={{nasa_gov_security_key}}".toURL().text;
 
def jsonResponse = chanclaJSONParser.parseText(jsonContents);

class TestCaseCollection {
    String name;
    List testCases = [];
};

class TestCase {
    String name;
    String expectedValue;
    String actualValue;
    
    def passFail() {
        return (expectedValue == actualValue) ? "Pass" : "Fail";
    }
};

TestCaseCollection tcc = new TestCaseCollection(name:"Testing the Astronomy Picture of the Day API");
tcc.testCases << new TestCase(name: "Confirm Version Number",
expectedValue: "v1", actualValue:jsonResponse.service_version);
tcc.testCases << new TestCase(name: "Confirm Copyright Contains Value",
expectedValue: true, actualValue: (jsonResponse.copyright != null));
tcc.testCases << new TestCase(name: "Confirm Explanation Contains Value",
expectedValue: true, actualValue: (jsonResponse.explanation != null));

chanclaJSONBuilder {
    TestCaseReport {
        name  tcc.name; 
        testCases(
        tcc.testCases.collect{ 
               TestCase tc -> [expectValue: tc.expectedValue, actualValue:tc.actualValue,
                              passFail: tc.passFail()]
            }   
    )
    }
};
                            

API Test Client (HTML Response) Run in Code Editor

Create your own API Client testing harness, and generate HTML-based API testing data reports.

As a reminder, Chancla.io stores and encrypts all third-party API security keys on its servers. During run-time, Chancla.io replaces the security token with the real API security key before calling the third-party API.

                                def jsonContents = 
"https://api.nasa.gov/planetary/apod?api_key={{nasa_gov_security_key}}".toURL().text; 
 
def jsonResponse = chanclaJSONParser.parseText(jsonContents);

class TestCaseCollection {
    String name;
    List testCases = [];
};

class TestCase {
    String name;
    String expectedValue;
    String actualValue;
    
    def passFail() {
        return (expectedValue == actualValue) ? "Pass" : "Fail";
    }
};

TestCaseCollection tcc = new TestCaseCollection(name:"Testing the Astronomy Picture of the Day API");
tcc.testCases << new TestCase(name: "Confirm Version Number",
expectedValue: "v1", actualValue:jsonResponse.service_version);
tcc.testCases << new TestCase(name: "Confirm Copyright Contains Value",
expectedValue: true, actualValue: (jsonResponse.copyright != null));
tcc.testCases << new TestCase(name: "Confirm Explanation Contains Value",
expectedValue: true, actualValue: (jsonResponse.explanation != null));

chanclaHTMLBuilder.html() { 
        
        head {
            title ("API Test Client Developed with Chancla.io"); 
            
            style ("""
                   table {
                        border-collapse: collapse; 
                        border:1px solid #69899F;
                    } 
                    table td{
                        border:1px dotted #000000;
                        padding:5px;
                    }
                    table td:first-child{
                        border-left:0px solid #000000;
                    }
                    table th{
                       border:2px solid #69899F;
                       padding:5px;
                    } 
                    td.Fail {
                        background-color: red;
                        color:white;
                    } 
                     td.Pass {
                        background-color: green;
                        color:white;
                    }
                    
                    """);

        };
        body { 
            h1 ("Report Name: " + tcc.name);
      
            table {
                 tr{
                    th("Test Name");
                    th("Expected Value");
                    th("Actual Value");
                    th("Pass/Fail");
            }; 
                   tcc.testCases.collect{ 
                   TestCase tc ->
                   tr {
                         td(tc.name); 
                         td(tc.expectedValue);
                         td(tc.actualValue);
                         td(class : tc.passFail(), tc.passFail());
                        }; 
                       
                }; 
           };
           
           p ("API Test Client Developed with Chancla.io"); 
     };
      
};