UNIT
A UNIT is a concrete resource of a certain UNIT-TYPE and can be addressed via an URI/URL. Each UNIT has general and UNIT-TYPE specific variables/values.
The datatype of each variable is specified as STRING(length), BOOLEAN (true or false) , INTEGER or TIMESTAMP whereas TIMESTAMP is STRING(25) of RFC3339 format YYYY-MM-DD"T"HH":"mm":"ss"+"hh":"mm" e.g. 2019-03-28T16:30:10+02:00
Each UNIT belongs to a certain TYPE that is identified by a TYPE-name (e.g. adr, cal, pky) , member-variables (eg. forename, street, temperature,...) and corresponding protection variables starting with ‘x_’ (eg. x_forename, x_street, x_temperature,...). The boolean value of a protection-variable determines whether the corresponding member-variable is public(false) or protected(true) i.e. only accessible for authenticated and authorized users.
adr - adress
idy - identity
cal - calendar
dev - device
dom - domain
sce- service
tok- token
Typically a UNIT references other UNITs i.e. the value of a variable can be the URI of another UNIT.
The API does not specify how the data/resources are stored on a WEBSERVER, the format of UNITs is solely binding for the access Methods.
General Variables
Each UNIT (except dom, tok) has the following variables:
Variable | DataType | Semantic |
---|---|---|
_subject | STRING(32) | any (short) textual description |
_href | STRING(64) | any http(s)-link |
_uref | STRING(64) | any other UP-URI |
_super | STRING(64) | UP-URI of another UNIT that may set default values for any variable of that UNIT |
_icon | STRING(1024) | Bitmap of an icon (png) |
_read | STRING(256) | UP-URI of a lst-UNIT that contains a list of email-adresses or a comma-seperated enumeration of email-adresses that have read-access on any variable (except _read, _write) of that UNIT |
_write | STRING(256) | UP-URI of a lst-UNIT that contains a list of email-adresses or a comma-seperated enumeration of email-adresses that have read- and write-access on any variable of that UNIT |
_cat | TIMESTAMP | created at |
_uat | TIMESTAMP | updated at |
_eat | TIMESTAMP | expire at - the UNIT will be automatically deleted |
_views | INTEGER | every GET request except from the owner increases the counter |
_licence | STRING(64) | Info that has to be regarded for usage |
_upin | STRING(16) | UNIT pin that authorizes write access to any user (see Privacy) |