I would also like to automate extract of data set usage statistics.
Hello Eva,
The ods-api-monitoring dataset is accessible via the explore API, just like any other dataset. However, you need to have the right permissions:
Let me know if it helps!
Hi Eva and Kira,
I just would like to add, when you have the right permission, you should be able to access the monitoring repository using this url :
https://YOUR_DOMAIN_ADDRESS/api/explore/v2.1/monitoring
similar to how you use the Explore API to access and retrieve data, you can use the /records and /exports endpoints to consume statistical datasets:
-
ods-api-monitoring
-
ods-datasets-monitoring
Example url on ods-datasets-monitoring:
https://YOUR_DOMAIN_ADDRESS/api/explore/v2.1/monitoring/datasets/ods-api-monitoring/records
Kind regards,
Thank you, Yier and Remy --
I have Analytics permissions in the back office as I am the main Administrator. However, I do not see the option to view or create an API key in the back end. When I tried to call the endpoint Yier provided, I received a 404 error that it did not exist, so I’m guessing the issue has to do including an API key in the call?
Thanks,
Kira
I found the API Key creation area under my Account. That was a tricky place to keep it…
Hi Kira,
It's great that you find where to generate one, api keys are attached to user's account and their permissions.
It should work now if you add the api key in the end of your query with:
&apikey=xxxx
Yier