Page MenuHomePhabricator

Add data from the "ProtectedPages" special page to the API
Open, LowPublic

Description

Is it possible to make the list of protected pages accessible through the API depending on the community?

Event Timeline

Lofhi renamed this task from Add data from the "Protected pages" special page to the API to Add data from the "ProtectedPages" special page to the API.Feb 22 2018, 4:07 PM
Lofhi triaged this task as Low priority.

You can use action=query&list=allpages with apprtype= and apprlevel= to find the protected pages.

The timestamp, reason and user may not part of the api yet.

https://www.mediawiki.org/w/api.php?modules=query+allpages

You can use action=query&list=allpages with apprtype= and apprlevel= to find the protected pages.

The timestamp, reason and user may not part of the api yet.

https://www.mediawiki.org/w/api.php?modules=query+allpages

Oops... I hadn't noticed. On the other hand, all information is effectively not provided via the API, it would be nice if it were available.

Something like https://en.wikipedia.org/w/api.php?action=query&generator=allpages&gapprtype=edit&prop=info&inprop=protection gets you the protection levels and expiry, you're just missing the timestamp, user, and reason. If that were to be added, it'd probably make most sense to add an inprop.

Change 413473 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] ApiQueryInfo: Add inprop=protectedby|protectionreason

https://gerrit.wikimedia.org/r/413473

Change 413473 abandoned by Umherirrender:

[mediawiki/core@master] ApiQueryInfo: Add inprop=protectedby|protectionreason

Reason:

Old outdated patch set

https://gerrit.wikimedia.org/r/413473