SmartThings API: Listing location mode

I am using the below link to find all the possible API I can use for SmartThings.

https://smartthings.developer.samsung.com/docs/api-ref/st-api.html#operation/listLocations

I wanted to create a new API rule that is based on the value of location mode. I can get list of my location id and device id but I can’t find the API to list all my location modes.

Does anyone know what is the API to list the location mode?

Thanks in advance.

Have you tried this?

https://api.smartthings.com/v1/locations/{locationId}/modes

You also need the proper scopes on your token (modes)

And for the active one …

https://api.smartthings.com/v1/locations/{locationId}/modes/current

Thanks. Got the values using your URL.

1 Like

THANK YOU!
I had the same question. I do not find this specified in the API anywhere. Does anyone know where the modes and modes/current are documented?
The URL provided above works great, but I fear I am missing out on better API documentation than what I am using at https://smartthings.developer.samsung.com/docs/api-ref/st-api.html.

I’m not aware of any docs per se, but the Core SDK has to interact with the API and there can be some useful comments in the ‘endpoints’ bits, and the code itself can hint at missing docs.

I just went looking for this as well. It’s frustrating that this isn’t documented in the API documentation. We shouldn’t have to search the forum or even the actual code to find things like this. Can someone please update the documentation to include these additional endpoints?