Inter-IoT Gateway API API Reference

Inter-IoT Physical/Virtual Gateway API

Terms of Service: http://www.inter-iot-project.eu/objectives
Contact: coordinator@inter-iot.eu
Request Content-Types: application/json
Response Content-Types: application/json
Schemes: http
Version: 0.3.1-SNAPSHOT-20180426160853

api

api

Get Api version information

GET /version
200 OK

successful operation

type
string
Response Content-Types: application/json
Response Example (200 OK)
"string"

device

Read last device state

GET /device/{deviceUid}/read
deviceUid: string
in path

(no description)

200 OK

successful operation

Response Content-Types: application/json
Response Example (200 OK)
{
  "timestamp": "integer (int64)",
  "data": [
    {
      "attribute": {
        "name": "string",
        "type": "string"
      },
      "value": "object",
      "timestamp": "integer (int64)"
    }
  ]
}

Write state to device

POST /device/{deviceUid}/write

undefined

deviceUid: string
in path

(no description)

Request Content-Types: application/json
Request Example
{
  "timestamp": "integer (int64)",
  "data": [
    {
      "attribute": {
        "name": "string",
        "type": "string"
      },
      "value": "string"
    }
  ]
}
200 OK

successful operation

Response Content-Types: application/json
Response Example (200 OK)
{
  "timestamp": "integer (int64)",
  "data": [
    {
      "attribute": {
        "name": "string",
        "type": "string"
      },
      "value": "object",
      "timestamp": "integer (int64)"
    }
  ]
}

Connect device

GET /device/{deviceUid}/start
deviceUid: string
in path

(no description)

default

successful operation

Response Content-Types: application/json

Disconnect device

GET /device/{deviceUid}/stop
deviceUid: string
in path

(no description)

default

successful operation

Response Content-Types: application/json

Get Device Description

GET /device/{deviceUid}
deviceUid: string
in path

(no description)

200 OK

successful operation

Response Content-Types: application/json
Response Example (200 OK)
{
  "uuid": "string",
  "name": "string",
  "accessNetwork": "string",
  "protocol": "string",
  "physicalAddress": "string",
  "accessNetworkOpts": "object",
  "protocolOpts": "object",
  "deviceIOs": [
    {
      "type": "string",
      "attribute": {
        "name": "string",
        "type": "string"
      }
    }
  ],
  "controller": "string",
  "controllerOpts": "object"
}

Get device status

GET /device/{deviceUid}/status
deviceUid: string
in path

(no description)

200 OK

successful operation

type
string
Response Content-Types: application/json
Response Example (200 OK)
"string"

physical

Get physical gateway information

GET /physical/info
200 OK

successful operation

type
string
Response Content-Types: application/json
Response Example (200 OK)
"string"

Get a list of devices connected to this Gateway

GET /physical/devices
200 OK

successful operation

type
Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "uuid": "string",
    "name": "string",
    "accessNetwork": "string",
    "protocol": "string",
    "physicalAddress": "string",
    "accessNetworkOpts": "object",
    "protocolOpts": "object",
    "deviceIOs": [
      {
        "type": "string",
        "attribute": {
          "name": "string",
          "type": "string"
        }
      }
    ],
    "controller": "string",
    "controllerOpts": "object"
  }
]

Get the physical gateway Id connected

GET /physical/id
200 OK

successful operation

type
string
Response Content-Types: application/json
Response Example (200 OK)
"string"

Check the connection status of the physical Gateway

GET /physical/status
200 OK

successful operation

type
string
Response Content-Types: application/json
Response Example (200 OK)
"string"

virtual

Get virtual gateway information

GET /virtual/info
200 OK

successful operation

type
string
Response Content-Types: application/json
Response Example (200 OK)
"string"

extensions

Orion subscription endpoint

POST /extensions/orion/notify
Request Content-Types: application/json
Request Example
"string"
200 OK

successful operation

type
string
Response Content-Types: application/json
Response Example (200 OK)
"string"

Get Statement List

GET /extensions/rules/statements/list
200 OK

successful operation

type
Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "name": "string",
    "description": "string",
    "id": "string",
    "item": "object"
  }
]

Add Statement

POST /extensions/rules/statements/add
Request Content-Types: application/json
Request Example
{
  "name": "string",
  "description": "string",
  "statement": "string"
}
200 OK

successful operation

type
string
Response Content-Types: application/json
Response Example (200 OK)
"string"

Remove Statement

GET /extensions/rules/statements/remove/{statementId}
statementId: string
in path

(no description)

200 OK

successful operation

type
string
Response Content-Types: application/json
Response Example (200 OK)
"string"

Remove Execution

GET /extensions/rules/executions/remove/{executionId}
executionId: string
in path

(no description)

200 OK

successful operation

type
string
Response Content-Types: application/json
Response Example (200 OK)
"string"

Add Execution

POST /extensions/rules/executions/add
Request Content-Types: application/json
Request Example
{
  "name": "string",
  "description": "string",
  "execution": "string"
}
200 OK

successful operation

type
string
Response Content-Types: application/json
Response Example (200 OK)
"string"

Get Executions List

GET /extensions/rules/executions/list
200 OK

successful operation

type
Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "name": "string",
    "description": "string",
    "id": "string",
    "item": "object"
  }
]

Get Rule List

GET /extensions/rules/rules/list
200 OK

successful operation

type
Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "name": "string",
    "description": "string",
    "id": "string",
    "item": "object"
  }
]

Add Rule

POST /extensions/rules/rules/add

undefined

Request Content-Types: application/json
Request Example
{
  "name": "string",
  "description": "string",
  "statementId": "string",
  "executionId": "string"
}
200 OK

successful operation

type
string
Response Content-Types: application/json
Response Example (200 OK)
"string"

Remove Rule

GET /extensions/rules/rules/remove/{ruleId}
ruleId: string
in path

(no description)

200 OK

successful operation

type
string
Response Content-Types: application/json
Response Example (200 OK)
"string"

Schema Definitions

Attribute: object

name: string
type: string INTEGER, FLOAT, STRING, BOOLEAN
Example
{
  "name": "string",
  "type": "string"
}

Measurement: object

timestamp: integer (int64)
data: MeasurementData
MeasurementData
Example
{
  "timestamp": "integer (int64)",
  "data": [
    {
      "attribute": {
        "name": "string",
        "type": "string"
      },
      "value": "object",
      "timestamp": "integer (int64)"
    }
  ]
}

MeasurementData: object

attribute: Attribute
value: object
timestamp: integer (int64)
Example
{
  "attribute": {
    "name": "string",
    "type": "string"
  },
  "value": "object",
  "timestamp": "integer (int64)"
}

Action: object

timestamp: integer (int64)
data: ActionData
ActionData
Example
{
  "timestamp": "integer (int64)",
  "data": [
    {
      "attribute": {
        "name": "string",
        "type": "string"
      },
      "value": "string"
    }
  ]
}

ActionData: object

attribute: Attribute
value: string
Example
{
  "attribute": {
    "name": "string",
    "type": "string"
  },
  "value": "string"
}

Device: object

uuid: string
name: string
accessNetwork: string
protocol: string
physicalAddress: string
accessNetworkOpts: object
protocolOpts: object
deviceIOs: DeviceIO
DeviceIO
controller: string
controllerOpts: object
Example
{
  "uuid": "string",
  "name": "string",
  "accessNetwork": "string",
  "protocol": "string",
  "physicalAddress": "string",
  "accessNetworkOpts": "object",
  "protocolOpts": "object",
  "deviceIOs": [
    {
      "type": "string",
      "attribute": {
        "name": "string",
        "type": "string"
      }
    }
  ],
  "controller": "string",
  "controllerOpts": "object"
}

DeviceIO: object

type: string SENSOR, ACTUATOR
attribute: Attribute
Example
{
  "type": "string",
  "attribute": {
    "name": "string",
    "type": "string"
  }
}

Entity: object

name: string
description: string
id: string
item: object
Example
{
  "name": "string",
  "description": "string",
  "id": "string",
  "item": "object"
}

StatementDescription: object

name: string
description: string
statement: string
Example
{
  "name": "string",
  "description": "string",
  "statement": "string"
}

ExecutionDescription: object

name: string
description: string
execution: string
Example
{
  "name": "string",
  "description": "string",
  "execution": "string"
}

RuleDescription: object

name: string
description: string
statementId: string
executionId: string
Example
{
  "name": "string",
  "description": "string",
  "statementId": "string",
  "executionId": "string"
}