Provides metadata about protocols, devices, device-types and value-types. Saves data as rdf, publishes changes to amqp and uses permissionsearch for text-search.
Results may represent a entity and its relations in different depths. Depth -1 means that a entity will be returned with all its relations recursively. A depth of 1 means that only the entity without its relations will be returned. A depth of 2 means that a entity with only its direct relationships will be returned.
Lists device instances where the user has reading permissions. Depth -1.
Lists device instances where the user has permissions corresponding to action. Valid actions are read
, write
and execute
. Depth -1.
Returns device instance if requesting user has reading permission. Depth -1.
Creates a device instance. Request-Body is a device instance without id and can be prepared with GET /ui/deviceInstance/resourceSkeleton/:deviceTypeId
.
A device is inconsistent if:
- the url is missing
- the name is missing
- the device-type id does not reference a device-type
- the device-config does not match device-type-config
- the generated device endpoint for a service would collide with a existing endpoint
If the device is consistent it will be published to amqp and asynchronously consumed to save the device to the database. Through this published message other services will also be able to save a representation in its own databases. The permissionsearch service is one example for such services.
If the corresponding device-type has a endpoint-format set for a service, it will be used to generate a endpoint pointing to this device and the service.
If the ImgUrl field is left empty the img from the associated device type will be used.
A for the protocol unique identifier of the device instance.
Updates a device instance with similar behavior to the creation.
If the device-url or a device-tag is changed and the device is assigned to a gateway, the gateways hash will be reset. This guaranties that the client-connector (gateway) sees the change and has the opportunity to publish its device-information.
removes the device, removes corresponding endpoints, resets hash of assigned gateway. works asynchronous.
Returns a skeleton of a new device instance which would be of the given device-type. the skeleton can be used for POST /deviceInstance
.
Returns device instances that are of the device type that contains the given service and the user has read access to. Depth -1.
Returns device instances that are of the device type that contains the given service and the user has the requested access to. Depth -1.
Returns device instances that are of the given device type and the user has read access to. Depth -1.
Returns device instances that are of the given device type and the user has the requested access to. Depth -1.
Returns a list of objects containing devices and services where the url matches the requested one and the user has read access. Depth -1.
Returns list of endpoints with matching endpoint string and protocol where the user has execute access and the referenced service is declared as sensor.
Checks if user has execute access to all devices referenced by the given endpoint and protocol.
Returns endpoint of given device and service if user has execute access.
Creates new device to be referenced by the given endpoint. If no device type exists that has a matching service a new device type will be created. If no value type exists to match the given message, a new one will be created.
Lists all endpoints, if the user has the role "admin"
Lists gateways the user has read access to. Depth -1.
Returns the gateway if the user has read access. Depth -1.
Deletes gateway if user has admin access.
Removes all associations with devices and sets hash to empty string if the user has write access.
Sets the name of the gateway if the user has write access.
Get the name of the gateway if the user has read access.
Assigns devices and a hash to the gateway. The commit will fail if a device is already assigned to a different gateway. If this happens you can clear ore delete the other gateway. Gateway creation and updates are asynchronous, so you may nead to wait a short moment after creation until you can commit.
Returns a gateway with the given id if the user has execute rights. If no id is passed or the id is unknown a new gateway will be created and returned.
Returns service if user has access rights to related device type.
Lists device types the user has read access to.
Lists device types where the given maintenance flag is set and the user has write access.
Checks if any device type has maintenance flag set.
Returns device type if user has read access. Depth -1.
Returns devicetype if user has read access, with modifiable depth.
Creates asynchronously a new device type.
Device type is inconsistent or invalid if:
- the device type has no name
- the device type has no description
- the device type has no assigned vendor
- the device type has no assigned device class
- a config field has no name
- a input/output type assignment has no name
- a input/output type assignment has no assigned known format
- a input/output type assignment has no assigned message segment matching with the protocol
- a input/output type assignment has no assigned valid value type
- a service of the type has no url
- a service of the type has no name
- a service of the type has no description
- a service of the type has no assigned protocol
A endpoint references a device-specific instantiation of iot-device-repository.Service.EndpointFormat. The endpoint identifies device-service combinations.
The iot-device-repository.Service.EndpointFormat is a mustache template which may reference device and service uri.
For example /some/path/{{device_uri}}/foo/{{service_uri}}/bar
.
The use of the device uri is highly advised, to ensure that for a devicetype each device has its own service endpoints.
The last example used a structure reminiscent of a http-path, but it can be everything. It is advisable to use one that prevents ambiguous endpoints but it may in fact be somthing like iuhansdcansdc{{device_uri}}asidauisdha
.
If iot-device-repository.Service.EndpointFormat is not empty the iot-repository will create a endpoint for new device instances created of this type.
The image link will be used for display in the web-ui. device instances of this type will use this image as default, unless changed.
A for the device type unique identifier
Updates the device type. Endpoints will be updated. device instance images will be updated, if they still use the default image.
Creates a new device type without consistency check and with user predefined ids. WARNING: can harm your database.
Deletes the device type if user has administration access and no device instance with this type exists.
Returns informations about valid values to create new device types and value types.
Use request-body as partial device type to find matching device type, similar to a mongodb filter. Returns document containing existence boolean and device type id.
Use request-body as partial service to find device types with matching services, similar to a mongodb filter. Returns a list of device type ids.
this endpoints should be only accessible from internal services, they will not check for the rigths of the requester.
Maps names to the given gateway ids
Maps names of associated gateways to the given device ids
Creates a new vendor
Creates a new protocol. The protocol url will be used as topic for kafka messages.
Creates a new deviceclass
Creates a new valueType.
a value type is inconsistent if:
- value type has no name
- value type has no description
- value type has no known base type
- value type has not exactly one field if base type is list or map
- value type has not primitive base type and has more than 0 fields
Returns input/output example for device and service as received by the bpmn-process.
like /skeleton/:instance_id/:service_id but with device type.
Returns message example in the selected format as potentially send to a device.
Searches for partial device type matches of name, description etc. (permissionsearch config defines which fields ar searchable). Depth 1. Searches will be performed by the permissionsearch service, the data will be completed by the rdf triple store.
Searches for partial device instance matches of name, description etc. (permissionsearch config defines which fields ar searchable), where the user has read access. Depth -1. Searches will be performed by the permissionsearch service, the data will be completed by the rdf triple store.
Searches for partial device instance matches of name, description etc. (permissionsearch config defines which fields ar searchable), where the user has requested (:action) access. Depth -1. Searches will be performed by the permissionsearch service, the data will be completed by the rdf triple store.
Searches for partial gateway matches of name, description etc. (permissionsearch config defines which fields ar searchable), where the user has read access. Depth -1. Searches will be performed by the permissionsearch service, the data will be completed by the rdf triple store.
Searches for value types
Searches for miscellaneous entities. Valid types are vendors
, deviceClasses
and protocols
Lists value types
Returns value type
Generates a value type representing message given by the post body. value type will be returned with the used format, but will not be saved.