日本語
cURL
curl --request GET \ --url https://api.devin.ai/v1/attachments/{uuid}/{name} \ --header 'Authorization: Bearer <token>'
{ "detail": [ { "loc": [ "<string>" ], "msg": "<string>", "type": "<string>" } ] }
以前にアップロードされた添付ファイルをダウンロードします。安全なファイルアクセスのために、署名付きURLへのリダイレクトを返します。
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)
Personal API Key (apk_user_) or Service API Key (apk_)
Redirect to presigned download URL