So, I’m just trying to turn a virtual switch on/off via an HTTP rest call. I don’t know why this is so frickin’ difficult, and I can’t find a clear code example. I’ve been using PostMan and going with SmartThings documentation and just keep getting request malformed errors. I’m really hoping someone can just show me a working example URL call so I can alter it for my needs.
You can see this document to check the request structure to execute a command. If you are using postman, you need to configure the Bearer Token in the “authorization” tab and the command in the “body” tab in JSON format (see the pictures below).
The URL is: https://api.smartthings.com/v1/devices/{deviceId}/commands
This doesn’t exist. You’re wanting a single URL which includes the API endpoint, the authorization, and payload. Can you elaborate on how you intend to use the URL?
I am just simply trying to get a piston to execute via a URL commend submitted by my INSTEON system. I found out I can do this via webCore, so I’m good doing it that way.