# 獲取向量儲存中的文件列表

{% openapi src="/files/WF90zszaISusKGEBimez" path="/vector-stores/{vector-store-id}/documents" method="get" %}
[rememberizer\_openapi.yml](https://2492455604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTVKmtXKPeA8gAZJsuGLA%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=3b4a9db2-4dd7-440f-b670-9555703d351d)
{% 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 | 內部伺服器錯誤             |

此端點檢索指定向量儲存庫中所有文件的列表。它提供有關每個文件的元數據，包括文件的處理狀態、大小和索引時間戳。這些信息對於監控您的向量儲存庫內容和檢查文件處理狀態非常有用。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rememberizer.ai/zh-hk/kai-fa-zhe-zi-yuan/api-docs/vector-store/get-a-list-of-documents-in-a-vector-store.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
