Page MenuHomePhabricator

Mediawiki API endpoint to get number of pages in a namespace
Open, Needs TriagePublicFeature

Description

Feature summary:

I am looking at available API endpoints and I cannot see one which would return the count of pages in a namespace. I think this would be useful to have as it would make it easier to use allpages API endpoint. One would be able to query first the number of pages before using allpages to traverse them all. The new API endpoint should accept a namespace parameter (like apnamespace is) to list namespaces to count.

Use case(s):

When using allpages API endpoint, one does not know what is the total of pages which will be returned by the API endpoint. Because it can take a lot of time to traverse all pages on large namespaces, with having a count one could know in advance what to expect.

Benefits:

This would allow one to show a progress bar to the user, when enumerating pages using allpages API endpoint, and also show estimated completion time.