> ## Documentation Index
> Fetch the complete documentation index at: https://docs.horneross.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Actualizar datastore

> Actualizar la configuración de un datastore existente.

## Endpoint

```
PATCH /api/datastores/{datastoreId}
```

## Path Parameters

<ParamField path="datastoreId" type="string" required>
  ID del datastore a actualizar
</ParamField>

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token con tu API key. Formato: `Bearer sk_live_xxx`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Siempre `application/json`
</ParamField>

## Request Body

<ParamField body="name" type="string">
  Nuevo nombre
</ParamField>

<ParamField body="description" type="string">
  Nueva descripción
</ParamField>

<ParamField body="isPublic" type="boolean">
  Cambiar visibilidad
</ParamField>

<ParamField body="pluginName" type="string">
  Nuevo nombre de plugin
</ParamField>

<ParamField body="pluginDescriptionForHumans" type="string">
  Nueva descripción para humanos
</ParamField>

<ParamField body="pluginDescriptionForModel" type="string">
  Nueva descripción para el modelo
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://app.horneross.com/api/datastores/ds_abc123 \
    -H "Authorization: Bearer sk_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Base de conocimientos actualizada",
      "isPublic": true
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://app.horneross.com/api/datastores/ds_abc123',
    {
      method: 'PATCH',
      headers: {
        'Authorization': 'Bearer sk_live_xxx',
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        name: 'Base de conocimientos actualizada',
        isPublic: true,
      }),
    }
  );

  const datastore = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.patch(
      'https://app.horneross.com/api/datastores/ds_abc123',
      headers={
          'Authorization': 'Bearer sk_live_xxx',
          'Content-Type': 'application/json',
      },
      json={
          'name': 'Base de conocimientos actualizada',
          'isPublic': True
      }
  )

  datastore = response.json()
  ```
</RequestExample>

## Response

<ResponseField name="id" type="string" required>
  ID del datastore
</ResponseField>

<ResponseField name="name" type="string">
  Nombre actualizado
</ResponseField>

<ResponseField name="visibility" type="string">
  Visibilidad actualizada
</ResponseField>

<ResponseField name="updatedAt" type="string">
  Fecha de actualización
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "id": "ds_abc123",
    "name": "Base de conocimientos actualizada",
    "visibility": "public",
    "updatedAt": "2024-01-21T16:00:00Z"
  }
  ```
</ResponseExample>
