Main Page: Difference between revisions
Jump to navigation
Jump to search
OlafJanssen (talk | contribs) (→SPARQL) |
OlafJanssen (talk | contribs) No edit summary |
||
Line 8: | Line 8: | ||
*[https://kbtestwikibase.wikibase.cloud/wiki/Special:AllPages?from=&to=&namespace=120 Alle items] | *[https://kbtestwikibase.wikibase.cloud/wiki/Special:AllPages?from=&to=&namespace=120 Alle items] | ||
*[[Special:NewItem|Nieuw item aanmaken]] | *[[Special:NewItem|Nieuw item aanmaken]] | ||
== SPARQL== | == SPARQL== | ||
Line 32: | Line 27: | ||
== Interactie via de API m.b.v. Python == | == Interactie via de API m.b.v. Python == | ||
=== Endpoint=== | |||
* https://kbtestwikibase.wikibase.cloud/w/api.php | |||
=== Via URLs === | |||
* Een voorbeeld om item Q1 op te vragen als JSON: https://kbtestwikibase.wikibase.cloud/w/api.php?action=wbgetentities&ids=Q1&format=json | |||
* Q1 en Q2 samen als JSON: https://kbtestwikibase.wikibase.cloud/w/api.php?action=wbgetentities&ids=Q1|Q2&format=jsonfm (of [https://kbtestwikibase.wikibase.cloud/w/api.php?action=wbgetentities&ids=Q1|Q2&format=xml als XML]) | |||
=== Via Python=== | |||
* https://github.com/KBNLresearch/wikibase-api/tree/master/examples-kb - Examples on how to read, write, delete, update Ps, Qs, claims, qualifiers and references in https://kbtestwikibase.wikibase.cloud using Python | * https://github.com/KBNLresearch/wikibase-api/tree/master/examples-kb - Examples on how to read, write, delete, update Ps, Qs, claims, qualifiers and references in https://kbtestwikibase.wikibase.cloud using Python | ||
* Docs/manual are on https://wikibase-api.readthedocs.io/en/latest/. | * Docs/manual are on https://wikibase-api.readthedocs.io/en/latest/. |
Revision as of 14:16, 16 June 2022
Test Wikibase instance for the national library of The Netherlands.
Eigenschappen (properties) (namespace = xx)
Items (namespace = 120)
SPARQL
- SPARQL-queries zijn mogelijk via https://kbtestwikibase.wikibase.cloud/query/
- Alle Ps in deze Wikibase
- Alle Qs in deze Wikibase
- Alle Ps en Qs samen
- Claim ids (GUID) for Qnumbers in this Wikibase
- Hele basale SPARQL-zoekvraag
- Er moeten voorlopig verplicht prefixen meegegeven worden (volgens de prefixen die in Wikidata gebruikt worden):
PREFIX wd: <https://kbtestwikibase.wikibase.cloud/entity/>
PREFIX wds: <https://kbtestwikibase.wikibase.cloud/entity/statement/>
PREFIX wdv: <https://kbtestwikibase.wikibase.cloud/value/>
PREFIX wdt: <https://kbtestwikibase.wikibase.cloud/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX p: <https://kbtestwikibase.wikibase.cloud/prop/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
Interactie via de API m.b.v. Python
Endpoint
Via URLs
- Een voorbeeld om item Q1 op te vragen als JSON: https://kbtestwikibase.wikibase.cloud/w/api.php?action=wbgetentities&ids=Q1&format=json
- Q1 en Q2 samen als JSON: https://kbtestwikibase.wikibase.cloud/w/api.php?action=wbgetentities&ids=Q1%7CQ2&format=jsonfm (of als XML)
Via Python
- https://github.com/KBNLresearch/wikibase-api/tree/master/examples-kb - Examples on how to read, write, delete, update Ps, Qs, claims, qualifiers and references in https://kbtestwikibase.wikibase.cloud using Python
- Docs/manual are on https://wikibase-api.readthedocs.io/en/latest/.