Things
Things represent the entities in your world. They store information about real world objects like assets, rooms or buildings, as well as information about concepts like Tasks or processes.
These Things have two faces: the Thing itself and the schema which defines it.
{
"uid": "01EYVA8TJR9GN04ETC864HM3PR",
"title": "Office 211b Stereo",
"space": "my-space",
"collection": "my-collection",
"properties": {
"status" : "operational",
"volume" : 35
}
}
{
"actions": {
"toggleOn": {
"input": {
"type": "boolean"
}
},
"volumeChange": {
"description": "Change the volume of the Sound Stereo System",
"input": {
"properties": {
"Volumelevelduration": {
"minimum": 0,
"type": "integer",
"unit": "seconds"
},
"level": {
"maximum": 100,
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
"title": "Change the Volume"
}
},
"base": "https://api.swx.altairone.com",
"collection": "my-collection",
"created": "2021-10-11T14:05:56+00:00",
"description": "",
"events": {
"overheating": {
"data": {
"description": "The roof. The roof.",
"title": "Stereo Overheating",
"type": "string"
}
}
},
"href": "/spaces/my-space/collections/my-collection/things/01FHQTS842GDVVVSSGER1HSTE1",
"id": "https://api.swx.altairone.com/spaces/my-space/collections/my-collection/things/01FHQTS842GDVVVSSGER1HSTE1",
"model": {
"name": "",
"version": 0
},
"modified": "2021-10-11T14:09:05+00:00",
"properties": {
"status": {
"type": "string"
},
"volume": {
"description": "The volume of the Sound Stereo System",
"maximum": 100,
"minimum": 0,
"title": "Volume",
"type": "integer"
}
},
"space": "my-space",
"title": "Office 211b Stereo",
"uid": "01FHQTS842GDVVVSSGER1HSTE1"
}
You can see the schema is much more descriptive and even defines Things which are not immediately apparent in the Thing, like the events that might come from the real-world object or the actions one can take on that real-world object.
Therefore, both are needed. In your applications you want to know the state of a real-world object certainly, but you also want to know how you should describe those objects in the user experience. AnythingDB always provides both and gives you easy interfaces for getting only the data you need.