# FAQ: Getting Started with the new Rules API

**URL:** <https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078>\
**Category:** Rules API\
**Created:** [January 16, 2020, 8:29pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078 "2020-01-16T20:29:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SmartThings](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/smartthings/32/198105_2.png) [@SmartThings](https://community.smartthings.com/u/SmartThings)\
**Post date:** [January 16, 2020, 8:29pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/1 "2020-01-16T20:29:59Z")

</div>

At [SDC19](https://www.samsungdeveloperconference.com/), we previewed our new Rules Grammar and API that allows you to create simple and complex automations that can operate on the SmartThings cloud. In a future release of the API, local execution of rules on SmartThings hubs will be supported - making rules a great choice for those looking to create fast, stable and secure automations. We are excited to announce a few resources available for everyone to start testing:

- [Introduction Video](https://www.youtube.com/watch?v=1aQX80kufJw)
- [Rules Documentation](https://developer.smartthings.com/docs/automations/getting-started-with-automations)
- [Testing App](https://glitch.com/@smartthings/rules-api) (use the _Show_ button)
- [Example Rules](https://github.com/SmartThingsCommunity/Rules-API-Hub)

We know you have will feedback and requests - we are working hard to add more features to the API (such as variables and expressions). Feel free to drop your ideas, questions, and comments here!

---

<div class="post-metadata">

**Author:** ![joelw135](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/joelw135/32/70639_2.png) [@joelw135](https://community.smartthings.com/u/joelw135)\
**Post date:** [January 16, 2020, 10:13pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/2 "2020-01-16T22:13:10Z")

</div>

I clicked on the link using both Chrome and Safari and it came to the page to authorize my Samsung account and it does nothing. Is it not working? OK got in using the top link.

---

<div class="post-metadata">

**Author:** ![Automated\_House](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/automated_house/32/99641_2.png) [@Automated\_House](https://community.smartthings.com/u/Automated_House)\
**Post date:** [January 16, 2020, 10:19pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/3 "2020-01-16T22:19:10Z")

</div>

welp, there goes my Thursday night…

---

<div class="post-metadata">

**Author:** ![rontalley](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@rontalley](https://community.smartthings.com/u/rontalley)\
**Post date:** [January 16, 2020, 10:31pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/4 "2020-01-16T22:31:52Z")

</div>

Great timing!

---

<div class="post-metadata">

**Author:** ![rontalley](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@rontalley](https://community.smartthings.com/u/rontalley)\
**Post date:** [January 16, 2020, 10:44pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/5 "2020-01-16T22:44:43Z")

</div>

Does each “Rule” count as an “App”? If the limit is 100 then how does this limit affect those people like me that have close to 300 devices? Say I only had 1 rule per device, then I would be screwed after the first 100 rules. 🤷🏾‍♂️

 ![image](https://global.discourse-cdn.com/smartthings/original/3X/8/d/8d4c0281c0b67a9e261dcf197f2231ee8ca05153.png)

---

<div class="post-metadata">

**Author:** ![erickv](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/erickv/32/230792_2.png) [@erickv](https://community.smartthings.com/u/erickv)\
**Post date:** [January 16, 2020, 11:39pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/6 "2020-01-16T23:39:41Z")

</div>

Hi, @rontalley

Rules are treated independently of _installed apps_, before the update the rules were available through the ST API as **behaviors** , but now you can browse, create and update them at the [Rules API](https://smartthings.developer.samsung.com/docs/api-ref/st-api.html#tag/rules).

**UPDATE**  
These are the Rate Limits for the **Rules API** to prevent runaway installs through the API. However, we’re evaluating the option of increasing such limit.

[![image](https://global.discourse-cdn.com/smartthings/original/3X/e/3/e33ccd3546b8fa52b75ef342103a574201cf7090.png)](https://smartthings.developer.samsung.com/docs/rate-limits.html#Event)

---

<div class="post-metadata">

**Author:** ![iquix](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/iquix/32/136495_2.png) [@iquix](https://community.smartthings.com/u/iquix)\
**Post date:** [January 17, 2020, 2:43am UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/7 "2020-01-17T02:43:01Z")

</div>

Will new webcore which uses rules API  
as previewed in [https://sdc.webcore.co](https://sdc.webcore.co) be available?

---

<div class="post-metadata">

**Author:** ![Automated\_House](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/automated_house/32/99641_2.png) [@Automated\_House](https://community.smartthings.com/u/Automated_House)\
**Post date:** [January 17, 2020, 4:04am UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/8 "2020-01-17T04:04:46Z")

</div>

What is ISA?

---

<div class="post-metadata">

**Author:** ![erickv](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/erickv/32/230792_2.png) [@erickv](https://community.smartthings.com/u/erickv)\
**Post date:** [January 17, 2020, 3:29pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/9 "2020-01-17T15:29:34Z")

</div>

Hi, @Automated_House

Refers to **installed smart app**.

@iquix, if it’s _installed/created_ following the Rules API Gramar, it will do. but as an external SmartApp, it should accomplish the SmartApp lifecycle syntax and then being created at the INSTALL lifecycle through the SmartThigs API.

---

<div class="post-metadata">

**Author:** ![kevin](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/kevin/32/142294_2.png) [@kevin](https://community.smartthings.com/u/kevin)\
**Post date:** [January 17, 2020, 3:30pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/10 "2020-01-17T15:30:45Z")

</div>

> [@SmartThings](#):
>
> [Testing App](https://glitch.com/@smartthings/rules-api) (

How does [glitch.com](http://glitch.com) play into all of this? Does it replace github? Does RulesAPI run on glitch?

---

<div class="post-metadata">

**Author:** ![joshua\_lyon](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/joshua_lyon/32/12655_2.png) [@joshua\_lyon](https://community.smartthings.com/u/joshua_lyon)\
**Post date:** [January 17, 2020, 4:00pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/11 "2020-01-17T16:00:02Z")

</div>

> [@kevin](#):
>
> How does [glitch.com](http://glitch.com) play into all of this? Does it replace github? Does RulesAPI run on glitch?

It’s just a neat way of delivering a live, working proof of concept that people can play with and also peek under the covers to see how it’s built.

The actual Rules API runs on the SmartThings platform. You can interface with the Rules API directly via the REST API. The ‘Example Rules Manager’ isn’t intended as a production, end-user facing tool - more of a proof of concept for developers to poke around with and better understand how things work.

Glitch is a neat choice for the ‘Example Rules Manager’ as it has some nice features like being able to run Node.js server-side code and maintain secrets like are necessary for the OAuth portion. It also makes it really easy for people to fork and play with the underlying code.

---

<div class="post-metadata">

**Author:** ![Automated\_House](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/automated_house/32/99641_2.png) [@Automated\_House](https://community.smartthings.com/u/Automated_House)\
**Post date:** [January 17, 2020, 4:02pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/12 "2020-01-17T16:02:13Z")

</div>

damn overly sensitive work firewall ☹  
 ![image](https://global.discourse-cdn.com/smartthings/original/3X/7/1/71ccd4363b88500d7a7689b80f4dff2ba1549c27.png)

@erickv did the behaviors API documentation dissapear? I don’t see it listed anymore  
[https://smartthings.developer.samsung.com/docs/api-ref/st-api.html#section/Overview](https://smartthings.developer.samsung.com/docs/api-ref/st-api.html#section/Overview)

---

<div class="post-metadata">

**Author:** ![kevin](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/kevin/32/142294_2.png) [@kevin](https://community.smartthings.com/u/kevin)\
**Post date:** [January 17, 2020, 4:08pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/13 "2020-01-17T16:08:35Z")

</div>

> [@Automated\_House](#):
>
> overly sensitive work firewall

Ya, mine just spins on loading project.

Also used wrong/old ST email address so I kind of hosed myself there too 🤦🏻‍♂️.

---

<div class="post-metadata">

**Author:** ![erickv](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/erickv/32/230792_2.png) [@erickv](https://community.smartthings.com/u/erickv)\
**Post date:** [January 17, 2020, 6:31pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/14 "2020-01-17T18:31:49Z")

</div>

Hi @Automated_House,

Basically the `/behaviors` URL has been updated to `/rules`.

Regarding the error message, you just opened the webpage?

**UPDATE**  
@Automated_House, @kevin try this url [https://glitch.com/~smartthings-rules-manager](https://glitch.com/~smartthings-rules-manager) instead

---

<div class="post-metadata">

**Author:** ![Automated\_House](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/automated_house/32/99641_2.png) [@Automated\_House](https://community.smartthings.com/u/Automated_House)\
**Post date:** [January 17, 2020, 7:06pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/15 "2020-01-17T19:06:40Z")

</div>

Looks like behaviors API still returns the values for the automation creator, and rules API does not. So they seem slightly different at this point.

---

<div class="post-metadata">

**Author:** ![erickv](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/erickv/32/230792_2.png) [@erickv](https://community.smartthings.com/u/erickv)\
**Post date:** [January 17, 2020, 8:08pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/16 "2020-01-17T20:08:48Z")

</div>

@Automated_House Do you mean that at the moment of posting the JSON rule to the Rules API you don’t receive a copy of the JSON rule with the id attached?

Behaviors are still working, so, at the moment you create a new rule, it will reflect at your behaviors list, it also works with the opposite process.

I’d recommend you to approach the Rules with Postman/Insomnia and a [Personal Access Token](https://account.smartthings.com/tokens). Then use the [SmartThings Rule Manager](https://glitch.com/~smartthings-rules-manager) to enhance your rules development.

---

<div class="post-metadata">

**Author:** ![cheung4485](https://avatars.discourse-cdn.com/v4/letter/c/ed655f/32.png) [@cheung4485](https://community.smartthings.com/u/cheung4485)\
**Post date:** [January 19, 2020, 6:45am UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/17 "2020-01-19T06:45:46Z")

</div>

Is there a difference between turning on a light upon motion by creating an automation versus

> <https://github.com/SmartThingsCommunity/Rules-API-Hub/blob/master/Sample%20JSON%20Rules/light_turn_on_motion.json>

They appear to be two different concepts but achieving the same result.

---

<div class="post-metadata">

**Author:** ![Automated\_House](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/automated_house/32/99641_2.png) [@Automated\_House](https://community.smartthings.com/u/Automated_House)\
**Post date:** [January 19, 2020, 10:27am UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/18 "2020-01-19T10:27:06Z")

</div>

@erickv is a GET using the Rules Manager Testing App supposed to return _all_ rules created via the Rules API, or only rules created with that specific testing app? I’m trying to remove one I created with the POC webCoRE from SDC.

---

<div class="post-metadata">

**Author:** ![erickv](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/erickv/32/230792_2.png) [@erickv](https://community.smartthings.com/u/erickv)\
**Post date:** [January 20, 2020, 3:22pm UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/19 "2020-01-20T15:22:30Z")

</div>

Hi, @Automated_House

At this time, the token issued is scoped as a testing app, therefore it can access just the rules created locally.

---

<div class="post-metadata">

**Author:** ![cheung4485](https://avatars.discourse-cdn.com/v4/letter/c/ed655f/32.png) [@cheung4485](https://community.smartthings.com/u/cheung4485)\
**Post date:** [January 21, 2020, 2:52am UTC](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078/20 "2020-01-21T02:52:24Z")

</div>

What’s the purpose of “Execute a rule”? After you have created a rule, isn’t the rule already taking effect? Or do you have to have it executed before it will take effect? If yes, how do you suspend a rule after it is taking effect? If no, can you give an example of when “Execute a rule” is used?

Thanks.

[Next page](https://community.smartthings.com/t/faq-getting-started-with-the-new-rules-api/184078.md?page=2)
