ActionKit dashboard reports are traditionally used to aggregate and reformat the results of SQL queries — but they can also be used to build useful interactive tools that invoke the API from within the admin interface.
To make it easier to build these powerful dashboards, I am releasing akapi-fetch.js, a small JavaScript library that lets you call the ActionKit API and process its results in this context.
It just takes a couple of lines of JavaScript to make an API call inside an ActionKit dashboard report, after which the results can be displayed in numerous ways.
<script>
$.getScript( 'https://greenthumbsoftware.com/akjs/akapi-fetch.js' )
.then( async function () {
var user_list = await akapi.get( 'user', search_criteria );
} );
</script>
You can use these API calls to create interactive dashboards that display data in new ways, or automate repetitive workflows, or enable processes which would otherwise be challenging to implement.
The akapi-fetch.js library is available for free as open source, both from this site and from GitHub.
Leave a Reply