# 获取向量存储中的文档列表

{% openapi src="<https://1371168417-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gvX7KIUy0DhcQETj8Ux%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media&token=cce1ab0d-330f-4bed-b7da-5635aaf25472>" path="/vector-stores/{vector-store-id}/documents" method="get" %}
[rememberizer\_openapi.yml](https://1371168417-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gvX7KIUy0DhcQETj8Ux%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=cce1ab0d-330f-4bed-b7da-5635aaf25472)
{% endopenapi %}

## 示例请求

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET \
  https://api.rememberizer.ai/api/v1/vector-stores/vs_abc123/documents \
  -H "x-api-key: YOUR_API_KEY"
```

{% hint style="info" %}
将 `YOUR_API_KEY` 替换为您的实际向量存储 API 密钥，并将 `vs_abc123` 替换为您的向量存储 ID。
{% endhint %}
{% endtab %}

{% tab title="JavaScript" %}

```javascript
const getVectorStoreDocuments = async (vectorStoreId) => {
  const response = await fetch(`https://api.rememberizer.ai/api/v1/vector-stores/${vectorStoreId}/documents`, {
    method: 'GET',
    headers: {
      'x-api-key': 'YOUR_API_KEY'
    }
  });
  
  const data = await response.json();
  console.log(data);
};

getVectorStoreDocuments('vs_abc123');
```

{% hint style="info" %}
将 `YOUR_API_KEY` 替换为您的实际向量存储 API 密钥，并将 `vs_abc123` 替换为您的向量存储 ID。
{% endhint %}
{% endtab %}

{% tab title="Python" %}

```python
import requests

def get_vector_store_documents(vector_store_id):
    headers = {
        "x-api-key": "YOUR_API_KEY"
    }
    
    response = requests.get(
        f"https://api.rememberizer.ai/api/v1/vector-stores/{vector_store_id}/documents",
        headers=headers
    )
    
    data = response.json()
    print(data)

get_vector_store_documents('vs_abc123')
```

{% hint style="info" %}
将 `YOUR_API_KEY` 替换为您的实际向量存储 API 密钥，并将 `vs_abc123` 替换为您的向量存储 ID。
{% endhint %}
{% endtab %}
{% endtabs %}

## 路径参数

| 参数              | 类型  | 描述                      |
| --------------- | --- | ----------------------- |
| vector-store-id | 字符串 | **必需。** 要列出文档的向量存储的 ID。 |

## 响应格式

```json
[
  {
    "id": 1234,
    "name": "产品手册.pdf",
    "type": "application/pdf",
    "vector_store": "vs_abc123",
    "size": 250000,
    "status": "已索引",
    "processing_status": "已完成",
    "indexed_on": "2023-06-15T10:30:00Z",
    "status_error_message": null,
    "created": "2023-06-15T10:15:00Z",
    "modified": "2023-06-15T10:30:00Z"
  },
  {
    "id": 1235,
    "name": "技术规格.docx",
    "type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
    "vector_store": "vs_abc123",
    "size": 125000,
    "status": "已索引",
    "processing_status": "已完成",
    "indexed_on": "2023-06-15T11:45:00Z",
    "status_error_message": null,
    "created": "2023-06-15T11:30:00Z",
    "modified": "2023-06-15T11:45:00Z"
  }
]
```

## 认证

此端点需要使用 `x-api-key` 头中的 API 密钥进行认证。

## 错误响应

| 状态码 | 描述                  |
| --- | ------------------- |
| 401 | 未授权 - 无效或缺失的 API 密钥 |
| 404 | 未找到 - 找不到向量存储       |
| 500 | 服务器内部错误             |

此端点检索指定向量存储中存储的所有文档的列表。它提供有关每个文档的元数据，包括文档的处理状态、大小和索引时间戳。这些信息对于监控您的向量存储内容和检查文档处理状态非常有用。
