When querying blocks, I can use bkprop=timestamp|expiry|by.
For querying pages protected against creation there is ptprop=timestamp|expiry|user.
(Althogh "user" has a different meaning here as for blocks.)
What about other protections? A similar approp=blahblah is unfortunately missing fram allpages, or at least it is heavily undocumented on http://www.mediawiki.org/wiki/API:Allpages.
I was suggested to get expiration from query as
action=query&titles=title|title1&prop=info&inprop=protection
and mine the protection log for timestamp of beginning (and for the admin who protected, I suppose).
I can do that if necessary, but is complicated for me, slow for the bot and results in a greater server load.
Would be nice to handle blocks, protections and create-protections in similar way.
Version: 1.18.x
Severity: enhancement