API SDK Documentation

Introduction

Get started quickly using Cloudsto.re API with the Cloudsto.re SDK for various languages or platform. The SDK helps take the complexity out of coding by providing language specific objects for Cloudsto.re API services. The single, downloadable package includes the required Library and documentation. See under each language section for more details.

The following diagram provides a high-level overview of access to Cloudsto.re services  with the Cloudsto.re SDKs.

 

Applications can access the Cloudsto.re Services directly through the Cloudst.re REST API Gateway Service, or alternatively using a Cloudsto.re SDK in one of the supported language or platform. Each SDK provides a programming interface for working with Cloudsto.re Services by wrapping a high-level layer around the low-level Cloudsto.re API calls. The SDK handles the HTTP(s) request via the API interface using the language specific high-level function calls.

Each of the Cloudsto.re SDKs provides important services to your application, including the following:

  • Formatting HTTP(S) requests and serializing request parameters.
  • Forwarding request to a Cloudsto.re API endpoint and receiving responses from the service.
  • Extracting the results from those responses.

If the request is successful, service returns an HTTP 200 response code (OK). If the request is unsuccessful, service returns an HTTP error code and an error message.

Suggest edit
Last updated on February 4, 2019

JavaScript

Download Latest JavaScript SDK (Version 3 Feb 2019)

Download

 

Use of JavaScript SDK for REST API

    • Extract the contents of the API SDK .zip file you downloaded above.
    • In your project, Include references to the following scripts.
<script type="text/javascript" src="lib/axios/dist/axios.standalone.js"></script>
<script type="text/javascript" src="lib/CryptoJS/rollups/hmac-sha256.js"></script>
<script type="text/javascript" src="lib/CryptoJS/rollups/sha256.js"></script>
<script type="text/javascript" src="lib/CryptoJS/components/hmac.js"></script>
<script type="text/javascript" src="lib/CryptoJS/components/enc-base64.js"></script>
<script type="text/javascript" src="lib/url-template/url-template.js"></script>
<script type="text/javascript" src="lib/apiGatewayCore/sigV4Client.js"></script>
<script type="text/javascript" src="lib/apiGatewayCore/apiGatewayClient.js"></script>
<script type="text/javascript" src="lib/apiGatewayCore/simpleHttpClient.js"></script>
<script type="text/javascript" src="lib/apiGatewayCore/utils.js"></script>
<script type="text/javascript" src="apigClient.js"></script>
    • In your code, initialize the SDK  by using code similar to the following.
var apigClient = apigClientFactory.newClient();
    • Call the API methods from Cloudsto.re API service by using code similar to the following. Each call returns a promise with a success and failure callbacks.
var body = {
   // This is where you define the body of the request,
};

var additionalParams = {
      // If there are any unmodeled query parameters or headers that must be
      // sent with the request, add them here.
      headers: {
          param0: '',
          param1: ''
      },
      queryParams: {
          param0: '',
          param1: ''
      }
};

apigClient.methodName(null, body, additionalParams)
   .then(function(result){
        // Add success callback code here.
    }).catch( function(result){
        // Add error callback code here.
});


Suggest edit
Last updated on April 23, 2020

Android

Download Latest Android SDK (Version 1.0.0 Feb 2019)

Download

 

Use of Android SDK for REST API

Note - The Android SDK is not compatible with Android 4.4 and earlier

 

    • Extract the contents of the API SDK .zip file that you downloaded above.
    • download and install Apache Maven (preferably version 3.x).
    • Download and install the JDK (preferably version 1.7 or later).
    • Set the JAVA_HOME environment variable.
    • Run the mvn install command to install the compiled artifact files to your local Maven repository. This creates a target folder containing the compiled SDK library.
    • Copy the SDK file cloudstore-apigateway-api-sdk-1.0.0.jar from the target folder, along with all of the other libraries from the target/lib folder, into your project’s lib folder.

    If you use Android Studio, create a libs folder under your client app module and copy the required .jar file into this folder. Verify that the dependencies section in the module’s gradle file contains the following.

    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile fileTree(include: ['*.jar'], dir: 'app/libs')

    Make sure no duplicated .jar files are declared.

    • Use the ApiClientFactory class to initialize the API Gateway-SDK. For example:
ApiClientFactory factory = new ApiClientFactory();

// create a client
final AODClient client = factory.build(AODClient.class);

// Invoke your apikeyPost method
Empty  output = client.apikeyPost();

// you also have access to your API models
Empty myModel = new Empty();

```
Suggest edit
Last updated on April 23, 2020

iOS

Objective-C

Download Latest iOS Objective-C SDK (Version 1.0.0 Feb 2019)

Download

 

Suggest edit
Last updated on April 23, 2020

Swift

Download Latest iOS Swift SDK (Version 1.0.0 Feb 2019)

Download

 

Suggest edit
Last updated on April 23, 2020

Java

Coming Soon …..

Suggest edit
Last updated on February 4, 2019

Ruby

Coming Soon …….

Suggest edit
Last updated on December 30, 2019
Suggest Edit
Back to top

Shopping Cart