carbon-analytics.js file. This can be exposed as follows: <DAS_URL>:<DAS_PORT>/portal/js/carbon-analytics.js
Creating the analytics client for the JS API
AnalyticsClient module as follows.
Create the connection object with the following details.
Currently due to a limitation, client applications should be deployed in the same domain as the Dashboard server. i.e - DAS_HOME/repository/deployment/server/webapps
Success callback function and error callback functions of the JS API
All methods of the Analytics JS API have a success function and an error function as callbacks representing successful invocations and erroneous invocations. Success callback has one argument which will contain the response it returns if the invocation is successful. It represents a JSON String of the following format.
Error callback has one argument which will contain an error message if the invocation is failed. Its JSON representation is as follows.