thing.find

The thing.find command is used to find and return a Thing.

TR50 Request
{
  "cmd": {
    "command": "thing.find",
    "params": {
      "key": "mything"
    }
  }
}

Request Parameters

Name Type Required Description
key String Yes* The key of the thing.
id String ID of the thing.
iccid String ICCID of the thing.
esn String ESN of the thing.
imei String IMEI of the thing.
meid String MEID of the thing.
imsi String IMSI of the thing.
*One of the above parameters is required to identify the Thing.

If the command is sent successfully a success message and the Thing is returned. Otherwise, an error and error message will be returned.

TR50 Response
{
  "cmd": {
    "success": true,
    "params": {
      "id": "52f1413a63c4b80b5700007c",
      "orgId": "53fbfe495d80f1062b00000f",
      "ownerOrgId": "53fbfe495d80f1062b00000f",
      "permission": "rw",
      "name": "My Thing",
      "key": "mything",
      "desc": "Lorem ipsum dolor sit amet...",
      "defId": "52f105e363c4b87f38000700",
      "defKey": "default",
      "secTags": [
        "sectag-a",
        "sectag-b"
      ],
      "tags": [
        "tag1",
        "tag2"
      ],
      "lastSeen": "0001-01-01T00:00:00Z",
      "locEnabled": true,
      "locUpdated": "2019-04-10T20:37:53.887Z",
      "loc": {
        "lat": 30.455,
        "lng": -84.253333,
        "fixType": "manual",
        "addr": {
          "streetNumber": "",
          "street": "1113 Buckingham Dr",
          "city": "Tallahassee",
          "state": "FL",
          "zipCode": "32308-5212",
          "country": "US"
        }
	"since": "2019-04-10T20:36:59.839Z"
      },
       "gateway": {
                "make": "unknown",
                "model": "unknown",
                "dwProduct": "DW-Gateway.Lanner",
                "dwPlatform": "Linux-X86-Generic",
                "dwVersion": "16.1.1-002",
                "appVersion": "1.0",
                "remShell": false
      },
      "tunnelActualHost": "192.168.4.241",
      "tunnelVirtualHost": "127.10.10.10",
      "tunnelLatencies": {
        "router01": 110,
        "router02": 340
      },
      "properties": {
         "mbps_down": {
               "ts": "2019-01-15T19:49:19.04Z",
               "value": 0
                },
          "mbps_up": {
                "ts": "2019-01-15T19:49:19.058Z",
                "value": 0
                }
            },
            "apiCounts": {
               "daily": 0,
               "monthToDate": 0,
               "total": 1389869
      },
      "createdBy": "admin@devicewise.com",
      "createdOn": "2014-02-04T14:36:26.783-05:00",
      "updatedBy": "admin@devicewise.com",
      "updatedOn": "2019-03-27T11:06:32.758-04:00",
      "connected": false
    }
  }
}

Response Parameters

Name Type Description
id String The id of the thing.
orgid String The current organization id
ownerOrgid String If the thing is shared, then the ownerOrgid displays the id of the organization to which it belongs to. If a thing is not shared then the orgid and the ownerOrgid are the same. For more information on sharing a Thing, see Sharing Things and Connections
permission String The permissions for the thing in the current organization.
name String The name of the thing.
key String The key of the thing.
desc String The description of the thing.
defId String The thing definition id of the thing.
defKey String The thing definition key of the thing.
secTags Array The security tags associated with the thing.
tags Array The tags associated with the thing.
lastSeen String The last time the thing was connected.
lastCommunication String The last time the thing indicated that it was still connected (the keep-alive heartbeat).
locEnabled Bool If the thing has location tracking enabled.
loc Object The array containing the location information.
loc.lat Float The latitude of the thing.
loc.lng Float The longitude of the thing.
loc.heading Float The heading of the thing.
loc.speed Float The speed of the thing.
loc.altitude Float The altitude of the thing.
loc.fixType String The method used to determine the location of the thing.
loc.addr Object The array containing the address information.
loc.addr.streetNumber String The street number.
loc.addr.street String The street.
loc.addr.city String The city.
loc.addr.state String The state.
loc.addr.zipCode String The zip code.
loc.addr.country String The country.
loc.since String The date and time of the first publish from a location.
messageCounts.daily Integer he number of LwM2M messages to/from this Thing for the current day (estimate).
messageCounts.monthToDate Integer The number of LwM2M messages to/from this Thing since the beginning of the current month.
messageCounts.total Integer The number of LwM2M messages to/from this Thing since the beginning of time.
The message counts are updated hourly.
tunnelActualHost String The actual IP address or hostname that should be used from the thing's gateway to reach the thing.
tunnelVirtualHost String The virtual IP address that will be used by the tunnel manager to access the tunnels.
tunnelLatencies Sring:Int Pairs Mappings of key:value pairs indicating the latency between the thing and each router.

This field will only be used on a directly connected thing, Things bound to other Things will inherit the tunnelLatencies from their parent Thing.

attrs Object Lists the attribute key-value pairs with the timestamps. For more information on attributes, see Defining Attributes.
properties Object Lists the properties key-value pairs with the timestamps. For more information on properties, see Understanding properties.
data Object Opaque data store object.
createdBy String The email address of the user who created the thing.
createdOn String The date and time that the thing was created.
updatedBy String The email address of the user or the key of the thing that last modified the thing.
updatedOn String The date and time that the thing was updated.
connected Bool Is the thing currently connected.
connectedId String If this thing is bound to (or connected via) another thing (a proxy, for example), this field is returned with the ID of the parent thing.
connectedKey String If this thing is bound to (or connected via) another thing (a proxy, for example), this field is returned with the key of the parent thing.
appId String If the appId of the thing has been set.
smsc String The SMSC to use when sending SMS messages to the thing.
apiCounts.daily Integer The number of API calls by this Thing for the current day (estimate).
apiCounts.monthToDate Integer The number of API calls by this Thing since the beginning of the current month.
apiCounts.total Integer The number of API calls by this Thing since the beginning of time.
Thing API counts are updated hourly and are based on the aggregated API commands sent via MQTT and HTTP.

PHP API

mixed TR50httpWorker::thingFind($key);