> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devinenterprise.com/llms.txt
> Use this file to discover all available pages before exploring further.

> Scarica i file allegati che sono stati caricati in precedenza. Restituisce un reindirizzamento a un URL prefirmato per l'accesso sicuro ai file.

# Scarica allegato

Questo endpoint consente di scaricare file da una sessione di Devin. Se desideri caricare risorse, usa l'[endpoint di upload](/it/api-reference/v1/attachments/upload-files-for-devin-to-work-with).

L'endpoint restituisce un reindirizzamento 307 verso un URL prefirmato che fornisce accesso temporaneo al file. L'URL prefirmato è valido per 60 secondi.

<div id="example-usage">
  ## Esempio di utilizzo
</div>

```python theme={null}
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)
```


## OpenAPI

````yaml it/v1-openapi.yaml GET /v1/attachments/{uuid}/{name}
openapi: 3.1.0
info:
  description: Devin v1 API con API Keys personali e di servizio
  title: Devin API v1
  version: 1.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v1/attachments/{uuid}/{name}:
    get:
      summary: Scarica allegato
      description: >-
        Scarica un file allegato tramite autenticazione con API key. Restituisce
        un reindirizzamento verso un URL prefirmato.
      operationId: download_attachment_customer_endpoint_v1_attachments__uuid___name__get
      parameters:
        - in: path
          name: uuid
          required: true
          schema:
            title: Uuid
            type: string
        - in: path
          name: name
          required: true
          schema:
            title: Name
            type: string
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Risposta con esito positivo
        '307':
          description: Reindirizza all'URL prefirmato per il download
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Errore di validazione
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: Chiave API personale (apk_user_\*) o chiave API di servizio (apk_\*)
      scheme: bearer
      type: http

````