Javascript API Client

<< Click to Display Table of Contents >>

Navigation:  Web UI & API > Extending UI & API >

Javascript API Client

The global apiClient object provides a streamlined JavaScript HTTP client for interacting with DDK REST-API endpoints. It includes built-in methods for managing infodrivers, parameters, and database operations, and can also access custom endpoints extended within the DDK framework.

 

This client is readily available in JavaScript files – simply invoke apiClient methods anywhere to communicate with the APIs.

 

Example:

 

//Returns array of bncs instances
  let instances = await apiClient.getInstances();
  console.log("Available Instances: " + instances.length);

 

The methods available on the client and examples on how to use them are shown below: