Hi,
I'm using the MW API (very cool, by the way) to perform some basic monitoring on a site that I maintain the content of, but don't have access to the MW backend. I would like to track the number of page views for certain pages, but those counts do not appear to be part of the information returned by any function in the API (that I could find).
Are page hits accessible via the API? If so, how? If not, could you please consider this a feature request? :-)
Thanks, Bob
Robert Freimuth schreef:
Hi,
I'm using the MW API (very cool, by the way) to perform some basic monitoring on a site that I maintain the content of, but don't have access to the MW backend. I would like to track the number of page views for certain pages, but those counts do not appear to be part of the information returned by any function in the API (that I could find).
Are page hits accessible via the API? If so, how? If not, could you please consider this a feature request? :-)
They're returned in the "counter" field in prop=info. Note that some wikis may have hit counting disabled, and that server-side caches like Squid will render hit counts meaningless.
Roan Kattouw (Catrope)
Great - thanks! That information isn't included in the docs that I'm looking at.
Thanks for the quick reply.
Bob
--- On Sun, 3/29/09, Roan Kattouw roan.kattouw@home.nl wrote: From: Roan Kattouw roan.kattouw@home.nl Subject: Re: [Mediawiki-api] Page hits included in API? To: rrfreimuth2@yahoo.com, "MediaWiki API announcements & discussion" mediawiki-api@lists.wikimedia.org Date: Sunday, March 29, 2009, 3:57 PM
Robert Freimuth schreef:
Hi,
I'm using the MW API (very cool, by the way) to perform some basic
monitoring on a site that I maintain the content of, but don't have access to the MW backend. I would like to track the number of page views for certain pages, but those counts do not appear to be part of the information returned by any function in the API (that I could find).
Are page hits accessible via the API? If so, how? If not, could you
please consider this a feature request? :-)
They're returned in the "counter" field in prop=info. Note that some wikis may have hit counting disabled, and that server-side caches like Squid will render hit counts meaningless.
Roan Kattouw (Catrope)
Hi,
This is great news. It has a lot of potential.
The "counter" property corresponds to the total number of hits since the page was created? A suggestion: it would be great to have this info by revision. Given a page title + a revid, return the number of hits observed when this revision was committed.
Even better would be to have access to the full request metadata for each hit. I understand that this would greatly increase storage requirements.
-- Sérgio Nunes
2009/3/29 Roan Kattouw roan.kattouw@home.nl:
Robert Freimuth schreef:
Hi,
I'm using the MW API (very cool, by the way) to perform some basic monitoring on a site that I maintain the content of, but don't have access to the MW backend. I would like to track the number of page views for certain pages, but those counts do not appear to be part of the information returned by any function in the API (that I could find).
Are page hits accessible via the API? If so, how? If not, could you please consider this a feature request? :-)
They're returned in the "counter" field in prop=info. Note that some wikis may have hit counting disabled, and that server-side caches like Squid will render hit counts meaningless.
Roan Kattouw (Catrope)
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
S. Nunes wrote:
Hi,
This is great news. It has a lot of potential.
The "counter" property corresponds to the total number of hits since the page was created? A suggestion: it would be great to have this info by revision. Given a page title + a revid, return the number of hits observed when this revision was committed.
The db stores it per page, not per revision.
Even better would be to have access to the full request metadata for each hit. I understand that this would greatly increase storage requirements.
Since storing per revision would require a schema change, and your needs go even beyond that, I suggest you add that as an Extension.
Note however that all that information is already stored on normal HTTP logs.
mediawiki-api@lists.wikimedia.org