UNIT

A UNIT is an instance of a certain UNIT-CLASS and can be addressed via an URI/URL. Each UNIT-CLASS is identified by a class-specific name.

air- weather

cal - calendar

cct - contact

dev - device

file - file

idy - identity

loc - location

lst - list

msg - message

pky - password

pwd - password

ref - reference

sce- service

Every UNIT-CLASS has general variables (starting according to naming convention with '_') and specific UNIT-CLASS variables (eg. i_windspeed).

JSON values must be one of the following data types:

  • string
  • number
  • array
  • boolean
  • null
  • object (JSON object)

There is a naming convention  specified data types are binding for the API

UP-Datatype Description Prefix Example { JSON-Object }
BOOLEAN true | false b_ "_b_private":true
STRING
(length)
any String
(maximum length)
  "_subject"":"Test me"
NUMBER integer | float n_ "_n_views":12
"n_latitude":12.34562
UNIT
(64)
Typically a UNIT is linked with other UNITs i.e. the value of a variable can be the URI of another UNIT. The class-specific name can be ommited in the URI

<UNIT-CLASS>_

"_lst_follower":"alice@a-provider.com?q=friends"

DATETIME
(25)
RFC3339
YYYY-MM-DDTHH:mm:ss+hh:mm
dt_ "_dt_expire":"2019-03-28T16:30:10+02:00"
DATEDAY
(10)


YYYY-MM-DD

dd_ "dd_birthday":"2000-12-24"
DATELOCAL
(18)

YYYY-MM-DD HH:mm

dl_ "dl_sunrise":"2019-03-28 16:30"
COUNTRY
(2)
ISO 3166-1 alpha-2 c_ "c_citizenship":"US"
"c_nationality":"DE"
"c_country":"AT"
ENUM
(length)
  e_ "e_messenger":"WHATSAPP"
ARRAY  
a_
"a_forecast"=[{"dt":"2025-05-25 09:00","tem":8,"wds":3,"wdg":6,"wdd":"E","con":"SUNNY_DAY"},
{"dt":"2025-05-25 12:00","tem":24,"wds":8,"wdg":15,"wdd":"WSW","con":"HEAVY_RAIN"},
{"dt":"2025-05-25 18:00","tem":12,"wds":2,"wdg":5,"wdd":"E","con":"SLEET_SHOWER_DAY"}]

 

Format
Variable Semantic
_subject(32) any (short) textual description
_href(64) any http(s)-link
_lst_units lst-UNIT (_type = UNIT)
_super UP-URI of another UNIT that may set default values for any variable of that UNIT
_icon(1024) Bitmap of an icon (png)
_lst_follower UP-URI of a lst-UNIT that contains a list of email-adresses that have read-access on any variable of that UNIT
_b_private true: private -> _lst_follower determines authorization
false: not private -> no authentication required
_dt_create created at
_dt_update updated at
_dt_expire expire at - the UNIT will be automatically deleted
_n_views every GET request except from the owner increases the counter
_licence(64) Info that has to be regarded for usage