Read a Thing

With this method, you can read the generic fields and the thing type associated with the specified thing.

Request

URI:/Things('<ID>')

HTTP Method:GET

Permissions:

<thing>.r

Request Header Parameters

Parameter Required Description
Accept-Language No Language of the thing description. The default language is EN.
Accept-Encoding No Retrieve compressed response

Only if you specify the value gzip or gzip,deflate for this parameter, the system returns the compressed response with an additional response header CONTENT-ENCODING with value gzip. If you specify an invalid value or do not use this header parameter, the system returns the uncompressed response.

Request Parameter

Parameter Required Data Type Description
ID Yes string

You can specify one of the following values:

  • Unique thing identifier generated by the system while creating a thing.

  • Alternate thing identifier which is unique only within a specific tenant.

Request Example

/Things('503B8711B5D0445688E7FF7ACFC2177A')

The below request will get the thing and its assignment details.

{
  "_id": "92B98497566F48E4A0867569941F9CF1",
  "_externalId": "Demo-Cooler-Thing-01",
  "_name": "Demo-Cooler-Thing-01",
  "_description": {
    "en": "Demo Cooler"
  },
  "_thingType": [
    "iotae.sandboxhdibd1.conv.services.demo.package:CoolerType"
  ],
  "CreatedByUser": "testuser",
  "CreatedTime": "2019-02-07T06:10:41.899Z",
  "LastChangedByUser": "testuser",
  "LastChangedTime": "2019-02-07T06:10:41.899Z",
  "_assignment": {
    "_id": "79721DA29EAA41A6ACACEC7920F9A9D5",
    "_devices": [
      {
        "_id": "174",
        "_name": "DemoCooler",
       "_alternateId": "101",
        "_gatewayName": "3”,
        "_sensors": [
          {
            "_id": "733",
            "_name": "ConvPressureSensor",
           "_alternateId" : "201",
            "_sensorTypeId": "5e70f20b-c0cb-4146-8c8b-eeae96a86f01",
            "_operation": null
          },
          {
            "_id": "734",
            "_name": "ConvReedSensor",
             "_alternateId" : "202",
            "_sensorTypeId": "0b0aa063-3ddc-4920-8a8a-50744b4676d5",
            "_operation": null
          },
          {
            "_id": "732",
            "_name": "ConvCoolerSensor",
            "_alternateId" : "203",
            "_sensorTypeId": "3376ab0a-34b2-4c46-877b-3d76f676d77f",
            "_operation": null
          }
        ]
      }
    ],
    "_mappingId": "b807fece-b5b9-44ed-a7b4-4daffba5a691"
  },
  "_objectGroup": "C18E47BEEF1D41149BB3AFFEB38BF66B"
}

Response

Format: JSON

Response Properties

Property Type Description
_id string Unique thing identifier generated by the system while creating a thing.
_externalId string Thing identifier from an external system.
_alternateId string Thing identifier which is unique only within a specific tenant.
_name string Name of the thing.
_description string Description of a thing in a specified language.
_thingType Array of thing types Array of thing types for the thing.
_location string Identifier for the location.
_customer string Identifier for the business partner.
_objectGroup string Object group ID for which the Thing has to be assigned to.

Response Status and Error Codes

Code Description

200

Thing retrieved successfully

Payload

Format: JSON

Only media type JSON is supported. The JSON for this method has the following structure:

{
	"_id": "503B8711B5D0445688E7FF7ACFC2177A",
	"_externalId": "ABCXSeries001",
	"_name": "ABCXSeries",
	"_description": {
		"en": "Car Model ABC  xSeries 001"
	},
	"_thingType": [
		"core.automobiles:ABCXSeries"
	],
	"_location": "BD622E3DA6A14C4D87CDEC935B000001",
	"_customer": "4D622E3DA6A14C4D87CDEC935B000001",
	"_objectGroup": "473BB1AFC4A4415791543C3F2CFDD295",
	"CreatedByUser": "abc@xyz.com",
	"CreatedTime": "2018-09-04T11:42:14.662Z",
	"LastChangedByUser": "abc@xyz.com",
	"LastChangedTime": "2018-09-04T11:42:14.662Z"
}

If you assigned an alternate thing ID while creating a thing, the response payload contains the _alternateId field.

{
	"_id": "503B8711B5D0445688E7FF7ACFC2177A",
	"_externalId": "ABCXSeries001",
	"_alternateId": "ABCXSeries001-alternateId",
	"_name": "ABCXSeries",
	"_description": {
		"en": "Car Model ABC  xSeries 001"
	},
	"_thingType": [
		"core.automobiles:ABCXSeries"
	],
	"_location": "BD622E3DA6A14C4D87CDEC935B000001",
	"_customer": "4D622E3DA6A14C4D87CDEC935B000001",
	"_objectGroup": "473BB1AFC4A4415791543C3F2CFDD295",
	"CreatedByUser": "abc@xyz.com",
	"CreatedTime": "2018-09-04T11:42:14.662Z",
	"LastChangedByUser": "abc@xyz.com",
	"LastChangedTime": "2018-09-04T11:42:14.662Z"

}