thing_def.list
The thing_def.list command is used to find and return a list of thing definitions.
TR50 Request
{
"cmd": {
"command": "thing_def.list"
}
}
Request Parameters
Name |
Type |
Required |
Description |
---|---|---|---|
offset |
Integer |
|
The starting list offset, used for pagination, defaults to 0 if not specified. |
limit |
Integer |
|
Limits the number of results returned. Defaults to the maximum configured size. |
sort |
String |
A string indicated the direction (+ for ascending, - for descending) and column by which to sort the results. To sort by the username descending, use "-username". Defaults to "+name". |
TR50 Response
If the command is sent successfully a success message is returned. Otherwise, an error and error message will be returned.
{
"1": {
"success": true,
"params": {
"count": 8,
"result": [
{
"id": "599db51574e936608472ccfe",
"ownerOrgId": "599db51574e936608472ccfb",
"key": "default",
"name": "Default",
"version": 1,
"autoDefProps": true,
"createdBy": "SYSTEM",
"createdOn": "2017-08-23T17:02:13.084Z",
"updatedBy": "SYSTEM",
"updatedOn": "2017-08-23T17:02:13.084Z"
},
{
"id": "59b6e29674e9366a4478dbf8",
"ownerOrgId": "599db51574e936608472ccfb",
"key": "iot_simple_telemetry",
"name": "Simple Telemetry Application",
"version": 1,
"autoDefProps": true,
"autoDefAttrs": true,
"createdBy": "user@example.com",
"createdOn": "2017-09-11T19:23:02.827Z",
"updatedBy": "user@example.com",
"updatedOn": "2017-09-11T19:23:02.827Z"
},
{
"id": "59b6e5817902896e3b4ec9c1",
"ownerOrgId": "599db51574e936608472ccfb",
"key": "python-demo-app",
"name": "Python Demo Application",
"version": 2,
"autoDefProps": false,
"autoDefAttrs": false,
"createdBy": "user@example.com",
"createdOn": "2017-09-11T19:35:29.637Z",
"updatedBy": "user@example.com",
"updatedOn": "2017-09-12T17:32:56.359Z"
},
{
"id": "59c939257902897b2326fac2",
"ownerOrgId": "599db51574e936608472ccfb",
"key": "hdc_dm_default_def",
"name": "hdc_dm_default_def",
"version": 4,
"autoDefProps": true,
"autoDefAttrs": true,
"createdBy": "user@example.com",
"createdOn": "2017-09-25T17:13:09.22Z",
"updatedBy": "user@example.com",
"updatedOn": "2017-10-27T17:40:32.409Z"
},
{
"id": "59e6209e74e936232f362266",
"ownerOrgId": "599db51574e936608472ccfb",
"key": "hdc_device_manager_def",
"name": "hdc_device_manager_def",
"version": 4,
"autoDefProps": false,
"autoDefAttrs": false,
"createdBy": "user@example.com",
"createdOn": "2017-10-17T15:24:14.366Z",
"updatedBy": "user@example.com",
"updatedOn": "2017-10-17T18:30:52.324Z"
},
{
"id": "59e6209e74e936232f36226a",
"ownerOrgId": "599db51574e936608472ccfb",
"key": "hdc_simple_location_def",
"name": "hdc_simple_location_def",
"version": 4,
"autoDefProps": false,
"autoDefAttrs": false,
"createdBy": "user@example.com",
"createdOn": "2017-10-17T15:24:14.753Z",
"updatedBy": "user@example.com",
"updatedOn": "2017-10-17T18:30:49.368Z"
},
{
"id": "59e6209f74e936232f36226d",
"ownerOrgId": "599db51574e936608472ccfb",
"key": "hdc_simple_telemetry_def",
"name": "hdc_simple_telemetry_def",
"version": 5,
"autoDefProps": false,
"autoDefAttrs": false,
"createdBy": "user@example.com",
"createdOn": "2017-10-17T15:24:15.078Z",
"updatedBy": "user@example.com",
"updatedOn": "2017-10-25T19:26:36.113Z"
},
{
"id": "59e6209f74e936232f362270",
"ownerOrgId": "599db51574e936608472ccfb",
"key": "hdc_simple_actions_def",
"name": "hdc_simple_actions_def",
"version": 4,
"autoDefProps": false,
"autoDefAttrs": false,
"createdBy": "user@example.com",
"createdOn": "2017-10-17T15:24:15.406Z",
"updatedBy": "user@example.com",
"updatedOn": "2017-10-17T18:30:50.154Z"
},
{
"id": "59e6209f74e936232f362273",
"ownerOrgId": "599db51574e936608472ccfb",
"key": "hdc_validate_def",
"name": "hdc_validate_def",
"version": 4,
"autoDefProps": true,
"autoDefAttrs": true,
"createdBy": "user@example.com",
"createdOn": "2017-10-17T15:24:15.759Z",
"updatedBy": "user@example.com",
"updatedOn": "2017-10-17T18:30:52.683Z"
},
{
"id": "59f36fb979028951de27c346",
"ownerOrgId": "599db51574e936608472ccfb",
"key": "hdc_device_manager_def_test",
"name": "hdc_device_manager_def_test",
"version": 1,
"autoDefProps": false,
"autoDefAttrs": false,
"createdBy": "user@example.com",
"createdOn": "2017-10-27T17:41:13.124Z",
"updatedBy": "user@example.com",
"updatedOn": "2017-10-27T17:41:13.124Z"
}
]
}
}
}
Response Parameters
Name |
Type |
Description |
---|---|---|
result |
Array |
The array of result objects. |
Results Object
Name |
Type |
Description |
---|---|---|
id |
String |
The unique identifier of the thing definition. |
ownerOrgid |
String |
If the thing definition is shared, then the ownerOrgid displays the id of the organization to which it belongs. If a thing definition is not shared then the orgid and the ownerOrgid are the same. |
key |
String |
The key of the thing definition. |
name |
String |
The name of the thing definition. |
version |
Integer |
A version number associated with the thing definition. |
autoDefAttrs |
Boolean |
Whether to automatically define attributes as they are published. |
autoDefProps |
Boolean |
Whether to automatically define properties as they are published. |
createdBy |
String |
The creator of the thing definition. |
createdOn |
String |
The creation timestamp of the thing definition. |
updatedBy |
String |
The updater of the thing definition. |
updatedOn |
String |
The update timestamp of the thing definition. |