コンテンツにスキップ

ベクターストア内のドキュメントのリストを取得する

GET /vector-stores/{vector-store-id}/documents

List all documents in a vector store.

Parameter In Type Required Description
vector-store-id path string yes The ID of the vector store.
x-api-key header string yes The API key for authentication.

Responses

  • 200 — A list of documents.

例のリクエスト

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

Info

YOUR_API_KEY を実際のベクターストアAPIキーに、vs_abc123 をあなたのベクターストアIDに置き換えてください。

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');

Info

YOUR_API_KEY を実際のベクターストアAPIキーに、vs_abc123 をあなたのベクターストアIDに置き換えてください。

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')

Info

YOUR_API_KEY を実際のベクターストアAPIキーに、vs_abc123 をあなたのベクターストアIDに置き換えてください。

パスパラメータ

パラメータ タイプ 説明
vector-store-id 文字列 必須。 ドキュメントをリストするためのベクターストアのID。

レスポンスフォーマット

[
  {
    "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 サーバ内部エラー

このエンドポイントは、指定されたベクトルストアに保存されているすべてのドキュメントのリストを取得します。各ドキュメントに関するメタデータを提供し、ドキュメントの処理状況、サイズ、およびインデックス作成されたタイムスタンプを含みます。この情報は、ベクトルストアの内容を監視し、ドキュメントの処理状況を確認するのに役立ちます。