> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.labelstud.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.labelstud.io/_mcp/server.

# Update import storage

PATCH http://localhost:8000/api/storages/redis/{id}
Content-Type: application/json

Update a specific Redis import storage connection.

Reference: https://api.labelstud.io/api-reference/api-reference/import-storage/redis/update

## Authentication

- `Authorization` header (required) (prefixed with ` Token   `) — The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: curl [https://label-studio-host/api/projects](https://label-studio-host/api/projects) -H "Authorization: Token \[your-token]"

## Request

### Path parameters

- `id` (integer, required)

### Body (application/json)

This endpoint expects a PatchedRedisImportStorageWriteRequest.

- `db` (integer, optional) — Server Database
- `description` (string, optional, nullable) — Cloud storage description
- `host` (string, optional, nullable) — Server Host IP (optional)
- `password` (string, optional, nullable) — Server Password (optional)
- `path` (string, optional, nullable) — Storage prefix (optional)
- `port` (string, optional, nullable) — Server Port (optional)
- `project` (integer, optional) — A unique integer value identifying this project.
- `regex_filter` (string, optional, nullable) — Cloud storage regex for filtering objects
- `synchronizable` (boolean, optional, default: true)
- `title` (string, optional, nullable) — Cloud storage title
- `use_blob_urls` (boolean, optional) — Interpret objects as BLOBs and generate URLs

## Response

### 200

- `created_at` (datetime, required) — Creation time
- `id` (integer, required)
- `project` (integer, required) — A unique integer value identifying this project.
- `type` (string, required, default: redis)
- `db` (integer, optional) — Server Database
- `description` (string, optional, nullable) — Cloud storage description
- `host` (string, optional, nullable) — Server Host IP (optional)
- `last_sync` (datetime, optional, nullable) — Last sync finished time
- `last_sync_count` (integer, optional, nullable) — Count of tasks synced last time
- `last_sync_job` (string, optional, nullable) — Last sync job ID
- `meta` (any, optional, nullable) — Meta and debug information about storage processes
- `password` (string, optional, nullable) — Server Password (optional)
- `path` (string, optional, nullable) — Storage prefix (optional)
- `port` (string, optional, nullable) — Server Port (optional)
- `regex_filter` (string, optional, nullable) — Cloud storage regex for filtering objects
- `status` (enum, optional) — * `initialized` - Initialized * `queued` - Queued * `in_progress` - In progress * `failed` - Failed * `completed` - Completed * `completed_with_errors` - Completed with errors
  - Allowed values: `initialized`, `queued`, `in_progress`, `failed`, `completed`, `completed_with_errors`
- `synchronizable` (boolean, optional, default: true)
- `title` (string, optional, nullable) — Cloud storage title
- `traceback` (string, optional, nullable) — Traceback report for the last failed sync
- `use_blob_urls` (boolean, optional) — Interpret objects as BLOBs and generate URLs

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "created_at": "2024-01-15T09:30:00Z",
  "id": 1,
  "project": 1,
  "type": "redis",
  "db": 1,
  "description": "string",
  "host": "string",
  "last_sync": "2024-01-15T09:30:00Z",
  "last_sync_count": 1,
  "last_sync_job": "string",
  "meta": null,
  "password": "string",
  "path": "string",
  "port": "string",
  "regex_filter": "string",
  "status": "initialized",
  "synchronizable": true,
  "title": "string",
  "traceback": "string",
  "use_blob_urls": true
}
```

**SDK Code**

```python
import requests

url = "http://localhost:8000/api/storages/redis/1"

payload = {}
headers = {
    "Authorization": "Token  <api_key>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'http://localhost:8000/api/storages/redis/1';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Token  <api_key>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8000/api/storages/redis/1"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Token  <api_key>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("http://localhost:8000/api/storages/redis/1")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Token  <api_key>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("http://localhost:8000/api/storages/redis/1")
  .header("Authorization", "Token  <api_key>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'http://localhost:8000/api/storages/redis/1', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Token  <api_key>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("http://localhost:8000/api/storages/redis/1");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Token  <api_key>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Token  <api_key>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8000/api/storages/redis/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```