ByteChef LogoByteChef

Redis

Redis is an open-source, in-memory data structure store used as a database, cache, message broker, and streaming engine.

Categories: Developer Tools

Type: redis/v1


Connections

Version: 1

custom

Properties

NameLabelTypeDescriptionRequired
hostHostSTRINGThe Redis server hostname or IP address.true
portPortINTEGERThe Redis server port.true
passwordPasswordSTRINGThe password for Redis authentication. Leave empty if no authentication.false
databaseDatabaseINTEGERThe Redis database index (0-15).false

Actions

Delete

Name: delete

Deletes a key from Redis.

Properties

NameLabelTypeDescriptionRequired
keyKeySTRINGThe key to delete.true

Example JSON Structure

{
  "label" : "Delete",
  "name" : "delete",
  "parameters" : {
    "key" : ""
  },
  "type" : "redis/v1/delete"
}

Output

Type: BOOLEAN

Get

Name: get

Gets the value of a key from Redis.

Properties

NameLabelTypeDescriptionRequired
keyKeySTRINGThe key to retrieve.true

Example JSON Structure

{
  "label" : "Get",
  "name" : "get",
  "parameters" : {
    "key" : ""
  },
  "type" : "redis/v1/get"
}

Output

Type: STRING

Increment

Name: increment

Atomically increments a key by 1. Creates the key with value 1 if it does not exist.

Properties

NameLabelTypeDescriptionRequired
keyKeySTRINGThe key to increment.true
expireExpireBOOLEAN
Options true, false
Whether to set an expiration time on the key.false
ttlTTL (seconds)INTEGERTime to live in seconds. Only used when Expire is true.false

Example JSON Structure

{
  "label" : "Increment",
  "name" : "increment",
  "parameters" : {
    "key" : "",
    "expire" : false,
    "ttl" : 1
  },
  "type" : "redis/v1/increment"
}

Output

Type: INTEGER

Info

Name: info

Returns information and statistics about the Redis server.

Example JSON Structure

{
  "label" : "Info",
  "name" : "info",
  "type" : "redis/v1/info"
}

Output

Type: OBJECT

Keys

Name: keys

Returns all keys matching a pattern.

Properties

NameLabelTypeDescriptionRequired
keyPatternKey PatternSTRINGThe pattern to match keys against (e.g., 'user:*', 'session').true

Example JSON Structure

{
  "label" : "Keys",
  "name" : "keys",
  "parameters" : {
    "keyPattern" : ""
  },
  "type" : "redis/v1/keys"
}

Output

Type: ARRAY

Items Type: STRING

Output Example

[ "" ]

List Length

Name: listLength

Returns the length of a Redis list.

Properties

NameLabelTypeDescriptionRequired
listListSTRINGThe name of the list.true

Example JSON Structure

{
  "label" : "List Length",
  "name" : "listLength",
  "parameters" : {
    "list" : ""
  },
  "type" : "redis/v1/listLength"
}

Output

Type: INTEGER

Pop

Name: pop

Pops data from a Redis list.

Properties

NameLabelTypeDescriptionRequired
listListSTRINGThe name of the list.true
fromTailPop from TailBOOLEAN
Options true, false
If true, pops from the end of the list. If false, pops from the beginning.false

Example JSON Structure

{
  "label" : "Pop",
  "name" : "pop",
  "parameters" : {
    "list" : "",
    "fromTail" : false
  },
  "type" : "redis/v1/pop"
}

Output

Type: STRING

Publish

Name: publish

Publishes a message to a Redis channel.

Properties

NameLabelTypeDescriptionRequired
channelChannelSTRINGThe channel to publish the message to.true
messageMessageSTRINGThe message to publish.true

Example JSON Structure

{
  "label" : "Publish",
  "name" : "publish",
  "parameters" : {
    "channel" : "",
    "message" : ""
  },
  "type" : "redis/v1/publish"
}

Output

Type: INTEGER

Push

Name: push

Pushes data to a Redis list.

Properties

NameLabelTypeDescriptionRequired
listListSTRINGThe name of the list.true
valueValueSTRINGThe value to push to the list.true
fromTailPush to TailBOOLEAN
Options true, false
If true, pushes to the end of the list. If false, pushes to the beginning.false

Example JSON Structure

{
  "label" : "Push",
  "name" : "push",
  "parameters" : {
    "list" : "",
    "value" : "",
    "fromTail" : false
  },
  "type" : "redis/v1/push"
}

Output

Type: INTEGER

Set

Name: set

Sets the value of a key in Redis.

Properties

NameLabelTypeDescriptionRequired
keyKeySTRINGThe key to set.true
valueValueSTRINGThe value to store.true
expireExpireBOOLEAN
Options true, false
Whether to set an expiration time on the key.false
ttlTTL (seconds)INTEGERTime to live in seconds. Only used when Expire is true.false

Example JSON Structure

{
  "label" : "Set",
  "name" : "set",
  "parameters" : {
    "key" : "",
    "value" : "",
    "expire" : false,
    "ttl" : 1
  },
  "type" : "redis/v1/set"
}

Output

Type: BOOLEAN

How is this guide?

Last updated on

On this page