> ## 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.

# Obtener datastore

> Obtener un datastore específico con sus datasources.

## Endpoint

```
GET /api/datastores/{datastoreId}
```

## Path Parameters

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

## Headers

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

## Query Parameters

<ParamField query="search" type="string">
  Buscar datasources por nombre o URL
</ParamField>

<ParamField query="status" type="string">
  Filtrar por estado: `pending`, `running`, `synced`, `error`, `usage_limit_reached`
</ParamField>

<ParamField query="type" type="string">
  Filtrar por tipo: `file`, `text`, `web_page`, `web_site`, `notion`, `google_drive_file`, etc.
</ParamField>

<ParamField query="groupId" type="string">
  Filtrar por grupo de datasources
</ParamField>

<ParamField query="offset" type="number" default="0">
  Offset para paginación
</ParamField>

<ParamField query="limit" type="number" default="100">
  Cantidad de datasources a retornar
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://app.horneross.com/api/datastores/ds_abc123?status=synced&limit=50" \
    -H "Authorization: Bearer sk_live_xxx"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://app.horneross.com/api/datastores/ds_abc123?status=synced&limit=50',
    {
      headers: {
        'Authorization': 'Bearer sk_live_xxx',
      },
    }
  );

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

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

  response = requests.get(
      'https://app.horneross.com/api/datastores/ds_abc123',
      headers={'Authorization': 'Bearer sk_live_xxx'},
      params={'status': 'synced', 'limit': 50}
  )

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

## Response

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

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

<ResponseField name="datasources" type="array">
  Lista de datasources

  <Expandable title="Propiedades de cada datasource">
    <ResponseField name="datasources[].id" type="string">
      ID del datasource
    </ResponseField>

    <ResponseField name="datasources[].name" type="string">
      Nombre del datasource
    </ResponseField>

    <ResponseField name="datasources[].type" type="string">
      Tipo de datasource
    </ResponseField>

    <ResponseField name="datasources[].status" type="string">
      Estado de procesamiento
    </ResponseField>

    <ResponseField name="datasources[].lastSynch" type="string">
      Última sincronización
    </ResponseField>

    <ResponseField name="datasources[]._count.children" type="number">
      Cantidad de datasources hijos
    </ResponseField>

    <ResponseField name="datasources[].children" type="array">
      Datasources hijos en proceso
    </ResponseField>

    <ResponseField name="datasources[].autoSyncConfig" type="object">
      Configuración de auto-sync
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="_count.datasources" type="number">
  Total de datasources (filtrados)
</ResponseField>

<ResponseField name="apiKeys" type="array">
  API keys del datastore
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "id": "ds_abc123",
    "name": "FAQ General",
    "description": "Preguntas frecuentes",
    "type": "qdrant",
    "visibility": "private",
    "_count": {
      "datasources": 15
    },
    "datasources": [
      {
        "id": "datasource_xyz",
        "name": "Política de devoluciones",
        "type": "text",
        "status": "synced",
        "lastSynch": "2024-01-21T10:00:00Z",
        "_count": {
          "children": 0
        },
        "children": [],
        "autoSyncConfig": {
          "autoSync": false
        }
      }
    ],
    "apiKeys": [
      {
        "id": "key_123",
        "key": "ds_key_xxx"
      }
    ]
  }
  ```
</ResponseExample>
