# drive_file_get

Get File Metadata + Download URL

## Beschreibung

Returns a single file's metadata plus a short-lived signed
download URL (5-minute TTL, `disposition=attachment`). The
URL is the same one the in-app Download button would emit,
so anything that can fetch a signed Active Storage blob works.

For inline preview of Markdown / text bodies, prefer
`drive_file_content` — no signed-URL fetch needed.

## Zugriff

Zugriffsprofil: `gated`. Module: `files`.
Die Freigabe im Profil ersetzt keine Account-, Workspace- oder Rollenberechtigung.

## Parameter

| Name | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `account_id` | string | Ja |  |
| `file_id` | string | Ja | File prefix ID (dfi_…) from drive_folder_list or drive_search. |

## Eingabeschema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "account_id": {
      "type": "string"
    },
    "file_id": {
      "type": "string",
      "description": "File prefix ID (dfi_…) from drive_folder_list or drive_search."
    }
  },
  "required": [
    "account_id",
    "file_id"
  ],
  "type": "object"
}
```

## Ausgabeschema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "content_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "byte_size": {
      "type": "integer"
    },
    "sync_version": {
      "type": "integer"
    },
    "folder_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "drive_id": {
      "type": "string"
    },
    "path": {
      "type": "string",
      "description": "Drive name + folder chain joined by ' / '."
    },
    "uploaded_by": {
      "type": [
        "object",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "download_url": {
      "type": "string",
      "description": "Signed Active Storage URL, 5-minute expiry, disposition=attachment."
    },
    "has_active_share_link": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "name",
    "content_type",
    "byte_size",
    "sync_version",
    "folder_id",
    "drive_id",
    "path",
    "uploaded_by",
    "created_at",
    "updated_at",
    "download_url",
    "has_active_share_link"
  ],
  "type": "object"
}
```
