Hi all,(apologies, if this is not the right place for raising the following issue (if this is the case, then please delegate me to a more appropriated place ;) ))
we are currently evaluating Wikibase as storage for D:SWARM GDM data (see [1,2]). Right now, we have a prototype client [3] that makes use of a Wikidata Toolkit fork [4]. So far, we were able to write/create simple items and properties. However, we also would like to create new items with a given set of statements. Therefore, we intended to utilise the 'wbeditentity' HTTP API (and I had (and still have) a lively conversation with Markus Krötzsch about this topic, see [5]). We get (a kind of) item JSON serialisation (e.g. with help of JacksonObjectFactory-based DatamodelConverter (Wikidata Toolkit code)). However, when sending this to the 'webeditentity' API we always receive an error response like this:
"
{
"error": {
"code": "modification-failed",
"info": "array instead of string",
"messages": [
{
"name": "wikibase-validator-bad-type",
"parameters": [
"string",
"array"
],
"html": {
"*": "array instead of string"
}
}
],
"*": "See http://[OUR WIKIBASE SERVICE IP]/api.php for API usage"
}
}
"
We cannot really interpret what's wrong with the data model that we
send to this API (note: we make use of the POJOs below
'org.wikidata.wdtk.datamodel.json.jackson' package of Wikidata
Toolkit, see [6]). An example of a data JSON is attached to this e-mail.
Thanks a lot in advance for all your help. Cheers, Bo/T [1] http://dswarm.org [2] https://github.com/dswarm/dswarm-documentation/wiki/Graph-Data-Model[3] https://github.com/zazi/wikidata-d-swarm-importer/tree/own_mediawiki_api_client [4] https://github.com/zazi/Wikidata-Toolkit/tree/wikibase_api_write_modifications
[5] https://github.com/Wikidata/Wikidata-Toolkit/issues/162[6] https://github.com/zazi/wikidata-d-swarm-importer/blob/own_mediawiki_api_client/src/main/java/org/dswarm/wikidataimporter/WikibaseAPIClient.java#L368
wikidata_w_datamodelconverter_serialization.json
Description: application/json
_______________________________________________ Wikidata-tech mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
