Appearance
Schema
Description
The schema module handles the mapping from arbitrary identifier to human readable format. It defines all the required mappings to ensure every service or property identifier can be mapped to human readable format and provide further information about available methods or for example unit information for a given service.
Events
Following events are transmitted via the websocket.
This event will be sent over the websocket when a new schema is added. This event requires read access to the resource schemas.
| Name | Description |
|---|---|
typestringconstant | Constant value: SCHEMA_ADD |
serviceIdentifierstring | The service identifier for a service of the device. Can be seen as the interface name where services with the same identifier contain the same properties. |
schemaobject | |
schema.namestring | The name for the given service. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
schema.descriptionstringoptional | The service entry description. |
schema.propertiesdictionary | Any properties in this Service. The keys of this object need to be a hex-string in the format `0x0....0`. The key does represent the number that identifies a property. |
| schema.properties. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.properties. #.description stringoptional | An optional property description |
| schema.properties. #.type stringenum | The property type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| schema.properties. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| schema.properties. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.properties. #.enum. #.description stringoptional | Optional enum description |
| schema.properties. #.rangeMin numberoptional | Applicable to numeric types, this specifies the minimum value, range inclusive. |
| schema.properties. #.rangeMax numberoptional | Applicable to numeric type, this specifies the maximum value, range exclusive. |
| schema.properties. #.unit stringoptional | Applicable to any type (most likely numeric), specifies the unit of the value |
| schema.properties. #.readonly booleanoptional | Whenever the property is readonly or not. This will only act as a hint to the backend and the user interface. The final say has the device that actually transmitted the property. |
| schema.properties. #.actionable booleanoptional | Whenever the property is actionable or not. This will only act as a hint to the backend and the user interface. The final say has the device that actually transmitted the property. |
| schema.properties. #.group stringoptional | The group the property belongs to. Can be used to further organize properties to different subjects. |
| schema.properties. #.hint stringoptional | Any hint for given property. Freetext, that can for example be used to indicate a property is a `script` or an `email` or anything else. |
| schema.properties. #.__i18nSupport booleanoptional | A required key for easier parsing when actually using translations. Default: true |
| schema.properties. #.translations dictionaryoptional | |
| schema.properties. #.translations. #.name stringoptional | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.properties. #.translations. #.description stringoptional | An optional property description |
| schema.properties. #.translations. #.group stringoptional | The group the property belongs to. Can be used to further organize properties to different subjects. |
| schema.properties. #.translations. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| schema.properties. #.translations. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.properties. #.translations. #.enum. #.description stringoptional | Optional enum description |
schema.methodsdictionaryoptional | Any methods that this Service exposes for usage. The key used for each method will be the method name. |
| schema.methods. #.description stringoptional | Description of a method |
| schema.methods. #.parameters dictionaryoptional | A set of input parameters for this method. |
| schema.methods. #.parameters. #.name string | The human readable parameter name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.methods. #.parameters. #.description stringoptional | The parameter description. |
| schema.methods. #.parameters. #.type stringenum | The parameter type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| schema.methods. #.parameters. #.optional booleanoptional | Whenever this parameter is optional or not. |
| schema.methods. #.success dictionary | Any properties returned with a successful method call |
| schema.methods. #.success. #.name string | The human returned property name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.methods. #.success. #.description stringoptional | The returned property description. |
| schema.methods. #.success. #.type stringenum | The returned property type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| schema.methods. #.success. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| schema.methods. #.success. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.methods. #.success. #.enum. #.description stringoptional | Optional enum description |
| schema.methods. #.failure dictionaryoptional | A enum-like mapping of error-codes to human values |
| schema.methods. #.failure. #.name string | The error name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.methods. #.failure. #.description stringoptional | The errod description. |
schema.__i18nSupportbooleanoptional | A required key for easier parsing when actually using translations. Default: true |
schema.translationsdictionaryoptional | |
| schema.translations. #.name stringoptional | The name for the given service. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.translations. #.description stringoptional | The service entry description. |
API
Get Schemas
Returns a list of service identifier for which a schema has been created. Using the query parameter depth will return the schema directly in combination with the service identifier.
GET
/api/v1/schemas
Access
This endpoint requires read permission for the resource schemas.
Query Parameter
| Name | Description |
|---|---|
depthintegeroptional | Due to the fact that some resources follow certain hierarchies, the depth query parameter can be used to include nested information in the response. This can be used to minimize roundtrips and is generally advised for. |
langstringoptional | A string as language code in the format xx or xx-XX where x can be any letter describing an actual language. Pattern: ^[a-z]{2}(-[A-Z]{2})?$ |
untranslatedbooleanoptional | Whenever to return the config as is or translate specific fields |
Response
| Name | Description |
|---|---|
serviceIdentifierstring | The service identifier for a service of the device. Can be seen as the interface name where services with the same identifier contain the same properties. |
schemaobjectoptional | The service definition for that service identifier. Returned when the depth query parameter is used. |
schema.namestring | The name for the given service. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
schema.descriptionstringoptional | The service entry description. |
schema.propertiesdictionary | Any properties in this Service. The keys of this object need to be a hex-string in the format `0x0....0`. The key does represent the number that identifies a property. |
| schema.properties. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.properties. #.description stringoptional | An optional property description |
| schema.properties. #.type stringenum | The property type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| schema.properties. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| schema.properties. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.properties. #.enum. #.description stringoptional | Optional enum description |
| schema.properties. #.rangeMin numberoptional | Applicable to numeric types, this specifies the minimum value, range inclusive. |
| schema.properties. #.rangeMax numberoptional | Applicable to numeric type, this specifies the maximum value, range exclusive. |
| schema.properties. #.unit stringoptional | Applicable to any type (most likely numeric), specifies the unit of the value |
| schema.properties. #.readonly booleanoptional | Whenever the property is readonly or not. This will only act as a hint to the backend and the user interface. The final say has the device that actually transmitted the property. |
| schema.properties. #.actionable booleanoptional | Whenever the property is actionable or not. This will only act as a hint to the backend and the user interface. The final say has the device that actually transmitted the property. |
| schema.properties. #.group stringoptional | The group the property belongs to. Can be used to further organize properties to different subjects. |
| schema.properties. #.hint stringoptional | Any hint for given property. Freetext, that can for example be used to indicate a property is a `script` or an `email` or anything else. |
| schema.properties. #.__i18nSupport booleanoptional | A required key for easier parsing when actually using translations. Default: true |
| schema.properties. #.translations dictionaryoptional | |
| schema.properties. #.translations. #.name stringoptional | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.properties. #.translations. #.description stringoptional | An optional property description |
| schema.properties. #.translations. #.group stringoptional | The group the property belongs to. Can be used to further organize properties to different subjects. |
| schema.properties. #.translations. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| schema.properties. #.translations. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.properties. #.translations. #.enum. #.description stringoptional | Optional enum description |
schema.methodsdictionaryoptional | Any methods that this Service exposes for usage. The key used for each method will be the method name. |
| schema.methods. #.description stringoptional | Description of a method |
| schema.methods. #.parameters dictionaryoptional | A set of input parameters for this method. |
| schema.methods. #.parameters. #.name string | The human readable parameter name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.methods. #.parameters. #.description stringoptional | The parameter description. |
| schema.methods. #.parameters. #.type stringenum | The parameter type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| schema.methods. #.parameters. #.optional booleanoptional | Whenever this parameter is optional or not. |
| schema.methods. #.success dictionary | Any properties returned with a successful method call |
| schema.methods. #.success. #.name string | The human returned property name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.methods. #.success. #.description stringoptional | The returned property description. |
| schema.methods. #.success. #.type stringenum | The returned property type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| schema.methods. #.success. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| schema.methods. #.success. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.methods. #.success. #.enum. #.description stringoptional | Optional enum description |
| schema.methods. #.failure dictionaryoptional | A enum-like mapping of error-codes to human values |
| schema.methods. #.failure. #.name string | The error name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.methods. #.failure. #.description stringoptional | The errod description. |
schema.__i18nSupportbooleanoptional | A required key for easier parsing when actually using translations. Default: true |
schema.translationsdictionaryoptional | |
| schema.translations. #.name stringoptional | The name for the given service. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| schema.translations. #.description stringoptional | The service entry description. |
Create Schema
Using this endpoint will create a new service definition if not present.
POST
/api/v1/schemas
Access
This endpoint requires create permission for the resource schemas.
Request Body
| Name | Description |
|---|---|
$idstringoptional | The specific Flake-Schemas ID. This should be a URL to the schema document. |
$schemastringoptional | The Flake Schema used to describe this specific schema. This also clarifies which version of the Flake Schema is used |
titlestringoptional | A title for the specific schema |
servicesdictionary | The object that contains the services. The keys of this objects |
| services. #.name string | The name for the given service. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| services. #.description stringoptional | The service entry description. |
| services. #.properties dictionary | Any properties in this Service. The keys of this object need to be a hex-string in the format `0x0....0`. The key does represent the number that identifies a property. |
| services. #.properties. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| services. #.properties. #.description stringoptional | An optional property description |
| services. #.properties. #.type stringenum | The property type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| services. #.properties. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| services. #.properties. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| services. #.properties. #.enum. #.description stringoptional | Optional enum description |
| services. #.properties. #.rangeMin numberoptional | Applicable to numeric types, this specifies the minimum value, range inclusive. |
| services. #.properties. #.rangeMax numberoptional | Applicable to numeric type, this specifies the maximum value, range exclusive. |
| services. #.properties. #.unit stringoptional | Applicable to any type (most likely numeric), specifies the unit of the value |
| services. #.properties. #.readonly booleanoptional | Whenever the property is readonly or not. This will only act as a hint to the backend and the user interface. The final say has the device that actually transmitted the property. |
| services. #.properties. #.actionable booleanoptional | Whenever the property is actionable or not. This will only act as a hint to the backend and the user interface. The final say has the device that actually transmitted the property. |
| services. #.properties. #.group stringoptional | The group the property belongs to. Can be used to further organize properties to different subjects. |
| services. #.properties. #.hint stringoptional | Any hint for given property. Freetext, that can for example be used to indicate a property is a `script` or an `email` or anything else. |
| services. #.properties. #.__i18nSupport booleanoptional | A required key for easier parsing when actually using translations. Default: true |
| services. #.properties. #.translations dictionaryoptional | |
| services. #.properties. #.translations. #.name stringoptional | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| services. #.properties. #.translations. #.description stringoptional | An optional property description |
| services. #.properties. #.translations. #.group stringoptional | The group the property belongs to. Can be used to further organize properties to different subjects. |
| services. #.properties. #.translations. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| services. #.properties. #.translations. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| services. #.properties. #.translations. #.enum. #.description stringoptional | Optional enum description |
| services. #.methods dictionaryoptional | Any methods that this Service exposes for usage. The key used for each method will be the method name. |
| services. #.methods. #.description stringoptional | Description of a method |
| services. #.methods. #.parameters dictionaryoptional | A set of input parameters for this method. |
| services. #.methods. #.parameters. #.name string | The human readable parameter name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| services. #.methods. #.parameters. #.description stringoptional | The parameter description. |
| services. #.methods. #.parameters. #.type stringenum | The parameter type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| services. #.methods. #.parameters. #.optional booleanoptional | Whenever this parameter is optional or not. |
| services. #.methods. #.success dictionary | Any properties returned with a successful method call |
| services. #.methods. #.success. #.name string | The human returned property name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| services. #.methods. #.success. #.description stringoptional | The returned property description. |
| services. #.methods. #.success. #.type stringenum | The returned property type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| services. #.methods. #.success. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| services. #.methods. #.success. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| services. #.methods. #.success. #.enum. #.description stringoptional | Optional enum description |
| services. #.methods. #.failure dictionaryoptional | A enum-like mapping of error-codes to human values |
| services. #.methods. #.failure. #.name string | The error name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| services. #.methods. #.failure. #.description stringoptional | The errod description. |
| services. #.__i18nSupport booleanoptional | A required key for easier parsing when actually using translations. Default: true |
| services. #.translations dictionaryoptional | |
| services. #.translations. #.name stringoptional | The name for the given service. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| services. #.translations. #.description stringoptional | The service entry description. |
Response
This endpoint simply returns Status 204 to indicate a successful operation and to save bandwidth.
Get Schema
Returns the definition for a given service identifier
GET
/api/v1/schemas/:serviceIdentifier
Access
This endpoint requires read permission for the resource schemas.
URL Parameter
| Name | Description |
|---|---|
serviceIdentifierstring | The service identifier for a service of the device. Can be seen as the interface name where services with the same identifier contain the same properties. |
Query Parameter
| Name | Description |
|---|---|
langstringoptional | A string as language code in the format xx or xx-XX where x can be any letter describing an actual language. Pattern: ^[a-z]{2}(-[A-Z]{2})?$ |
untranslatedbooleanoptional | Whenever to return the config as is or translate specific fields |
Response
| Name | Description |
|---|---|
namestring | The name for the given service. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
descriptionstringoptional | The service entry description. |
propertiesdictionary | Any properties in this Service. The keys of this object need to be a hex-string in the format `0x0....0`. The key does represent the number that identifies a property. |
| properties. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| properties. #.description stringoptional | An optional property description |
| properties. #.type stringenum | The property type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| properties. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| properties. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| properties. #.enum. #.description stringoptional | Optional enum description |
| properties. #.rangeMin numberoptional | Applicable to numeric types, this specifies the minimum value, range inclusive. |
| properties. #.rangeMax numberoptional | Applicable to numeric type, this specifies the maximum value, range exclusive. |
| properties. #.unit stringoptional | Applicable to any type (most likely numeric), specifies the unit of the value |
| properties. #.readonly booleanoptional | Whenever the property is readonly or not. This will only act as a hint to the backend and the user interface. The final say has the device that actually transmitted the property. |
| properties. #.actionable booleanoptional | Whenever the property is actionable or not. This will only act as a hint to the backend and the user interface. The final say has the device that actually transmitted the property. |
| properties. #.group stringoptional | The group the property belongs to. Can be used to further organize properties to different subjects. |
| properties. #.hint stringoptional | Any hint for given property. Freetext, that can for example be used to indicate a property is a `script` or an `email` or anything else. |
| properties. #.__i18nSupport booleanoptional | A required key for easier parsing when actually using translations. Default: true |
| properties. #.translations dictionaryoptional | |
| properties. #.translations. #.name stringoptional | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| properties. #.translations. #.description stringoptional | An optional property description |
| properties. #.translations. #.group stringoptional | The group the property belongs to. Can be used to further organize properties to different subjects. |
| properties. #.translations. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| properties. #.translations. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| properties. #.translations. #.enum. #.description stringoptional | Optional enum description |
methodsdictionaryoptional | Any methods that this Service exposes for usage. The key used for each method will be the method name. |
| methods. #.description stringoptional | Description of a method |
| methods. #.parameters dictionaryoptional | A set of input parameters for this method. |
| methods. #.parameters. #.name string | The human readable parameter name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| methods. #.parameters. #.description stringoptional | The parameter description. |
| methods. #.parameters. #.type stringenum | The parameter type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| methods. #.parameters. #.optional booleanoptional | Whenever this parameter is optional or not. |
| methods. #.success dictionary | Any properties returned with a successful method call |
| methods. #.success. #.name string | The human returned property name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| methods. #.success. #.description stringoptional | The returned property description. |
| methods. #.success. #.type stringenum | The returned property type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| methods. #.success. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| methods. #.success. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| methods. #.success. #.enum. #.description stringoptional | Optional enum description |
| methods. #.failure dictionaryoptional | A enum-like mapping of error-codes to human values |
| methods. #.failure. #.name string | The error name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| methods. #.failure. #.description stringoptional | The errod description. |
__i18nSupportbooleanoptional | A required key for easier parsing when actually using translations. Default: true |
translationsdictionaryoptional | |
| translations. #.name stringoptional | The name for the given service. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| translations. #.description stringoptional | The service entry description. |
Update a Schema
This endpoint can be used by sending a partial service definition. This definition will be merged with the current one. Duplicate keys will be overwritten.
PATCH
/api/v1/schemas/:serviceIdentifier
Access
This endpoint requires update permission for the resource schemas.
URL Parameter
| Name | Description |
|---|---|
serviceIdentifierstring | The service identifier for a service of the device. Can be seen as the interface name where services with the same identifier contain the same properties. |
Request Body
| Name | Description |
|---|---|
namestringoptional | The name for the given service. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
descriptionstringoptional | The service entry description. |
propertiesdictionaryoptional | Any properties in this Service. The keys of this object need to be a hex-string in the format `0x0....0`. The key does represent the number that identifies a property. |
| properties. #.name stringoptional | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| properties. #.type stringoptionalenum | The property type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| properties. #.description stringoptional | An optional property description |
| properties. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| properties. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| properties. #.enum. #.description stringoptional | Optional enum description |
| properties. #.rangeMin numberoptional | Applicable to numeric types, this specifies the minimum value, range inclusive. |
| properties. #.rangeMax numberoptional | Applicable to numeric type, this specifies the maximum value, range exclusive. |
| properties. #.unit stringoptional | Applicable to any type (most likely numeric), specifies the unit of the value |
| properties. #.readonly booleanoptional | Whenever the property is readonly or not. This will only act as a hint to the backend and the user interface. The final say has the device that actually transmitted the property. |
| properties. #.actionable booleanoptional | Whenever the property is actionable or not. This will only act as a hint to the backend and the user interface. The final say has the device that actually transmitted the property. |
| properties. #.group stringoptional | The group the property belongs to. Can be used to further organize properties to different subjects. |
| properties. #.hint stringoptional | Any hint for given property. Freetext, that can for example be used to indicate a property is a `script` or an `email` or anything else. |
| properties. #.__i18nSupport booleanoptional | A required key for easier parsing when actually using translations. Default: true |
| properties. #.translations dictionaryoptional | |
| properties. #.translations. #.name stringoptional | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| properties. #.translations. #.description stringoptional | An optional property description |
| properties. #.translations. #.group stringoptional | The group the property belongs to. Can be used to further organize properties to different subjects. |
| properties. #.translations. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| properties. #.translations. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| properties. #.translations. #.enum. #.description stringoptional | Optional enum description |
methodsdictionaryoptional | Any methods that this Service exposes for usage. The key used for each method will be the method name. |
| methods. #.description stringoptional | Description of a method |
| methods. #.parameters dictionaryoptional | A set of input parameters for this method. |
| methods. #.parameters. #.name stringoptional | The human readable parameter name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| methods. #.parameters. #.description stringoptional | The parameter description. |
| methods. #.parameters. #.type stringenum | The parameter type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| methods. #.parameters. #.optional booleanoptional | Whenever this parameter is optional or not. |
| methods. #.success dictionaryoptional | Any properties returned with a successful method call |
| methods. #.success. #.name string | The human returned property name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| methods. #.success. #.description stringoptional | The returned property description. |
| methods. #.success. #.type stringenum | The returned property type Possible values: uint8, uint16, uint32, uint64, int8, int16, int32, int64, bool, uuid, float, float64, datetime, string, binary, binary-stream, string-stream, int64-array, int32-array, int16-array, int8-array, uint64-array, uint32-array, uint16-array, uint8-array, bool-array, uuid-array, float64-array, float-array, datetime-array, string-array |
| methods. #.success. #.enum dictionaryoptional | Treat this property as an enumeration and map the values as follows |
| methods. #.success. #.enum. #.name string | The property name Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| methods. #.success. #.enum. #.description stringoptional | Optional enum description |
| methods. #.failure dictionaryoptional | A enum-like mapping of error-codes to human values |
| methods. #.failure. #.name string | The error name. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| methods. #.failure. #.description stringoptional | The error description. |
__i18nSupportbooleanoptional | A required key for easier parsing when actually using translations. Default: true |
translationsdictionaryoptional | |
| translations. #.name stringoptional | The name for the given service. Pattern: ^[0-9a-zA-Z\p{Letter}\p{Mark}\-._\s ]+$ |
| translations. #.description stringoptional | The service entry description. |
Response
This endpoint simply returns Status 204 to indicate a successful operation and to save bandwidth.
Delete single Schema
Delete a single given schema.
DELETE
/api/v1/schemas/:serviceIdentifier
Access
This endpoint requires delete permission for the resource schemas.
URL Parameter
| Name | Description |
|---|---|
serviceIdentifierstring | The service identifier for a service of the device. Can be seen as the interface name where services with the same identifier contain the same properties. |
Response
This endpoint simply returns Status 204 to indicate a successful operation and to save bandwidth.