SmartThings API Browser+ ... Now Available to All

That’s what is under the bonnet of your Lights status tile on the Favourites page.

1 Like

UPDATE
Now visible as using the Virtual Switch driver.

2 Likes

That’s what I needed, thanks.

hey all, is the ST API Browser still functioning? i kept getting 403 errors when inputting the generated token. thanks

It’s working fine for me…

hmmph, seems to work now for me as well. them damn solar flares always gumming up the works.

1 Like

Let me know if you experience any other problems. Definitely should be up and available.

2 Likes

thanks @TAustin so im new to ST and automations, stumbled across this post while looking to understand Location Mode in the ST app.

With your API i created… Day mode. seems only simple enough to do. hehe. not sure what Day mode is going to provide me, but seems like it fits the model. if i may ask a newb question, what is this API intended for? in laymans terms plz. thanks !

This thread is about a community-created Web browser page that displays the information in your SmartThings account. Like your devices, your routines, etc.

It gets that information by using cloud access to the SmartThings API, an official feature.

Discussion of that official feature and “what it’s intended for” would be off topic here. So why don’t you start a new thread in the following section of the forum.? I’m sure people would be happy to go into the API details with you there.

But the shortest answer is that the API is a publicly available way of accessing a SmartThings account via the SmartThings cloud. (Look in the lower left of the cloud in the official schema.)

As far as modes, see the following FAQ. It’s old, but still valid.

FAQ: Armed/Disarmed states vs Away/Home modes confusion

They are still missing the ability to create/import rules (JSON), so I am still using API Browser+ for the time being. Thanks for your hard work, much appreciated!

6 Likes

I was trying to disable a JSON rule but the disable button doesn’t seem to work. I noticed this mentioned earlier but couldn’t find a solution. Unfortunately, the Smartthings version doesn’t list these rules. Any thoughts? Thanks.

@nayelyz or @orangebucket - I may need your help on this one. I used to be able to enable or disable a rule with this API:

https://api.smartthings.com/v1/rules/<ruleId>/status/disable?locationId=<locationId>

I know it wasn’t a documented endpoint, and it used to work, but no longer does. Do you know of an alternative?

2 Likes

I seem to remember that was actually documented on Postman. Not everything documented on Postman actually works but that did.

When I try it I get:

{
    "requestId": "3028371907401278509",
    "error": {
        "code": "UnexpectedError",
        "message": "Failure: get-installed-app-by-id",
        "details": []
    }
}

Except for when I don’t. That looks more broken than wrong to me.

Curiously while mucking around I somehow successfully disabled a rule but I’ve no idea how.

So you don’t consistently see that error?

I was trying various things so I probably confused myself. I just got to the stage where I was expecting that error and got a different one implying the format was wrong.

Somewhere along the line the Rule I was working with got disabled and I’ve no idea how and I couldn’t enable it again.

The API does have form for giving errors even when things actually work so I probably should have been more methodical.

Hmm, I think I’ve found what I did. I used the ‘Client API’ which I wouldn’t have expected to work as the /rules endpoint in the Client API has only seemed to work with Routines previously.

https://client.smartthings.com/rules/<ruleId>/status/disable?locationId=<locationId>

It gave a 204 No Content error but did disable the rule, and I could enable it again.

In contrast, simply trying to read the same rule in the Client API gave an internal error with the wonderful error message “behaviors-alliance-proxy-fail”.

It feels like something is going on behind the scenes to better accommodate the effective merger of Routines/Scenes in the client apps, and those of us using the public API are suffering collateral damage. I have no particular reason to think this other than it being preferable to thinking the ‘behaviours’ have indeed formed an alliance and are rebelling.

2 Likes

I knew you’d find an answer! Everything is subject to change, but if it works for now, I’ll take it!

Anything in the 2xx range is not really considered an error, so as far I’m concerned that’s success.

Thanks for your help

1 Like

Hi, @TAustin.
Sorry for the delay, I asked the engineering team about this.
They confirmed the endpoint was only present in the client API, however, as it is not recommended to use it, they created a request to add it in the public API, once we get more info about that, we’ll let you know.

4 Likes

Thanks for the follow-up!

This is fixed…for now. The API endpoint I’m using isn’t officially supported, so I may have to adjust this again in the future.

2 Likes