NotAcceptableError using Postman

Noob here. Go easy on me.

I’m trying to test API calls in Postman. It works fine when I GET the following paths:
/devices
/devices/{id}
/devices/{id}/state

However, when I try to do /devices/{id}/components, I get the following:

{
    "requestId": "B9E52180-2F01-4E51-87D7-C4126F076D7D",
    "error": {
        "code": "NotAcceptableError",
        "message": "Not acceptable according to the Accept headers.",
        "details": []
    }
}

For the call’s Accept header, I’ve tried:
application/json
text/html
text/plain
*/*
The response is Content-Type →application/json

Any ideas what I can do?

1 Like

I’m sure you’ve figured this out by now, but I came here because I was getting the same thing, and it turns out I was just missing part of the request (v1/devices/{deviceId}/components requires more path elements as below).

https://api.smartthings.com/v1/devices/{deviceId}/components/main/capabilities/switch/status

A 406 error is inaccurate and unhelpful – it should be sending a 400.

1 Like

Expanding upon Jason’s example more specifically it should look like this:

https://api.smartthings.com/v1/devices/{deviceId}/components/{componentId}/capabilities/{capabilityId}/status

componentId is usually main