简体中文
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