# Issue: no temperature value in API

**URL:** <https://community.smartthings.com/t/issue-no-temperature-value-in-api/267468>\
**Category:** Rules API\
**Tags:** api\
**Created:** [July 29, 2023, 9:34pm UTC](https://community.smartthings.com/t/issue-no-temperature-value-in-api/267468 "2023-07-29T21:34:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Armin](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@Armin](https://community.smartthings.com/u/Armin)\
**Post date:** [July 29, 2023, 9:34pm UTC](https://community.smartthings.com/t/issue-no-temperature-value-in-api/267468/1 "2023-07-29T21:34:28Z")

</div>

Hi,

I am trying to send a request to the API for getting the temperature value.

I read the [API](https://developer.smartthings.com/docs/api/public/) documentation and sent the GET request to my temperature sensor using:  
[https://api.smartthings.com/v1/devices/device\_ID](https://api.smartthings.com/v1/devices/device_ID)

In the received json, there is no value for the temperature sensor:

```auto
{
    "deviceId": "",
    "name": "temperature1",
    "label": "temperature1",
    "manufacturerName": "SmartThingsCommunity",
    "presentationId": "",
    "locationId": "",
    "components": [
        {
            "id": "main",
            "label": "main",
            "capabilities": [
                {
                    "id": "temperatureMeasurement",
                    "version": 1
                }
            ],
            "categories": [
                {
                    "name": "TempSensor",
                    "categoryType": "manufacturer"
                }
            ]
        }
    ],
    "createTime": "",
    "profile": {
        "id": ""
    },
    "virtual": {
        "name": "temperature1",
        "executingLocally": false
    },
    "type": "VIRTUAL",
    "restrictionTier": 0,
    "allowed": null
}

```

What is the solution?

Thanks

---

<div class="post-metadata">

**Author:** ![h0ckeysk8er](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/h0ckeysk8er/32/195141_2.png) [@h0ckeysk8er](https://community.smartthings.com/u/h0ckeysk8er)\
**Post date:** [July 30, 2023, 5:57am UTC](https://community.smartthings.com/t/issue-no-temperature-value-in-api/267468/2 "2023-07-30T05:57:31Z")

</div>

> [@Armin](#):
>
> I am trying to send a request to the API for getting the temperature value.
> 
> I read the [API](https://developer.smartthings.com/docs/api/public/) documentation and sent the GET request to my temperature sensor using:  
> [https://api.smartthings.com/v1/devices/device\_ID](https://api.smartthings.com/v1/devices/device_ID)
> 
> In the received json, there is no value for the temperature sensor:

Depends on the capabilities defined in the driver. I’d want to see that info from either the ST CLI or the community developed API Browser+.

---

<div class="post-metadata">

**Author:** ![TapioX](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@TapioX](https://community.smartthings.com/u/TapioX)\
**Post date:** [July 30, 2023, 7:08am UTC](https://community.smartthings.com/t/issue-no-temperature-value-in-api/267468/3 "2023-07-30T07:08:18Z")

</div>

> [@Armin](#):
>
> sent the GET request to my temperature sensor using:  
> [https://api.smartthings.com/v1/devices/device\_ID](https://api.smartthings.com/v1/devices/device_ID)

Try this request  
_[https://api.smartthings.com/v1/devices/device\_ID/components/main/capabilities/temperatureMeasurement/status](https://api.smartthings.com/v1/devices/device_ID/components/main/capabilities/temperatureMeasurement/status)_

---

<div class="post-metadata">

**Author:** ![nayelyz](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nayelyz](https://community.smartthings.com/u/nayelyz)\
**Post date:** [July 31, 2023, 6:20pm UTC](https://community.smartthings.com/t/issue-no-temperature-value-in-api/267468/4 "2023-07-31T18:20:43Z")

</div>

Welcome to the SmartThings Community, @Armin!

In the documentation, you can see a section that says [“Get full status of a device”](https://developer.smartthings.com/docs/api/public/#operation/getDeviceStatus), that one is used to get the current value of all the capabilities included for your device.

However, you can also get the status of the following:

1. [All capabilities in a single component](https://developer.smartthings.com/docs/api/public/#operation/getDeviceComponentStatus)
2. [A single capability](https://developer.smartthings.com/docs/api/public/#operation/getDeviceStatusByCapability). This is the one shared above

> Note: If a device has a single endpoint physically, it only includes one component on ST and is called “main” by default.  
> If it has more than one, like a 2 or 3 gang switch, the “main” component will still be present but it’ll depend on the developer of the integration the name of the others. You can see them when you call `devices/device_ID`
