The device agent and its capabilities (handlers) communicate with the cloud through a pre-defined json schema.
The high-level description of this schema is as follows:
{ "desired":{ "configuration-group-id": { [sub-group-0-start][n/a|optional|required] "sub_group_0_prop_0": "value" [n/a|optional|required], "sub_group_0_prop_1": "value" [n/a|optional|required], [sub-group-0-end] [sub-group-1-start][n/a|optional|required] "sub_group_1_prop_0": "value" [n/a|optional|required], "sub_group_1_prop_1": "value" [n/a|optional|required] [sub-group-1-end] } }, "reported":{ "configuration-group-id": { [sub-group-0-start][yes|no] "sub_group_0_prop_0": "value" [yes|no], "sub_group_0_prop_1": "value" [yes|no], [sub-group-0-end] [sub-group-1-start][yes|no] "sub_group_1_prop_0": "value" [yes|no], "sub_group_1_prop_1": "value" [yes|no] [sub-group-1-end] } } }
- Anything between square brackets is an annotation describing the intention and is not an actual attribute in the json.
- Sub-groups are the logical children of a group. Properties are the logical children of a sub-group. For more on groups and sub-groups, see the Configuration Granularity page.
- When a desired property is marked 'required', it is required in relative to its sub-group. However, the sub-group as a whole can be optional.
- When a desired sub-group is marked n/a, consequently all its properties are n/a.
- A sub-group marked to be reported ('yes') does not necessarily mean all its properties will be reported. That's why each individual property can indicate whether it is reported or not.
- On the other hand, if a sub-group is marked to be not reported ('no'), all its properties will be marked 'no' too.
To represent the above relationships, each handler fills out a table in the following format:
Sub-Group | Properties | ||
Sub-Group-0 Title Desired: n/a|optiona|required Reported: Yes|No Sub-Group-0 description. |
`sub_group_0_prop_0` | Type | data_type |
Desired | n/a|optiona|required | ||
Reported | Yes|No | ||
Description | sub_group_0_prop_0 description and values. | ||
`sub_group_0_prop_1` | Type | data_type | |
Desired | n/a|optiona|required | ||
Reported | Yes|No | ||
Description | sub_group_0_prop_1 description and values. | ||
Sub-Group-1 Title Desired: n/a|optiona|required Reported: Yes|No Sub-Group-1 description. |
`sub_group_0_prop_0` | Type | data_type |
Desired | n/a|optiona|required | ||
Reported | Yes|No | ||
Description | sub_group_0_prop_0 description and values. | ||
`sub_group_0_prop_1` | Type | data_type | |
Desired | n/a|optiona|required | ||
Reported | Yes|No | ||
Description | sub_group_0_prop_1 description and values. |
Related Topics: