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

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 を使用して直接ファイル内容をダウンロードできます。 注意: purposetool_output または skill_output のファイルのみダウンロードに対応します。それ以外の用途のファイルは 403 エラーを返します。

ヘッダー

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

パスパラメータ

パラメータ必須説明
file_idstringはいファイル一意識別子、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 が含まれます。

レスポンスフィールド

フィールド説明
urlstring署名済みダウンロード URL
expires_atstringURL 有効期限(ISO 8601)、通常はリクエスト後約 1 時間

ダウンロード URL について

  • 署名済み URL には有効期限があり、期限切れ後は再リクエストが必要です
  • URL には response-content-disposition パラメータが含まれ、ブラウザでアクセスすると元のファイル名でダウンロードがトリガーされます
  • curl -L でリダイレクトを自動追従してファイルをダウンロードできます

エラーレスポンス

HTTPtype説明
401認証トークンが欠落または無効
403permission_errorファイル用途がダウンロード非対応(tool_outputskill_output のみダウンロード可能)
404not_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"
}