Vai al contenuto principale
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>"
    }
  ]
}
Questo endpoint consente di scaricare file da una sessione di Devin. Se desideri caricare risorse, usa l’endpoint di upload. L’endpoint restituisce un reindirizzamento 307 verso un URL prefirmato che fornisce accesso temporaneo al file. L’URL prefirmato è valido per 60 secondi.

Esempio di utilizzo

import requests

# Scarica un allegato
response = requests.get(
    f"https://api.devin.ai/v1/attachments/{uuid}/{filename}",
    headers={"Authorization": f"Bearer {DEVIN_API_KEY}"},
    allow_redirects=True
)

# Salva il contenuto del file
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