Skip to content

API Descriptions: SEMIOT TH

Maxim Kolchin edited this page Nov 28, 2016 · 1 revision

Below bodies of responses to requests to the given URLs are presented, including the .well-known/core URL.

Response to GET /.well-known/core

  • /
    • rt = http://schema.org/EntryPoint http://external/doc#TemperatureDevice http://purl.oclc.org/NET/ssnx/ssn#Device
  • /temperatureValue
    • rt = http://external/doc#TemperatureValue http://schema.org/QuantitativeValue

Response to GET /

{
  "@context": "http://external/doc#",
  "@id": "coap://1.1.1.1/",
  "@type": "TemperatureDevice",
  "identifier": "e9704",
  "label": { "@value": "Temperature Device", "@language": "en" },
  "location": {
    "@type": "Place",
    "label": { "@value": "1010", "@language": "en" }
  },
  "temperature": "/temperatureValue"
}

PUT Request to /

{
  "@context": "coap://external/doc#",
  "@type": "doc:TemperatureDevice",
  "location": {
    "@type": "Place",
    "label": "301"
  }
}

Response to GET http://external/doc

{
  "@context": [
    "https://w3id.org/semiot/device/commoncontext#",
    { "doc": "http://external/doc#" }
  ],
  "@id": "doc:ApiDocumentation",
  "@type": "ApiDocumentation",
  "supportedClass": [
    {
      "@id": "doc:TemperatureDevice",
      "subClassOf": "Device",
      "supportedProperty": {
        "property": "location",
        "writable": "true",
        "label": "Location"
      },
      "supportedProperty": {
        "property": "label",
        "writable": "false",
        "label": "Label"
      },
      "supportedOperation": {
        "method": "PUT",
        "expects": "doc:TemperatureDevice",
        "returns": "doc:TemperatureDevice"
      }
    },
    {
      "@id": "doc:TemperatureValue",
      "subClassOf": "QuantitativeValue",
      "label": "Temperature (C)"
    },
    {
      "@id": "doc:temperature",
      "@type": "Link",
      "range": "doc:TemperatureValue"
    }
  ]
}

Response to GET /temperatureValue

{
  "@context": "coap://external/doc#",
  "@type": "doc:TemperatureValue",
  "value": "15.6",
  "unitCode": "CEL"
}

Configuration API

observationServer should be able to handle ACK post requests tp

Response to GET /config

{
  "@context": "http://external/doc#",
  "@id": "/config",
  "@type": "Configuration",
  "wifiName": "ISST",
  "wifiPassword": "ISSTpassword",
  "username": "superuser",
  "password": "strongpass",
  "deviceName": "My Device",
  "observationHost": "172.1.172.2"
  "observationPort": "5683"
  "observationUri": "/temperatureObservation"
}

Clone this wiki locally