Redis Query Action
Run Redis query completely serverless via Thingsup IoT Platform. Insert or get data from Redis with simple MQTT rules engine or HTTP APIs.
This provides a way to run Redis Query. Before adding Redis Query Action, user has to define a Redis Connection. User need to provide following parameters to add Redis Query Action.

Command

User need to provide a Redis Command in Lowercase. Find Redis Commands.

Function

  • User can write JavaScript code to create dynamic Redis query.
  • Here the "payload" object and params Array objects available in this code which are directly executed on Redis Connection along with supplied command.
  • "payload" object is supplied from Action Trigger like Rules, Action Command etc.
1
//Example 1
2
3
params.push(payload.key);
4
5
//Command is hgetall
Copied!
1
//Example 2
2
3
params.push("getname"); //to get name of current connection
4
params.push("list"); // to get the list of client connections to the server
5
6
//Command is client
Copied!

Connection ID

User need to provide a Connection ID of Redis database connection.
Add Redis Query Action
Please note the following points:
  • "payload" object is supplied from Action Trigger like Rules, Action Command etc.
  • Data Response of Redis query will be available as Action Response.
Last modified 1yr ago
Copy link