MW2MW REST API API Reference
INTER-IoT Middleware Layer Interoperability Components
Terms of Service: http://www.inter-iot-project.eu/
Contact: coordinator@inter-iot.eu
Request Content-Types: application/json
Response Content-Types: application/json
Schemes: http, https
Version: 2.1.0
mw2mw
Platforms
List all platforms registered with InterIoT
(no description)
Response Content-Types: application/json
Response Example (200 OK)
[
{
"platformId": "string",
"type": "string",
"baseEndpoint": "string (url)",
"location": "string",
"name": "string",
"clientId": "string",
"username": "string",
"timeCreated": "integer (int64)",
"platformStatistics": {
"deviceCount": "integer (int32)",
"subscribedDeviceCount": "integer (int32)",
"subscriptionCount": "integer (int32)"
},
"downstreamInputAlignmentName": "string",
"downstreamInputAlignmentVersion": "string",
"downstreamOutputAlignmentName": "string",
"downstreamOutputAlignmentVersion": "string",
"upstreamInputAlignmentName": "string",
"upstreamInputAlignmentVersion": "string",
"upstreamOutputAlignmentName": "string",
"upstreamOutputAlignmentVersion": "string"
}
]
Register a new platform instance
undefined
(no description)
Request Content-Types: application/json
Request Example
{
"platformId": "string",
"type": "string",
"baseEndpoint": "string",
"location": "string",
"name": "string",
"username": "string",
"encryptedPassword": "string",
"encryptionAlgorithm": "string",
"downstreamInputAlignmentName": "string",
"downstreamInputAlignmentVersion": "string",
"downstreamOutputAlignmentName": "string",
"downstreamOutputAlignmentVersion": "string",
"upstreamInputAlignmentName": "string",
"upstreamInputAlignmentVersion": "string",
"upstreamOutputAlignmentName": "string",
"upstreamOutputAlignmentVersion": "string"
}
The request has been accepted for processing.
Invalid request.
Unauthorized.
Platform is already registered by given client.
Response Content-Types: application/json
Response Example (202 Accepted)
{
"conversationId": "string"
}
Retrieve specified platform
(no description)
(no description)
Success.
Unauthorized.
Specified platform does not exist.
Response Content-Types: application/json
Response Example (200 OK)
{
"platformId": "string",
"type": "string",
"baseEndpoint": "string (url)",
"location": "string",
"name": "string",
"clientId": "string",
"username": "string",
"timeCreated": "integer (int64)",
"platformStatistics": {
"deviceCount": "integer (int32)",
"subscribedDeviceCount": "integer (int32)",
"subscriptionCount": "integer (int32)"
},
"downstreamInputAlignmentName": "string",
"downstreamInputAlignmentVersion": "string",
"downstreamOutputAlignmentName": "string",
"downstreamOutputAlignmentVersion": "string",
"upstreamInputAlignmentName": "string",
"upstreamInputAlignmentVersion": "string",
"upstreamOutputAlignmentName": "string",
"upstreamOutputAlignmentVersion": "string"
}
Update specified platform instance
undefined
(no description)
(no description)
Request Content-Types: application/json
Request Example
{
"baseEndpoint": "string",
"location": "string",
"name": "string",
"username": "string",
"encryptedPassword": "string",
"encryptionAlgorithm": "string",
"downstreamInputAlignmentName": "string",
"downstreamInputAlignmentVersion": "string",
"downstreamOutputAlignmentName": "string",
"downstreamOutputAlignmentVersion": "string",
"upstreamInputAlignmentName": "string",
"upstreamInputAlignmentVersion": "string",
"upstreamOutputAlignmentName": "string",
"upstreamOutputAlignmentVersion": "string"
}
The request has been accepted for processing.
Invalid request.
Unauthorized.
Specified platform does not exist.
Response Content-Types: application/json
Response Example (202 Accepted)
{
"conversationId": "string"
}
Remove specified platform instance
Removes specified platform from the registry and undeploys the bridge.
(no description)
(no description)
The request has been accepted for processing.
Unauthorized.
Platform does not exist.
Response Content-Types: application/json
Response Example (202 Accepted)
{
"conversationId": "string"
}
List all supported platform types
List all platform types for which corresponding bridge is available and loaded by INTER-MW.
(no description)
The request has been accepted for processing.
Unauthorized.
Response Content-Types: application/json
Response Example (202 Accepted)
{
"conversationId": "string"
}
Clients
List all clients
(no description)
Register a new client
undefined
(no description)
Request Content-Types: application/json
Request Example
{
"clientId": "string",
"callbackUrl": "string",
"receivingCapacity": "integer (int32)",
"responseFormat": "string",
"responseDelivery": "string"
}
Success.
Invalid request.
Unauthorized.
Client is already registered.
Response Content-Types: application/json
Response Example (201 Created)
{
"clientId": "string",
"callbackUrl": "string (url)",
"receivingCapacity": "integer (int32)",
"responseFormat": "string",
"responseDelivery": "string"
}
Retrieve specified client
(no description)
(no description)
Success.
Unauthorized.
Specified client does not exist.
Response Content-Types: application/json
Response Example (200 OK)
{
"clientId": "string",
"callbackUrl": "string (url)",
"receivingCapacity": "integer (int32)",
"responseFormat": "string",
"responseDelivery": "string"
}
Update specified client
undefined
(no description)
(no description)
Request Content-Types: application/json
Request Example
{
"callbackUrl": "string",
"receivingCapacity": "integer (int32)",
"responseFormat": "string",
"responseDelivery": "string"
}
Success.
Invalid request.
Unauthorized.
Specified client does not exist.
Response Content-Types: application/json
Response Example (200 OK)
{
"clientId": "string",
"callbackUrl": "string (url)",
"receivingCapacity": "integer (int32)",
"responseFormat": "string",
"responseDelivery": "string"
}
Remove specified client
(no description)
(no description)
Success.
Unauthorized.
Specified client does not exist.
Subscriptions
List subscriptions
(no description)
(no description)
Success.
Unauthorized.
Response Content-Types: application/json
Response Example (200 OK)
[
{
"conversationId": "string",
"deviceIds": [
"string"
],
"clientId": "string"
}
]
Subscribe to specified devices
undefined
(no description)
Request Content-Types: application/json
Request Example
{
"deviceIds": [
"string"
]
}
The request has been accepted for processing.
Invalid request.
Unauthorized.
Client is already subscribed to specified devices.
Response Content-Types: application/json
Response Example (202 Accepted)
{
"conversationId": "string"
}
Unsubscribe from specified conversation
(no description)
(no description)
The request has been accepted for processing.
Unauthorized.
Specified conversation doesn't exist.
Response Content-Types: application/json
Response Example (202 Accepted)
{
"conversationId": "string"
}
Messages
Send given JSON-LD message downstream towards the platform
A raw method for sending message in JSON-LD format downstream.
(no description)
Request Content-Types: application/ld+json
Request Example
"string"
The request has been accepted for processing.
Invalid request (invalid JSON-LD message).
Unauthorized.
Response Content-Types: application/json
Response Example (202 Accepted)
{
"conversationId": "string"
}
Retrieve response messages concerning the client
Retrieves response messages concerning the client waiting in the queue, if any. Maximum number of messages returned is specified at client registration. Returns array of messages in JSON-LD format or empty array if none is available.
(no description)
Success.
Invalid request.
Unauthorized.
Response Content-Types: application/ld+json, application/json
Devices
List all devices registered with InterIoT according to the specified filter
(no description)
(no description)
Response Content-Types: application/json
Response Example (200 OK)
[
{
"deviceTypes": [
"string"
],
"deviceId": "string",
"hostedBy": "string",
"location": "string",
"name": "string",
"hosts": [
"string"
],
"forProperty": [
"string"
],
"madeActuation": "string",
"implementsProcedure": "string",
"observes": [
"string"
],
"detects": "string",
"madeObservation": "string"
}
]
Register (start managing) devices
undefined
(no description)
Request Content-Types: application/json
Request Example
{
"devices": [
{
"deviceTypes": [
"string"
],
"deviceId": "string",
"hostedBy": "string",
"location": "string",
"name": "string",
"hosts": [
"string"
],
"forProperty": [
"string"
],
"madeActuation": "string",
"implementsProcedure": "string",
"observes": [
"string"
],
"detects": "string",
"madeObservation": "string"
}
]
}
The request has been accepted for processing.
Invalid request.
Unauthorized.
One or more devices are already registered.
Response Content-Types: application/json
Response Example (202 Accepted)
{
"conversationId": "string"
}
Update specified device
undefined
(no description)
(no description)
Request Content-Types: application/json
Request Example
{
"deviceTypes": [
"string"
],
"deviceId": "string",
"hostedBy": "string",
"location": "string",
"name": "string",
"hosts": [
"string"
],
"forProperty": [
"string"
],
"madeActuation": "string",
"implementsProcedure": "string",
"observes": [
"string"
],
"detects": "string",
"madeObservation": "string"
}
The request has been accepted for processing.
Invalid request.
Device does not exist.
Response Content-Types: application/json
Response Example (202 Accepted)
{
"conversationId": "string"
}
Delete specified device
(no description)
(no description)
The request has been accepted for processing.
Device does not exist.
Response Content-Types: application/json
Response Example (202 Accepted)
{
"conversationId": "string"
}
Actuation
Send actuation message
Send actuation message to actuators
undefined
(no description)
(no description)
Request Content-Types: application/json
Request Example
{
"actuatorId": "string",
"actuatorLocalId": "string",
"actuationResultSet": [
{
"actuatableProperty": "string",
"value": "string",
"unit": "string",
"resultTime": "string (date)"
}
]
}
The request has been accepted for processing.
Invalid request.
Response Content-Types: application/json
Response Example (202 Accepted)
{
"conversationId": "string"
}
Schema Definitions
RegisterPlatformInput: object
- platformId: string
- type: string
- baseEndpoint: string
- location: string
- name: string
- username: string
- encryptedPassword: string
- encryptionAlgorithm: string
- downstreamInputAlignmentName: string
- downstreamInputAlignmentVersion: string
- downstreamOutputAlignmentName: string
- downstreamOutputAlignmentVersion: string
- upstreamInputAlignmentName: string
- upstreamInputAlignmentVersion: string
- upstreamOutputAlignmentName: string
- upstreamOutputAlignmentVersion: string
Example
{
"platformId": "string",
"type": "string",
"baseEndpoint": "string",
"location": "string",
"name": "string",
"username": "string",
"encryptedPassword": "string",
"encryptionAlgorithm": "string",
"downstreamInputAlignmentName": "string",
"downstreamInputAlignmentVersion": "string",
"downstreamOutputAlignmentName": "string",
"downstreamOutputAlignmentVersion": "string",
"upstreamInputAlignmentName": "string",
"upstreamInputAlignmentVersion": "string",
"upstreamOutputAlignmentName": "string",
"upstreamOutputAlignmentVersion": "string"
}
UpdatePlatformInput: object
- baseEndpoint: string
- location: string
- name: string
- username: string
- encryptedPassword: string
- encryptionAlgorithm: string
- downstreamInputAlignmentName: string
- downstreamInputAlignmentVersion: string
- downstreamOutputAlignmentName: string
- downstreamOutputAlignmentVersion: string
- upstreamInputAlignmentName: string
- upstreamInputAlignmentVersion: string
- upstreamOutputAlignmentName: string
- upstreamOutputAlignmentVersion: string
Example
{
"baseEndpoint": "string",
"location": "string",
"name": "string",
"username": "string",
"encryptedPassword": "string",
"encryptionAlgorithm": "string",
"downstreamInputAlignmentName": "string",
"downstreamInputAlignmentVersion": "string",
"downstreamOutputAlignmentName": "string",
"downstreamOutputAlignmentVersion": "string",
"upstreamInputAlignmentName": "string",
"upstreamInputAlignmentVersion": "string",
"upstreamOutputAlignmentName": "string",
"upstreamOutputAlignmentVersion": "string"
}
Platform: object
- platformId: string
- type: string
- baseEndpoint: string (url)
- location: string
- name: string
- clientId: string
- username: string
- timeCreated: integer (int64)
- platformStatistics: PlatformStatistics
- downstreamInputAlignmentName: string
- downstreamInputAlignmentVersion: string
- downstreamOutputAlignmentName: string
- downstreamOutputAlignmentVersion: string
- upstreamInputAlignmentName: string
- upstreamInputAlignmentVersion: string
- upstreamOutputAlignmentName: string
- upstreamOutputAlignmentVersion: string
Example
{
"platformId": "string",
"type": "string",
"baseEndpoint": "string (url)",
"location": "string",
"name": "string",
"clientId": "string",
"username": "string",
"timeCreated": "integer (int64)",
"platformStatistics": {
"deviceCount": "integer (int32)",
"subscribedDeviceCount": "integer (int32)",
"subscriptionCount": "integer (int32)"
},
"downstreamInputAlignmentName": "string",
"downstreamInputAlignmentVersion": "string",
"downstreamOutputAlignmentName": "string",
"downstreamOutputAlignmentVersion": "string",
"upstreamInputAlignmentName": "string",
"upstreamInputAlignmentVersion": "string",
"upstreamOutputAlignmentName": "string",
"upstreamOutputAlignmentVersion": "string"
}
PlatformStatistics: object
- deviceCount: integer (int32)
- subscribedDeviceCount: integer (int32)
- subscriptionCount: integer (int32)
Example
{
"deviceCount": "integer (int32)",
"subscribedDeviceCount": "integer (int32)",
"subscriptionCount": "integer (int32)"
}
Client: object
- clientId: string
- callbackUrl: string (url)
- receivingCapacity: integer (int32)
- responseFormat: string JSON_LD, JSON
- responseDelivery: string CLIENT_PULL, SERVER_PUSH
Example
{
"clientId": "string",
"callbackUrl": "string (url)",
"receivingCapacity": "integer (int32)",
"responseFormat": "string",
"responseDelivery": "string"
}
RegisterClientInput: object
- clientId: string
- callbackUrl: string
- receivingCapacity: integer (int32)
- responseFormat: string JSON_LD, JSON
- responseDelivery: string CLIENT_PULL, SERVER_PUSH
Example
{
"clientId": "string",
"callbackUrl": "string",
"receivingCapacity": "integer (int32)",
"responseFormat": "string",
"responseDelivery": "string"
}
UpdateClientInput: object
- callbackUrl: string
- receivingCapacity: integer (int32)
- responseFormat: string JSON_LD, JSON
- responseDelivery: string CLIENT_PULL, SERVER_PUSH
Example
{
"callbackUrl": "string",
"receivingCapacity": "integer (int32)",
"responseFormat": "string",
"responseDelivery": "string"
}
IoTDevice: object
- deviceTypes: string[]
-
string DEVICE, SENSOR, ACTUATOR - deviceId: string
- hostedBy: string
- location: string
- name: string
- hosts: string[]
-
string - forProperty: string[]
-
string - madeActuation: string
- implementsProcedure: string
- observes: string[]
-
string - detects: string
- madeObservation: string
Example
{
"deviceTypes": [
"string"
],
"deviceId": "string",
"hostedBy": "string",
"location": "string",
"name": "string",
"hosts": [
"string"
],
"forProperty": [
"string"
],
"madeActuation": "string",
"implementsProcedure": "string",
"observes": [
"string"
],
"detects": "string",
"madeObservation": "string"
}
PlatformCreateDeviceInput: object
Example
{
"devices": [
{
"deviceTypes": [
"string"
],
"deviceId": "string",
"hostedBy": "string",
"location": "string",
"name": "string",
"hosts": [
"string"
],
"forProperty": [
"string"
],
"madeActuation": "string",
"implementsProcedure": "string",
"observes": [
"string"
],
"detects": "string",
"madeObservation": "string"
}
]
}
Subscription: object
- conversationId: string
- deviceIds: string[]
-
string - clientId: string
Example
{
"conversationId": "string",
"deviceIds": [
"string"
],
"clientId": "string"
}
ActuationInput: object
Actuation POST request payload.
- actuatorId: string
-
Actuator ID, example: http://inter-iot.eu/light/L01
- actuatorLocalId: string
-
Actuator local ID. This is not an unique identifier, but rather an identifier inside of a platform example: lights
- actuationResultSet: ActuationResult
-
Actuation results, consist of actuation value and actuation unit
-
ActuationResult
Example
{
"actuatorId": "string",
"actuatorLocalId": "string",
"actuationResultSet": [
{
"actuatableProperty": "string",
"value": "string",
"unit": "string",
"resultTime": "string (date)"
}
]
}
ActuationResult: object
Object containing instructions for a single actuation. It containsinformation about the value and units to send to which actuatableProperty with optional result time.
- actuatableProperty: string
-
Actuatable property ID, example: http://inter-iot.eu/light/L01/brightness
- value: string
-
Actuation value. This value together with unit defines the actuation. Example: 10
- unit: string
-
Actuation unit. Has to be subclass of sweet_units:Unit. See https://docs.inter-iot.eu/ontology/1.1/#sweet_units-Unit
- resultTime: string (date)
-
Result time. Suggests when the actuation result should take time.
Example
{
"actuatableProperty": "string",
"value": "string",
"unit": "string",
"resultTime": "string (date)"
}