Thingweb Directory - User guide

Dear all,

here is a small user guide to PlugFest participants for the Thingweb Directory.

The Directory exposes a REST API to register, update/remove and look up TDs. It is available over HTTP and CoAP. The API entry points are:
http://plugfest.thingweb.io:8081/td
coap://plugfest.thingweb.io:5681/td

An online documentation (Swagger) is available at:
http://petstore.swagger.io/?url=http://plugfest.thingweb.io:8081/api.json

It indicates what methods are allowed (GET, POST, etc), as well as the expected query parameters. Please note that for registration, the root element of the TD sent in the payload must contain the type "Thing". Otherwise, the server will return an error status (400).

TDs can be filtered using SPARQL. To match a SPARQL filter, a TD must include semantic annotations. The vocabulary iotschema.org documents a number of annotations for your interaction patterns. You can find a documentation on the iotschema.org website, e.g. at http://iotschema.org/Property for the possible property types.

The following SPARQL filter will select TDs that include a property of a specific type: "?prop a <http://iotschema.org/YourPropertyType>" (YourPropertyType can be e.g. Temperature, TransitionTime, CountDown, etc, as defined in the documentation). A SPARQL filter must be sent in a query parameter and percent-encoded*, as follows:
http://plugfest.thingweb.io:8081/td?query=%3Fprop%20a%20%3Chttp%3A%2F%2Fiotschema.org%2FTemperature%3E

Here is a couple of SPARQL filters you might want to use:

·         ?prop a <http://iotschema.org/YourPropertyType> . ?action a < http://iotschema.org/YourActionType>

·         { ?prop a <http://iotschema.org/YourPropertyType> } UNION { ?prop a <http://iotschema.org/YourOtherType> }

·         ?prop a <http://iotschema.org/YourPropertyType> OPTIONAL { ?prop a <http://iotschema.org/YourOtherType> }

·         ?prop < http://www.w3.org/ns/td#name> ?name . FILTER contains(?name, "yourString")

·         ?prop a <http://w3.org/ns/td#Property> . FILTER NOT EXISTS { ?prop a <http://iotschema.org/YourPropertyType> }

(*) you can use an online tool during the PlugFest, such as https://meyerweb.com/eric/tools/dencoder/.

Best regards,
Victor Charpenay

Siemens AG
Corporate Technology
Research in Digitalization and Automation
Web of Systems
CT RDA NEC WOS-DE
Otto-Hahn-Ring 6
81739 München, Deutschland
Tel.: +49 89 636-631529
mailto:victor.charpenay@siemens.com
www.siemens.com/ingenuityforlife<https://siemens.com/ingenuityforlife>
[www.siemens.com/ingenuityforlife]
Siemens Aktiengesellschaft: Vorsitzender des Aufsichtsrats: Gerhard Cromme; Vorstand: Joe Kaeser, Vorsitzender; Roland Busch, Lisa Davis, Klaus Helmrich, Janina Kugel, Cedrik Neike, Michael Sen, Ralf P. Thomas; Sitz der Gesellschaft: Berlin und München, Deutschland; Registergericht: Berlin Charlottenburg, HRB 12300, München, HRB 6684; WEEE-Reg.-Nr. DE 23691322

Received on Friday, 3 November 2017 22:14:49 UTC