Jump to content

API talk:Blocks

Add topic
From mediawiki.org
Latest comment: 3 years ago by 2A02:8108:50BF:C694:1199:CA1B:6BBC:F913 in topic automatic vs. autoblock

API sandbox displays two more properties not listed here: userid and byid. Bináristalk 15:58, 30 January 2012 (UTC)Reply

Bug

[edit]

It seems that omitting "timestamp" from bkprop makes one unable to enumerate more than bklimit items in the list. The timestamp returned in the result for the "bkstart" parameter is just the current time and date. Keφr 17:12, 28 January 2014 (UTC)Reply

Output format for partial blocks

[edit]

Hi, what would the output format of “restrictions” (for partial blocks) look like? Has anyone so far made use of the partial blocks feature so that a request can give an example of that? All requests I have tested so far returned an empty JSON array for “restrictions”. --77.10.136.210 14:09, 17 February 2019 (UTC)Reply

Only current blocks?

[edit]

Does this API list only current blocks?

For instance, requesting https://de.wikipedia.org/w/api.php?action=query&list=blocks&bkusers=Anidaat&bklimit=max&format=json I get an empty output ({"batchcomplete":"","limits":{"blocks":500},"query":{"blocks":[]}}), although the user in question has plenty of past blocks on German Wikipedia (https://de.wikipedia.org/w/index.php?title=Spezial:Logbuch/block&page=Benutzer%3AAnidaat).

If this API feature is supposed to list only current blocks, how can I obtain a list of past blocks? --77.0.148.205 11:41, 8 August 2019 (UTC)Reply

Did you try making the request with timestamp parameters: `bkstart` and `bkend`? I guess with these parameters you should be able to fetch past blocks as well. SSethi (WMF) (talk) 23:07, 8 August 2019 (UTC)Reply

automatic vs. autoblock

[edit]

What is the difference between automatic and autoblock in the output?

For example:

{
  "expiry":"2021-06-05T05:04:54Z",
   "automatic":false,
   "anononly":true,
   "nocreate":true,
   "autoblock":false,
   "noemail":false,
   "hidden":false,
   "allowusertalk":true,
   "partial":false
 }

What would it mean if it were "automatic":true (but still "autoblock":false) or vice versa? --2A02:8108:50BF:C694:1199:CA1B:6BBC:F913 17:43, 4 June 2021 (UTC)Reply