API talk:Properties

Suggestion for including thumbnail location
Within, I suggest (for this example):  which would allow to append the two url fragments with the width in pixel in between. Maybe add a "default='90'" attribute, containing the actual width (in pixel) of the tumbnail used for image thumbnail links and galleries. That would ensure that no needless recreation of the thumbnail would occur, and that the thumbnail is available fast (and fits in a 120x120 div or td :-) To match this, "iiprop=thumb". --Magnus Manske 21:47, 8 July 2007 (UTC)


 * I don't think it will be wise to expose how images are actually stored on the server - it will force us to always use the same storage schema. What is the actual goal you are trying to achieve? To allow clients to get resized image? --Yurik 22:04, 8 July 2007 (UTC)


 * I think this is a great idea. It would allow third party tools that manage images on the wiki to get a preview, which is useful for all sorts of things. For example, an image insertion wikitext helper written in javascript.


 * Yes, this exposes our storage schema, but it actually makes it easier to change the scheme in future, because the API just has to use the new scheme and all the tools using it will reflect that. Without the API to bridge image names and their thumbnail storage, any third party tools would have to be intimately knowledgeable of our thumbnail storage scheme because the only way they can get the images is to reimplement the directory algorithm. Jim Higson 11:33, 21 August 2007 (UTC)


 * On reflection, something like this might be better (Using Magnus's example image again)


 * 


 * (where $1 is a placeholder for the size)


 * Which is nice because it shares a pattern with how we represent interwiki addresses, and we aren't stuck with using a "before bit" and an "after bit" if we later change the URL scheme for thumbnails. Jim Higson 11:48, 21 August 2007 (UTC)

Getting Page Restrictions
Is it possible to add the 'page restriction' columns to the query report? &#91;user:jldupont&#124;Jean-Lou Dupont]
 * Already done: http://en.wikipedia.org/w/api.php?action=query&prop=info&titles=Main%20Page&inprop=protection --Yurik 01:54, 11 July 2007 (UTC)
 * At some point, can we get documentation on here regarding the inprop=protection function? -- SatyrTN 03:45, 3 September 2007 (UTC)

Links query and redirects
Hi,

It seems that the links query for a redirect page returns a non-empty list of links (it includes the redirects). Is it normal ? The old query.php API wasn't returning this.

--NicoV 17:46, 15 July 2007 (UTC)


 * Yes, because it is impossible at this point to determine which of the links from a redirect page are redirect trgets, and which links are simple page links. --Yurik 19:14, 16 July 2007 (UTC)


 * Ah, too bad. More work for me to deal with this ;) --NicoV 19:36, 16 July 2007 (UTC)

img_sha1
It would be useful to add img_sha1 to imageinfo. Bryan Tong Minh 22:07, 29 August 2007 (UTC)

Limits?
The "limits" on this page appear to be erroneous. For example this query returns 1,373 links (as of the time this was written), even though the documentation says there is a limit of "200/1000". And, really, that's how it should be, since the limits are intended for the "list=" type of queries, not "prop=". --Russ Blau 21:13, 22 October 2007 (UTC)
 * Limit applies to the number of pages that the given option will work for, not the number of items for a given page. For example, prop=links will work only if the links are requested for fewer pages then the limit. --Yurik 22:55, 28 October 2007 (UTC)

Category members
I can see how to get which categories a page is in, but how would I get all the pages that are members of a specific category? &mdash; Timotab 04:07, 30 October 2007 (UTC)
 * See list=categorymembers. --Yurik 07:13, 3 November 2007 (UTC)

extlinks / link text
it'd be great if the link text could be displayed when using extlinks.

if this is currently doable with MW 1.11.0 (via xml or json) could someone describe how?

thanks.
 * Unfortunately, no. That information isn't stored in the database, so there's no efficient way to retrieve it. --Catrope 21:35, 23 February 2008 (UTC)

Wiktionary links ?
Hi,

is there a simple way to get wiktionary links or interwiki links (other than language links given by langlinks query) ?

--NicoV 10:44, 29 December 2007 (UTC)
 * Unfortunately not. If you really, desperately wanna know, you'll have to parse the page content (obtainable through prop=revisions&rvprop=content). --Catrope 12:50, 29 December 2007 (UTC)


 * Thanks for the answer but that's really not simple : I need to call expandtemplates to have all the templates expanded and then parse the result. Could a feature like this be added in a future release ?
 * My need is for a tool helping for fixing disambiguation links: when the dab page contains a link to a wiktionary page, then this link can also be used for fixing links to that dab page. --NicoV 23:19, 29 December 2007 (UTC)

links query and anchors
Hi, if a page contains text, is there a way for the links request to return the anchor information ? --NicoV 19:24, 23 February 2008 (UTC)
 * Short answer: No.
 * Long answer: unfortunately, that information is not stored in the database, so it would be ridiculously expensive to parse the entire page just for that. --Catrope 21:31, 23 February 2008 (UTC)
 * Ok, thanks, I was afraid of that. --NicoV 22:09, 23 February 2008 (UTC)

sort revisions
Hi folks,

I want to sort revisions by listing (ArticleA|ArticleB|ArticleC|...) not by alphabetic order if the 'title' is this possible? merci & VanGore 21:42, 29 September 2008 (UTC) ( importet from es, sorry VanGore 16:34, 2 October 2008 (UTC) )