メインコンテンツへスキップ
GET
/
v1
/
attachments
/
{uuid}
/
{name}
Download an attachment
curl --request GET \
  --url https://api.devin.ai/v1/attachments/{uuid}/{name} \
  --header 'Authorization: Bearer <token>'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}
このエンドポイントを使用すると、Devin セッションからファイルをダウンロードできます。リソースをアップロードする場合は、アップロード用エンドポイントを使用してください。 このエンドポイントは、ファイルへの一時的なアクセスを提供する署名付きURLへの 307 リダイレクトを返します。署名付きURLの有効期限は 60 秒です。

使用例

import requests

# 添付ファイルをダウンロード
response = requests.get(
    f"https://api.devin.ai/v1/attachments/{uuid}/{filename}",
    headers={"Authorization": f"Bearer {DEVIN_API_KEY}"},
    allow_redirects=True
)

# ファイルコンテンツを保存
with open(filename, "wb") as f:
    f.write(response.content)

Authorizations

Authorization
string
header
required

Personal API Key (apk_user_) or Service API Key (apk_)

Path Parameters

uuid
string
required
name
string
required

Response

Redirect to presigned download URL