跳转到主要内容
GET
/
v1
/
attachments
/
{uuid}
/
{name}
cURL
# Note: -L flag is required to follow the 307 redirect
curl -L -X GET "https://api.devin.ai/v1/attachments/{uuid}/{name}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o "downloaded_file.ext"
This response does not have an example.
此 endpoint 允许你从 Devin 会话中下载文件。若要上传资源,请使用上传 endpoint 该 endpoint 返回一个 307 重定向到预签名 URL,该 URL 为文件提供临时访问权限。预签名 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

Path Parameters

uuid
string
required
name
string
required

Response