メインコンテンツへスキップ

Documentation Index

Fetch the complete documentation index at: https://docs.qoder.com/llms.txt

Use this file to discover all available pages before exploring further.

GET /v1/files 現在のアカウント配下のファイル一覧を取得します。ページネーションと用途別フィルタをサポートします。

ヘッダー

ヘッダー必須説明
AuthorizationはいBearer $QODER_PAT

クエリパラメータ

パラメータ必須説明
purposestringいいえファイル用途でフィルタ。値:user_uploadtool_outputskill_outputsession_resourceagent_output
limitintegerいいえ1 ページあたりの最大件数
afterstringいいえカーソルページネーション:この file_id 以降のファイルを返す(後方ページネーション)
beforestringいいえカーソルページネーション:この file_id 以前のファイルを返す(前方ページネーション)

リクエスト例

# 基本一覧
curl -X GET "https://openapi.qoder.sh/api/v1/cloud/files" \
  -H "Authorization: Bearer $QODER_PAT"

# 用途でフィルタ + 件数制限
curl -X GET "https://openapi.qoder.sh/api/v1/cloud/files?purpose=session_resource&limit=10" \
  -H "Authorization: Bearer $QODER_PAT"

# カーソルページネーション
curl -X GET "https://openapi.qoder.sh/api/v1/cloud/files?limit=10&after=file_019e3bb8e6c47d18" \
  -H "Authorization: Bearer $QODER_PAT"

レスポンス例

HTTP 200 OK
{
  "data": [
    {
      "created_at": "2026-05-18T15:33:53Z",
      "file_id": "file_019e3bb8e6c47d189212a79642136696",
      "filename": "report.txt",
      "metadata": {
        "project": "test"
      },
      "mime_type": "text/plain",
      "purpose": "session_resource",
      "size_bytes": 110,
      "status": "ready",
      "updated_at": "2026-05-18T15:33:54Z"
    }
  ],
  "first_id": "file_019e3bb8e6c47d189212a79642136696",
  "has_more": false,
  "last_id": "file_019e3bb8e6c47d189212a79642136696"
}

レスポンスフィールド

フィールド説明
dataarrayファイルオブジェクト配列
first_idstring | null現在ページ先頭ファイルの ID(データなし時は null)
last_idstring | null現在ページ末尾ファイルの ID(データなし時は null)
has_morebooleanさらにデータがあるかどうか
data 内の各ファイルオブジェクトのフィールドは ファイルのアップロード のレスポンスと同一です。

空一覧レスポンス

{
  "data": [],
  "first_id": null,
  "has_more": false,
  "last_id": null
}

ページネーション

一覧は作成時刻の降順(新しい順)で並びます。カーソルページネーションですべてのファイルを巡回するには:
  1. 初回リクエストで limit を設定し、最初のページを取得
  2. has_moretrue の場合、after=<last_id> で次のページを取得
  3. before=<first_id> で前方ページネーションが可能

エラーレスポンス

HTTPtype説明
401認証トークンが欠落または無効