2,287
edits
(import from wiki-dev) Tag: Metadata slot edit |
(update docs) |
||
Line 3: | Line 3: | ||
|?IsRelatedTo=Battery Pack | |?IsRelatedTo=Battery Pack | ||
}} | }} | ||
==== Get all passports ==== | |||
===== Web-API ===== | |||
<syntaxhighlight lang="http"> | |||
https://demo.open-semantic-lab.org/w/api.php?action=ask&query=[[HasType::Category:OSWf78783ad5d004d3d9cac079167f55a43]]&format=json | |||
</syntaxhighlight> | |||
==== Get passport for given battery ==== | ==== Get passport for given battery ==== | ||
Line 8: | Line 15: | ||
===== Web-API ===== | ===== Web-API ===== | ||
<syntaxhighlight lang="http"> | <syntaxhighlight lang="http"> | ||
https://demo.open-semantic-lab.org/w/api.php?action=ask&query=[[HasType::Category:OSWf78783ad5d004d3d9cac079167f55a43]][[IsRelatedTo::Item:OSW07ab9439598d4866a57a8cb60e2726ea]] | https://demo.open-semantic-lab.org/w/api.php?action=ask&query=[[HasType::Category:OSWf78783ad5d004d3d9cac079167f55a43]][[IsRelatedTo::Item:OSW07ab9439598d4866a57a8cb60e2726ea]]&format=json | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 21: | Line 28: | ||
Reference: {{Template:Viewer/Link|page=|url=https://github.com/eclipse-tractusx/sldt-semantic-models/blob/main/io.catenax.battery.battery_pass/6.0.0/gen/BatteryPass.json|label=io.catenax.battery.battery_pass v6.0.0 BatteryPass.json}} | Reference: {{Template:Viewer/Link|page=|url=https://github.com/eclipse-tractusx/sldt-semantic-models/blob/main/io.catenax.battery.battery_pass/6.0.0/gen/BatteryPass.json|label=io.catenax.battery.battery_pass v6.0.0 BatteryPass.json}} | ||
Web-API<syntaxhighlight lang="http"> | ===== Web-API ===== | ||
<syntaxhighlight lang="http"> | |||
# Single slot | |||
https://demo.open-semantic-lab.org/wiki/Item:OSWff8ab0e2075040d4939ac9313a997904?action=raw&slot=jsondata | https://demo.open-semantic-lab.org/wiki/Item:OSWff8ab0e2075040d4939ac9313a997904?action=raw&slot=jsondata | ||
# Single Passport | |||
https://wiki-dev.open-semantic-lab.org/w/api.php?action=query&format=json&prop=info|revisions&meta=&formatversion=2&inprop=&rvprop=ids|timestamp|flags|comment|user|contentmodel|roles|content&titles=Item:OSWff8ab0e2075040d4939ac9313a997904&rvslots=jsondata | https://wiki-dev.open-semantic-lab.org/w/api.php?action=query&format=json&prop=info|revisions&meta=&formatversion=2&inprop=&rvprop=ids|timestamp|flags|comment|user|contentmodel|roles|content&titles=Item:OSWff8ab0e2075040d4939ac9313a997904&rvslots=jsondata | ||
</syntaxhighlight>Result<syntaxhighlight lang="json"> | # Multiple Passports separated with '|' | ||
https://demo.open-semantic-lab.org/w/api.php?action=query&format=json&prop=revisions&titles=Item:OSWff8ab0e2075040d4939ac9313a997904|Item:OSWec30c26e58034fdaa034d8dfa83c4af2|Item:OSWf3fd09199fd84525b5634269d85c8608&rvprop=ids|timestamp|flags|comment|user|content|sha1|slotsha1&rvslots=jsondata | |||
</syntaxhighlight>Result (within <code>query.pages.<id>.revisions.0.slots.jsondata.*</code>)<syntaxhighlight lang="json"> | |||
{ | { | ||
"uuid": "ff8ab0e2-0750-40d4-939a-c9313a997904", | "uuid": "ff8ab0e2-0750-40d4-939a-c9313a997904", | ||
Line 71: | Line 83: | ||
|?HasCloseOntologyMatch=Close Match | |?HasCloseOntologyMatch=Close Match | ||
|limit=1000 | |limit=1000 | ||
}}SPARQL<syntaxhighlight lang="sparql"> | }} | ||
===== Web-API ===== | |||
<syntaxhighlight lang="text"> | |||
https://demo.open-semantic-lab.org/w/api.php?action=ask&query=%5b%5bHasExactOntologyMatch::~*urn:samm*%5d%5d%20OR%20%5b%5bHasCloseOntologyMatch::~*urn:samm*%5d%5d|?HasOswId=OSW%20ID|?HasExactOntologyMatch=Exact%20Match|?HasCloseOntologyMatch=Close%20Match|limit=1000&format=json | |||
</syntaxhighlight> | |||
===== SPARQL ===== | |||
<syntaxhighlight lang="sparql"> | |||
PREFIX owl: <http://www.w3.org/2002/07/owl#> | PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||