Reputation:
I would like to know if there is a way to get Ckan
API access statistics ?
I tried the Ckan Page View Tracking
but it seems to be only for graphic interface.
Upvotes: 3
Views: 1189
Reputation: 3224
You can record API use using the ckanext-googleanalytics CKAN extension, which intercepts the API controller and sends Google Analytics the events. The PR which introduces this feature is here: https://github.com/ckan/ckanext-googleanalytics/pull/6/files
That records calls to the CKAN API, such as access to the dataset and resource metadata. You may want to extend it to include the Datastore accesses of the dataset/resource data itself. And part of CKAN can be instrumented in a similar way.
NB I believe this will need some work to make it work with CKAN 2.7.x and later, because it targets CKAN's API when it was a Pylons controller (i.e. pre 2.7.x) and was rewritten to be a Flask view, so the interception of the calls will need to be different.
Upvotes: 1
Reputation: 2342
If you need statistics about your site e.g top tags, datasets revision, number of datasets etc you can use Stats extension. For more information check docs http://docs.ckan.org/en/2.8/maintaining/stats.html
Upvotes: 1