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)

Autorizzazioni

Authorization
string
header
obbligatorio

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

Parametri del percorso

uuid
string
obbligatorio
name
string
obbligatorio

Risposta

Redirect to presigned download URL