Access to query data from API endpoints

Yes, to get the data from a query you need to know the query’s ID. You can see the ID in the browser’s address bar when you run a query. To make an API request for the data you can do a query like this with CURL, with $api_key and $api_username set to the API credentials from your site and $query_id set to the query’s id.

curl -X POST -d "api_key=$api_key&api_username=$username" http://forum.example.com/admin/plugins/explorer/queries/$query_id/run

It looks like it’s also possible to create queries through the API. I haven’t tried that yet though.

10 Likes