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/{file_id}/content
ファイルのダウンロードアドレスを取得します。サーバーは有効期限付きの署名済み URL を返します。クライアントはこの URL を使用して直接ファイル内容をダウンロードできます。
注意: purpose が tool_output または skill_output のファイルのみダウンロードに対応します。それ以外の用途のファイルは 403 エラーを返します。
ヘッダー
| ヘッダー | 必須 | 説明 |
|---|
| Authorization | はい | Bearer $QODER_PAT |
パスパラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|
file_id | string | はい | ファイル一意識別子、file_ プレフィックス文字列 |
リクエスト例
# ダウンロード URL を取得(リダイレクト追従なし)
curl -X GET "https://openapi.qoder.sh/api/v1/cloud/files/file_019e3bb9b0c2752688aeb5fdacf00565/content" \
-H "Authorization: Bearer $QODER_PAT"
# リダイレクトに従ってファイル内容を直接ダウンロード
curl -L -o output.txt \
-X GET "https://openapi.qoder.sh/api/v1/cloud/files/file_019e3bb9b0c2752688aeb5fdacf00565/content" \
-H "Authorization: Bearer $QODER_PAT"
レスポンス例
HTTP 302 Found
サーバーは HTTP 302 リダイレクトを返し、レスポンスボディに署名済み URL 情報が含まれます:
{
"expires_at": "2026-05-18T16:34:52Z",
"url": "https://qoder-cloud-agents-storage-test.oss-ap-southeast-1-internal.aliyuncs.com/files/..."
}
レスポンスヘッダーの Location フィールドにもこのダウンロード URL が含まれます。
レスポンスフィールド
| フィールド | 型 | 説明 |
|---|
url | string | 署名済みダウンロード URL |
expires_at | string | URL 有効期限(ISO 8601)、通常はリクエスト後約 1 時間 |
ダウンロード URL について
- 署名済み URL には有効期限があり、期限切れ後は再リクエストが必要です
- URL には
response-content-disposition パラメータが含まれ、ブラウザでアクセスすると元のファイル名でダウンロードがトリガーされます
curl -L でリダイレクトを自動追従してファイルをダウンロードできます
エラーレスポンス
| HTTP | type | 説明 |
|---|
| 401 | — | 認証トークンが欠落または無効 |
| 403 | permission_error | ファイル用途がダウンロード非対応(tool_output と skill_output のみダウンロード可能) |
| 404 | not_found_error | 指定 ID のファイルが存在しない |
エラー例
403 — ファイル用途制限
{
"error": {
"message": "Only files with purpose 'tool_output' or 'skill_output' can be downloaded.",
"type": "permission_error"
},
"type": "error"
}
404 — ファイル不存在
{
"error": {
"message": "File 'file_nonexistent123' was not found.",
"type": "not_found_error"
},
"type": "error"
}