//[[restapi:start|RESTful API]]// ====== The RULE Parameter ====== Some methods allows you to use the **//{rules}//** parameter, this special parameter allows you to easily extend a method's functionality. ===== Available Rules ===== ^ Rule ^ Type ^ Value ^ Description ^ | Starts | STARTS | Date | Check if the value of the Date already occurred. The Date is in milliseconds | | Ends | ENDS | Date | Check if the value of the Date is not occurred yet. The Date is in milliseconds | | Schedule | SCHEDULE | String | The String is composed of two hours separated by a ",". And Check if the actual date is between this two hours. | | Not Schedule | !SCHEDULE | String | The String is composed of two hours separated by a ",". And Check if the actual date is not between this two hours. | | Spam | SPAM | Time | Check the difference between the actual date and the date of the last event of one device in a region. If the Time is higher than the difference then don't send a notification. The time is in minutes. | ===== Example ===== You can add one or more of our predefined rule's set, for example: SPAM:5;!SCHEDULE:Mon,Wed,Thu,Sat,0000,2400;STARTS:1422285600000;ENDS:1422458400000 **Detail:** ^ Rule Step ^ Explanation ^ | !SCHEDULE:Mon,Wed,Thu,Sat,0000,2400 | This means that you action could not be triggered either Monday, Wednesday, Thursday or Saturday at any time of the day | | STARTS:1422285600000 | It will start 1422285600000 milliseconds after January 1, 1970, 00:00:00 GMT | | ENDS:1422458400000 | It will ends 1422458400000 milliseconds after January 1, 1970, 00:00:00 GMT | | SPAM:5 | Will not be fired again if hasn't happened 5 minutes since the last time |