---
title: Redis
slug: connectors/redis
docTags: 
createdAt: 2026-06-09T16:29:39.411Z
---

The Redis Connector integrates with Swimlane Turbine to get and set the key values in Redis Platform.

## Prerequisites

This connector requires the below parameters to authenticate:

- Host - Hostname or IP of Redis server
- Port (Default is 6379)
- Database - Database number to use (Default: 0)
- Password -  If Redis requires authentication.
- Socket Timeout
- Socket Connect Timeout
- Socket Keep Alive
- Socket Keep Alive Options
- Unix Socket Path
- Encoding
- Encoding Errors
- Retry On Timeout
- Decode Responses
- Retry On Error
- SSL
  *... and so on*

## Capabilities

This connector provides the following capabilities:

- Get - Get a key
- Set - Set a key

### Notes

[Redis API Documentation](https://redis-py.readthedocs.io/en/latest/commands.html#redis.commands.core.CoreCommands.get)

# Configurations

## Asset

Authenticates Redis using Host, Port and Database.

### Configuration Parameters

| **Parameter**              | **Description**                              | **Type** | **Required** |
| -------------------------- | -------------------------------------------- | -------- | ------------ |
| host                       | Hostname or IP address of the Redis instance | string   | Required     |
| port                       | Redis Port                                   | number   | Required     |
| database                   | Database number to use                       | number   | Required     |
| password                   | Password if authentication required          | string   | Optional     |
| socket\_timeout            | Socket Timeout                               | number   | Optional     |
| socket\_connect\_timeout   | Socket Connect Timeout                       | number   | Optional     |
| socket\_keepalive          | Socket Keep Alive                            | boolean  | Optional     |
| socket\_keepalive\_options | Socket Keep Alive Options                    | array    | Optional     |
| unix\_socket\_path         | Unix Socket Path                             | string   | Optional     |
| encoding                   | Encoding                                     | string   | Optional     |
| encoding\_errors           | Encoding Errors                              | string   | Optional     |
| retry\_on\_timeout         | Retry on Timeout                             | boolean  | Optional     |
| decode\_responses          | Decode Responses                             | boolean  | Optional     |
| retry\_on\_error           | Retry On Error                               | array    | Optional     |
| ssl                        | SSL                                          | boolean  | Optional     |
| ssl\_keyfile               | SSL Key File                                 | string   | Optional     |
| ssl\_certfile              | SSL Certfile                                 | string   | Optional     |
| ssl\_cert\_reqs            | SSL Cert Reqs                                | string   | Optional     |
| ssl\_ca\_certs             | SSL CA Certs                                 | string   | Optional     |
| ssl\_ca\_path              | SSL CA Path                                  | string   | Optional     |
| ssl\_ca\_data              | SSL CA Data                                  | string   | Optional     |
| ssl\_check\_hostname       | SSL Check Hostname                           | boolean  | Optional     |
| ssl\_password              | SSL Password                                 | string   | Optional     |
| ssl\_validate\_ocsp        | SSL Validate OCSP                            | boolean  | Optional     |
| ssl\_ocsp\_context         | SSL OCSP Context                             | string   | Optional     |
| ssl\_ocsp\_expected\_cert  | SSL OCSP Expected Cert                       | string   | Optional     |
| max\_connections           | Max Connections                              | number   | Optional     |
| single\_connection\_client | Single Connection Client                     | boolean  | Optional     |
| health\_check\_interval    | Health Check Interval                        | number   | Optional     |
| client\_name               | Client Name                                  | string   | Optional     |
| lib\_name                  | Lib Name                                     | string   | Optional     |
| lib\_version               | Lib Version                                  | string   | Optional     |
| cache\_enabled             | Cache Enabled                                | boolean  | Optional     |
| cache\_max\_size           | Cache Max Size                               | number   | Optional     |
| cache\_ttl                 | Cache TTL                                    | number   | Optional     |
| cache\_policy              | Cache Poicy                                  | string   | Optional     |
| cache\_blacklist           | Cache Blacklist                              | array    | Optional     |
| cache\_whitelist           | Cache Whitelist                              | array    | Optional     |
| verify\_ssl                | Verify SSL certificate                       | boolean  | Optional     |
| http\_proxy                | A proxy to route requests through.           | string   | Optional     |

# Actions

## Get

Return the value at key name, or None if the key doesn’t exist.

### Input

| **Argument Name** | **Type** | **Required** | **Description**   |
| ----------------- | -------- | ------------ | ----------------- |
| `key`             | string   | Required     | Parameter for Get |

### Input Example

`{"key":"string"}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `status`      | string   | Status value                     |

### Output Example

`{"status_code":200,"status":"OK","response_headers":{},"json_body":{}}`

## Set

Set the value at key name to value.

### Input

| **Argument Name** | **Type** | **Required** | **Description**                                                                                                       |
| ----------------- | -------- | ------------ | --------------------------------------------------------------------------------------------------------------------- |
| `key`             | string   | Optional     | Parameter for Set                                                                                                     |
| `value`           | string   | Optional     | Value for the parameter                                                                                               |
| `ex`              | number   | Optional     | Set the specified expire time, in seconds                                                                             |
| `px`              | number   | Optional     | Set the specified expire time, in milliseconds                                                                        |
| `nx`              | boolean  | Optional     | Only set the key if it does not already exist.                                                                        |
| `xx`              | boolean  | Optional     | Only set the key if it already exists.                                                                                |
| `keepttl`         | boolean  | Optional     | Keep Time to Live                                                                                                     |
| `get`             | boolean  | Optional     | if True, set the value at key name to value and return the old value stored at key, or None if the key did not exist. |
| `exat`            | array    | Optional     | sets an expire flag on key name for ex seconds, specified in unix time.                                               |
| `pxat`            | array    | Optional     | sets an expire flag on key name for ex milliseconds, specified in unix time.                                          |

### Input Example

`{"ex":0,"px":0,"nx":false,"xx":false}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `status`      | string   | Status value                     |

### Output Example

`{"status_code":200,"status":"OK","response_headers":{},"json_body":{}}`

# Response Headers

| **Header**   | **Description**                                       | **Example**                   |
| ------------ | ----------------------------------------------------- | ----------------------------- |
| Content-Type | The media type of the resource                        | application/json              |
| Date         | The date and time at which the message was originated | Thu, 01 Jan 2024 00:00:00 GMT |
