Here are some useful notes on API changes in Mango 2.6 which is currently available as beta.

  1. We have some new examples and are working on more but your legacy code should still work. We highly recommend moving away from the legacy javascript API, but we try to keep backward compatibility as best we can. We do have a few sites that we have created custom dashboards for with the legacy API, so it is in our interest to keep this compatibility.

The largest changes to the REST api that will affect your javascript code are:

a. We made the URLs more URL-like by replacing Camel Case with dashes, for example the endpoint /rest/v1/pointValues.json is now /rest/v1/point-values.json

b. We moved the 3rd party javascript libraries into the core so the URL for them is now at /resources

c. We are now using require.js for the new Javascript API. This is not necessary for the legacy API, but it does simplify the code for the new API.

d. We put an RQL endpoint for most resources as the base endpoint. So for example previously /rest/v1/dataPoint.json would list all data points , it now is an RQL endpoint. Note that RQL endpoints require some RQL to be passed in. For example /rest/v1/data-points.json is no longer valid, it can be /rest/v1/data-points.json?limit(100)

e. We re-worked the /mango-javascript/ URL mapping, where /mango-javascript/v1/ used to point to the mango javacript API version 1 it would now be /mango-javascript/mango/v1/

There are some new example files in the 2.6 dashboard folder under web/modules/dashboards/web/private/tutorials. We will continue to work on adding more examples.