Jump to content

Wikibase/EntityData: Difference between revisions

From mediawiki.org
Content deleted Content added
change revision to 288022, one applicable to the cited QID: Q7251
canonicalurl
Line 6: Line 6:
== Usage == <!--T:1-->
== Usage == <!--T:1-->
</translate>
</translate>
<translate><!--T:18--> In order to use it, you need to apply entity id as a subpage (like <tvar name=1>[[d:Special:EntityData/Q7251|Q7251]]</tvar>) or as "<tvar name=2>id=</tvar>" argument (like [<tvar name=3>https://www.wikidata.org/wiki/Special:EntityData?id=Q7251</tvar> Special:EntityData?id=Q7251])</translate>
<translate><!--T:18--> In order to use it, you need to apply entity id as a subpage (like <tvar name=1>[[d:Special:EntityData/Q7251|Q7251]]</tvar>) or as "<tvar name=2>id=</tvar>" argument (like [<tvar name=3>{{canonicalurl:d:Special:EntityData|id=Q7251}}</tvar> Special:EntityData?id=Q7251])</translate>


<translate><!--T:3--> In order to determine the output format, there are several ways to do so:</translate>
<translate><!--T:3--> In order to determine the output format, there are several ways to do so:</translate>
Line 17: Line 17:
** "text/n3", "text/rdf+n3" ([[w:Notation3|Notation3]])
** "text/n3", "text/rdf+n3" ([[w:Notation3|Notation3]])
** "application/vnd.php.serialized" ([https://php.net/function.serialize PHP serialization])
** "application/vnd.php.serialized" ([https://php.net/function.serialize PHP serialization])
* <translate><!--T:9--> Using "format=" argument.</translate> <translate><!--T:10--> For example <tvar name=1>{{nowrap|1=[https://www.wikidata.org/wiki/Special:EntityData?id=Q7251&format=json Special:EntityData?id=Q7251&format=json]}}</tvar>.</translate><br /><translate><!--T:14--> Supported format suffixes are: html, <tvar name=1>[[d:Special:EntityData/Q7251.json|json]]</tvar>, rdf, nt, ttl, n3, php</translate>
* <translate><!--T:9--> Using "format=" argument.</translate> <translate><!--T:10--> For example <tvar name=1>{{nowrap|1=[{{canonicalurl:d:Special:EntityData|id=Q7251&format=json}} Special:EntityData?id=Q7251&format=json]}}</tvar>.</translate><br /><translate><!--T:14--> Supported format suffixes are: html, <tvar name=1>[[d:Special:EntityData/Q7251.json|json]]</tvar>, rdf, nt, ttl, n3, php</translate>


* <translate><!--T:15--> You can also determine a fixed revision id using a "revision=" argument. For example <tvar name=1>{{nowrap|1=[https://www.wikidata.org/wiki/Special:EntityData?id=Q7251&revision=288022 Special:EntityData?id=Q7251&revision=288022]}}</tvar>.</translate><br /><translate><!--T:16--> Until July 2019, "oldid=" was also accepted.</translate>
* <translate><!--T:15--> You can also determine a fixed revision id using a "revision=" argument. For example <tvar name=1>{{nowrap|1=[{{canonicalurl:d:Special:EntityData|id=Q7251&revision=288022}} Special:EntityData?id=Q7251&revision=288022]}}</tvar>.</translate><br /><translate><!--T:16--> Until July 2019, "oldid=" was also accepted.</translate>


* <translate><!--T:17--> If argument "<tvar name=1>redirect=force</tvar>" is present, it forces a redirect regardless of the outcome.</translate>
* <translate><!--T:17--> If argument "<tvar name=1>redirect=force</tvar>" is present, it forces a redirect regardless of the outcome.</translate>

Revision as of 15:14, 29 July 2025

This is a help page for Special:EntityData that is being used in Wikibase repository setups (like Wikidata).

Usage

In order to use it, you need to apply entity id as a subpage (like Q7251) or as "id=" argument (like Special:EntityData?id=Q7251)

In order to determine the output format, there are several ways to do so:

  • Content negotiation: If "ACCEPT: MIME type(s)" is present in request headers, the special page, tries to find the most suitable format it can support. For more information read Content negotiation article in English Wikipedia. Default supported content types are:
    • "text/html" (will redirect to the entity page)
    • "application/json" (Wikibase JSON)
    • "application/rdf+xml", "application/xml", "text/xml" (RDF/XML)
    • "application/n-triples", "text/n-triples", "text/plain" (N-Triples)
    • "text/turtle", "application/x-turtle" (Turtle)
    • "text/n3", "text/rdf+n3" (Notation3)
    • "application/vnd.php.serialized" (PHP serialization)
  • Using "format=" argument. For example Special:EntityData?id=Q7251&format=json.
    Supported format suffixes are: html, json, rdf, nt, ttl, n3, php
  • If argument "redirect=force" is present, it forces a redirect regardless of the outcome.