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 |
クエリパラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|
purpose | string | いいえ | ファイル用途でフィルタ。値:user_upload、tool_output、skill_output、session_resource、agent_output |
limit | integer | いいえ | 1 ページあたりの最大件数 |
after | string | いいえ | カーソルページネーション:この file_id 以降のファイルを返す(後方ページネーション) |
before | string | いいえ | カーソルページネーション:この 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"
}
レスポンスフィールド
| フィールド | 型 | 説明 |
|---|
data | array | ファイルオブジェクト配列 |
first_id | string | null | 現在ページ先頭ファイルの ID(データなし時は null) |
last_id | string | null | 現在ページ末尾ファイルの ID(データなし時は null) |
has_more | boolean | さらにデータがあるかどうか |
data 内の各ファイルオブジェクトのフィールドは ファイルのアップロード のレスポンスと同一です。
空一覧レスポンス
{
"data": [],
"first_id": null,
"has_more": false,
"last_id": null
}
ページネーション
一覧は作成時刻の降順(新しい順)で並びます。カーソルページネーションですべてのファイルを巡回するには:
- 初回リクエストで
limit を設定し、最初のページを取得
has_more が true の場合、after=<last_id> で次のページを取得
before=<first_id> で前方ページネーションが可能
エラーレスポンス
| HTTP | type | 説明 |
|---|
| 401 | — | 認証トークンが欠落または無効 |