Skip to main content
GET
/
storage
/
{storage_id}
Retrieve a storage item
curl --request GET \
  --url https://api.deck.co/v2/storage/{storage_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "object": "<string>",
  "file_name": "<string>",
  "file_type": "<string>",
  "file_size": 123,
  "url": "<string>",
  "metadata": "<unknown>",
  "extraction": "<unknown>",
  "task_run_id": "<string>",
  "result": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Secret key (sk_live_...)

Path Parameters

storage_id
string
required

Unique identifier for the storage item (prefixed with stor_).

Response

OK

A storage item representing a file captured during a task run.

id
string
required

Unique identifier for the storage item, prefixed with stor_.

object
string
required

Always storage.

file_name
string
required

Original file name as it appeared on the source.

file_type
string
required

MIME type (e.g. application/pdf, image/png, text/csv).

file_size
required

File size in bytes.

url
null | string
required

Signed download URL for the file.

metadata
null | any
required

A JSON object of additional key-value details Deck records about the file, or null when there are none. Which keys appear depends on the file and how it was captured, so treat it as informational and don't depend on specific keys being present.

extraction
any
required

Structured data extracted from the file, if extraction is enabled. Null if extraction failed or is not enabled.

task_run_id
string
required

The task run that produced this storage item. Prefixed with trun_.

result
string
required

Extraction outcome: failure if the file's data couldn't be extracted, otherwise success (including files with no extraction).

created_at
string<date-time>
required

ISO 8601 timestamp of when the resource was created.