Developers › REST API › Storage
REST API · 5 endpoints
files
Conventions for every endpoint. Lists take page (from 1) and per_page (1-100, default 50), and total counts pages, not items. Collection URLs end with /. POST …/run returns 200 when the run is queued; poll GET …/run. Google Sheets use provider: "drive"; column fields take letters ("E"). Error bodies and status codes: api.html#api-errors.
Browse and search the storage providers connected to your account — Google Drive, OneDrive, SharePoint and Dropbox — to find the ids you need when building an automation.
Every result carries id, provider and file_type, which is exactly what a source or destination needs, so a result can be used in an automation payload without translation. Folders are returned alongside files; filter with type=folder when you only want containers.
Start at /files/{provider}/roots to discover where browsing can begin: SharePoint sites, Drive shared drives and virtual containers such as Shared with me are only reachable from there. These endpoints are read-only — files are created through the automation payload.
Google Docs are not returned by default. Pass type=gdocs to find a Google Docs file for a document destination's template_id — it is the one type omitted from an unfiltered listing, and it exists on Google Drive only.
Models used on this page
Every request and response model referenced above, including nested ones (14). The full catalogue is on api-models.html.
ChartItem
One chart already drawn in the spreadsheet.
| Field | Type | | Description |
|---|
chart_id | integer | required | Numeric chart id. Pass as chart_id when creating a dashboard element. |
chart_type | string | nullable | Normalized chart type, e.g. column, line, pie |
supported | boolean | optional | False when Sheetgo cannot render this chart type on a dashboard Default: true |
tab_id | integer | nullable | Numeric id of the tab the chart is drawn on. |
tab_name | string | nullable | Name of that tab. |
title | string | nullable | The chart's title as set in the spreadsheet, when it has one. |
ColumnItem
One column of a tab's header row.
| Field | Type | | Description |
|---|
header | string | nullable | The header cell exactly as stored (not trimmed — match it verbatim); null when the cell is empty. |
index | integer | required | Zero-based column position. |
letter | string | required | Spreadsheet column letter — the value automation column fields take (filter, split, remove_duplicates, left_join, anonymize). |
FileItem
One file or folder, normalized across all four storage providers.
| Field | Type | | Description |
|---|
created_at | string | nullable | ISO-8601 creation time as reported by the provider |
file_type | FileTypeFilter | nullable | Automation file type; null when the item is outside the supported set |
id | string | required | Provider id. Usable as an automation source/destination id, and as parent when browsing. |
is_folder | boolean | optional | True when the item can be used as a parent Default: false |
kind | ItemKind | optional | file | folder | site | shared_drive | virtual Default: "file" |
mime_type | string | nullable | Provider mimetype |
modified_at | string | nullable | ISO-8601 last-modified time as reported by the provider |
name | string | nullable | Display name |
parent_id | string | nullable | Containing folder id, when the provider reports one |
provider | string | required | drive | onedrive | sharepoint | dropbox |
size | integer | nullable | Size in bytes; null or 0 for folders and for providers that omit it |
supports_structure | boolean | optional | True when GET /files/{provider}/{file_id}/structure can describe this item (any spreadsheet: Google Sheets, Excel, CSV, TSV). Not a claim about reading its values. Default: false |
web_url | string | nullable | Link to open the item in the provider UI; null when unavailable |
Used by: GET /rest/beta/files/{provider}/{file_id}
FileListResponse
Standard paginated envelope plus a truncation flag.
truncated is true when the enumeration ceiling
(FILE_DISCOVERY_MAX_ITEMS, or the internal byte ceiling) was reached, so
items past it are not reachable by paging. Narrow with type or search.
| Field | Type | | Description |
|---|
page | integer | nullable | Page number Default: 1 |
per_page | integer | nullable | Number of items per page Default: 50 |
results | array of FileItem | optional | List of results |
total | integer | nullable | Total number of pages Default: 0 |
truncated | boolean | optional | True when the listing was capped Default: false |
Used by: GET /rest/beta/files/{provider}, GET /rest/beta/files/{provider}/roots, GET /rest/beta/files/{provider}/search
FileStructureResponse
What is inside one file.
Discriminated by file_type: the matching body key is populated and the
others are absent. Today only spreadsheet exists; a future document
variant adds document without changing this URL.
| Field | Type | | Description |
|---|
file_id | string | required | Id of the file that was inspected. |
file_type | string | required | Body discriminator, e.g. spreadsheet |
name | string | nullable | The file's name. |
provider | string | required | Storage provider the file lives on. |
resolved_file | ResolvedFile | nullable | Set when file_id was a folder: the newest spreadsheet in it, whose structure is returned. |
spreadsheet | SpreadsheetStructure | nullable | The spreadsheet's tabs, named ranges and charts. Populated when file_type is spreadsheet, absent otherwise. |
Used by: GET /rest/beta/files/{provider}/{file_id}/structure
FileTypeFilter
Public type vocabulary.
The spreadsheet and folder values mirror
:class:newapi.models.beta.connections.FileType, so such a value can be
handed straight back in an automation payload as file_type.
gdocs is the exception: it has no FileType counterpart because a
Google Docs id is passed as the document destination's template_id,
a field that carries no file type. It is also the only value not returned by
default -- ask for it explicitly.
Type: one of "gsheets", "xlsx", "csv", "tsv", "folder", "gdocs"
HTTPValidationError
Used by: GET /rest/beta/workflows/, POST /rest/beta/workflows/, POST /rest/beta/workflows/run/{id}, GET /rest/beta/workflows/{id}, PATCH /rest/beta/workflows/{id}, DELETE /rest/beta/workflows/{id}, GET /rest/beta/workflows/{id}/collaborators, POST /rest/beta/workflows/{id}/collaborators, DELETE /rest/beta/workflows/{id}/collaborators, PATCH /rest/beta/workflows/{id}/collaborators/{email}, DELETE /rest/beta/workflows/{id}/collaborators/{email}, GET /rest/beta/workflows/{id}/destinations, GET /rest/beta/workflows/{id}/files, GET /rest/beta/workflows/{id}/general-access, PUT /rest/beta/workflows/{id}/general-access, DELETE /rest/beta/workflows/{id}/general-access, POST /rest/beta/workflows/{id}/leave, POST /rest/beta/workflows/{id}/request-access, GET /rest/beta/workflows/{id}/run, POST /rest/beta/workflows/{id}/run, GET /rest/beta/workflows/{id}/sources, GET /rest/beta/automations/, POST /rest/beta/automations/run/{id}, GET /rest/beta/automations/{id}, DELETE /rest/beta/automations/{id}, GET /rest/beta/automations/{id}/destinations, GET /rest/beta/automations/{id}/files, GET /rest/beta/automations/{id}/run, POST /rest/beta/automations/{id}/run, GET /rest/beta/automations/{id}/sources, GET /rest/beta/workflows/{id}/trigger, DELETE /rest/beta/workflows/{id}/trigger, GET /rest/beta/workflows/{id}/dashboard, DELETE /rest/beta/workflows/{id}/dashboard/elements/{element_id}, GET /rest/beta/workflows/{id}/dashboard/elements/{element_id}/data, PUT /rest/beta/workflows/{id}/dashboard/publish, GET /rest/beta/workflows/{workflow_id}/forms/, POST /rest/beta/workflows/{workflow_id}/forms/, GET /rest/beta/workflows/{workflow_id}/forms/{form_id}, PATCH /rest/beta/workflows/{workflow_id}/forms/{form_id}, DELETE /rest/beta/workflows/{workflow_id}/forms/{form_id}, GET /rest/beta/workflows/{workflow_id}/forms/{form_id}/responses, HEAD /rest/beta/workflows/{workflow_id}/forms/{form_id}/responses, GET /rest/beta/automations/{automation_id}/webhook, GET /rest/beta/workflows/{workflow_id}/webhooks, GET /rest/beta/api-destination/{public_id}, HEAD /rest/beta/api-destination/{public_id}, GET /rest/beta/integrations/{provider}/options, GET /rest/beta/outlook/messages, POST /rest/beta/outlook/messages/batch, GET /rest/beta/outlook/messages/{message_id}, GET /rest/beta/outlook/messages/{message_id}/attachments/{attachment_id}, POST /rest/beta/outlook/send, POST /rest/beta/gmail/send, GET /rest/beta/files/{provider}, GET /rest/beta/files/{provider}/roots, GET /rest/beta/files/{provider}/search, GET /rest/beta/files/{provider}/{file_id}, GET /rest/beta/bigquery/projects, GET /rest/beta/bigquery/projects/{project}/datasets, GET /rest/beta/bigquery/projects/{project}/datasets/{dataset}/tables, GET /rest/beta/bigquery/projects/{project}/datasets/{dataset}/tables/{table}, POST /rest/beta/bigquery/projects/{project}/validate-query, POST /rest/auth/refresh, POST /rest/auth/token
ItemKind
What a result is, beyond its file type.
site, shared_drive and virtual are only ever emitted by the
/roots endpoint; browse and search return file or folder.
Type: one of "file", "folder", "site", "shared_drive", "virtual"
NamedRangeItem
One named range.
| Field | Type | | Description |
|---|
id | string | nullable | Provider namedRangeId |
name | string | nullable | The name as defined in the spreadsheet |
range | string | nullable | A1 range the name resolves to |
tab_id | integer | nullable | Numeric id of the tab the named range lives on. |
tab_name | string | nullable | Name of that tab. |
Provider
Type: one of "drive", "onedrive", "sharepoint", "dropbox"
Used by: GET /rest/beta/files/{provider}, GET /rest/beta/files/{provider}/roots, GET /rest/beta/files/{provider}/search, GET /rest/beta/files/{provider}/{file_id}, GET /rest/beta/files/{provider}/{file_id}/structure
ResolvedFile
The spreadsheet a folder id resolved to.
| Field | Type | | Description |
|---|
id | string | required | Id of the spreadsheet that was read. |
name | string | nullable | Its name. |
SpreadsheetStructure
Spreadsheet body of a structure response.
A section is null when it was not requested via include, and an empty list
when it was requested and the spreadsheet has none.
| Field | Type | | Description |
|---|
charts | array of ChartItem | nullable | Charts already drawn in the spreadsheet. Each carries the chart_id a chart-reference dashboard element needs. |
columns_truncated | boolean | nullable | Present when include=columns was requested. True when at least one tab's columns is null because only the first tabs are read by default (pass all_tabs=true or tab=) or the read ran out of time. |
named_ranges | array of NamedRangeItem | nullable | Named ranges defined in the spreadsheet. |
tabs | array of TabItem | nullable | The spreadsheet's tabs, in workbook order. Each carries the tab_id a dashboard element needs. |
TabItem
One tab (sheet) of a spreadsheet.
| Field | Type | | Description |
|---|
cols | integer | nullable | Grid column count |
columns | array of ColumnItem | nullable | Letter → header map of this tab, when include=columns read it. Null when not requested, or not read (see columns_truncated). |
hidden | boolean | optional | True when the tab is hidden in the UI Default: false |
id | integer | nullable | Numeric Google sheetId (Google Sheets only; null for Excel/CSV, whose tabs are identified by name). Pass as tab_id when creating a dashboard element. |
index | integer | nullable | Zero-based position |
name | string | nullable | Tab title |
rows | integer | nullable | Grid row count |
type | string | nullable | Provider sheet type, e.g. GRID |
ValidationError
| Field | Type | | Description |
|---|
loc | array of string or integer | required | |
msg | string | required | |
type | string | required | |