ImSmart Web API

The ImSmart Web API is intended to help you connect other systems to ImSmart.

In the examples below, replace {userKey}, {variableKey}, {triggerKey} and {actionKey} with the appropriate value. Get the URLs by clicking the Operations button besides a variable or trigger on your Variables and Triggers page.

Variables operations

Get value

To get the value of one of your variable, call
https://www.imsmart.tech/API/Values/{userKey}/{variableKey}/GetValue/
or
https://www.imsmart.tech/API/Values/{userKey}/{variableKey}/GetValue/xml
Optionally, to get result in JSON format, you can call
https://www.imsmart.tech/API/Values/{userKey}/{variableKey}/GetValue/json

Set value (Numeric, String)

To set the value of one of your variable, call
https://www.imsmart.tech/API/Values/{userKey}/{variableKey}/SetValue/{value}/
e.g.
https://www.imsmart.tech/API/Values/42151eaf15b3/b40e630533fd/SetValue/50.25/

Set value to True (Boolean)

To set the value of one of your boolean variable to True, call
https://www.imsmart.tech/API/Values/{userKey}/{variableKey}/SetTrue/
e.g.
https://www.imsmart.tech/API/Values/42151eaf15b3/b40e630533fe/SetTrue/

Set value to False (Boolean)

To set the value of one of your boolean variable to False, call
https://www.imsmart.tech/API/Values/{userKey}/{variableKey}/SetFalse/
e.g.
https://www.imsmart.tech/API/Values/42151eaf15b3/b40e630533fe/SetFalse/

Toggle boolean value (Boolean)

To update the value of a boolean variable from True to False or vice versa, call
https://www.imsmart.tech/API/Values/{userKey}/{variableKey}/Toggle/
e.g.
https://www.imsmart.tech/API/Values/42151eaf15b3/b40e630533fe/Toggle/

Increment value (Numeric)

To increment the value of a numeric variable, call
https://www.imsmart.tech/API/Values/{userKey}/{variableKey}/Increment/
or
https://www.imsmart.tech/API/Values/{userKey}/{variableKey}/Increment/{value}
e.g.
https://www.imsmart.tech/API/Values/42151eaf15b3/b40e630533fe/Increment/
https://www.imsmart.tech/API/Values/42151eaf15b3/b40e630533fe/Increment/5/

Decrement value (Numeric)

To decrement the value of a numeric variable, call
https://www.imsmart.tech/API/Values/{userKey}/{variableKey}/Decrement/
or
https://www.imsmart.tech/API/Values/{userKey}/{variableKey}/Decrement/{value}
e.g.
https://www.imsmart.tech/API/Values/42151eaf15b3/b40e630533fe/Decrement/
https://www.imsmart.tech/API/Values/42151eaf15b3/b40e630533fe/Decrement/5/

Trigger operations

Evaluate trigger

If you need to manually execute the evaluation of a trigger, call
https://www.imsmart.tech/API/Triggers/{userKey}/{triggerKey}/Evaluate/
e.g.
https://www.imsmart.tech/API/Values/42151eaf15b3/b40e630533ff/Evaluate/

Cancel event

An event is a delayed trigger action. If you need to cancel an event that has been scheduled, call
https://www.imsmart.tech/API/Triggers/{userKey}/{actionKey}/Cancel/
      will cancel all scheduled events.
https://www.imsmart.tech/API/Triggers/{userKey}/{actionKey}/Cancel/N/
      will cancel next N scheduled events, i.e. the next ones that would be executed.
https://www.imsmart.tech/API/Triggers/{userKey}/{actionKey}/Cancel/-N/
      will cancel last N scheduled events, i.e. the last ones that would be executed.
e.g.
https://www.imsmart.tech/API/Values/42151eaf15b3/b40e630533aa/Cancel/
https://www.imsmart.tech/API/Values/42151eaf15b3/b40e630533aa/Cancel/5
https://www.imsmart.tech/API/Values/42151eaf15b3/b40e630533aa/Cancel/-5