curl "https://api.dcycle.io/v2/files/6f1e2d3c-4b5a-4978-8c6d-5e4f3a2b1c0d/sheets?template_id=wastes" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import os
import requests
response = requests.get(
"https://api.dcycle.io/v2/files/6f1e2d3c-4b5a-4978-8c6d-5e4f3a2b1c0d/sheets",
params={"template_id": "wastes"},
headers={"x-api-key": os.environ["DCYCLE_API_KEY"], "x-organization-id": os.environ["DCYCLE_ORG_ID"]},
)
print([sheet["name"] for sheet in response.json()["sheets"]])
{
"file_id": "6f1e2d3c-4b5a-4978-8c6d-5e4f3a2b1c0d",
"sheets": [
{ "name": "Enero", "rows": 412, "date_min": "2026-01-02", "date_max": "2026-01-31" },
{ "name": "Instrucciones", "rows": 8, "date_min": null, "date_max": null }
],
"selection": {
"state": "decided",
"template_id": "wastes",
"main_sheet": "Enero",
"sheets": ["Enero"],
"confidence": 0.97,
"source": "model",
"reason": null,
"spec_version": "b3-2026-10-28",
"updated_at": "2026-11-05T17:20:09Z"
}
}
Get a File's Sheets
The tabs of a spreadsheet, with their rows and dates, and the sheet selector’s answer
GET
/
v2
/
files
/
{file_id}
/
sheets
curl "https://api.dcycle.io/v2/files/6f1e2d3c-4b5a-4978-8c6d-5e4f3a2b1c0d/sheets?template_id=wastes" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import os
import requests
response = requests.get(
"https://api.dcycle.io/v2/files/6f1e2d3c-4b5a-4978-8c6d-5e4f3a2b1c0d/sheets",
params={"template_id": "wastes"},
headers={"x-api-key": os.environ["DCYCLE_API_KEY"], "x-organization-id": os.environ["DCYCLE_ORG_ID"]},
)
print([sheet["name"] for sheet in response.json()["sheets"]])
{
"file_id": "6f1e2d3c-4b5a-4978-8c6d-5e4f3a2b1c0d",
"sheets": [
{ "name": "Enero", "rows": 412, "date_min": "2026-01-02", "date_max": "2026-01-31" },
{ "name": "Instrucciones", "rows": 8, "date_min": null, "date_max": null }
],
"selection": {
"state": "decided",
"template_id": "wastes",
"main_sheet": "Enero",
"sheets": ["Enero"],
"confidence": 0.97,
"source": "model",
"reason": null,
"spec_version": "b3-2026-10-28",
"updated_at": "2026-11-05T17:20:09Z"
}
}
← Files
Read which tabs a workbook has before opening its import session. Only
reads: nothing is scheduled and nothing changes. A CSV has no tabs, so
sheets is empty.
Beta. Part of the Import API, in beta. The contract may still change before general availability.
curl "https://api.dcycle.io/v2/files/6f1e2d3c-4b5a-4978-8c6d-5e4f3a2b1c0d/sheets?template_id=wastes" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import os
import requests
response = requests.get(
"https://api.dcycle.io/v2/files/6f1e2d3c-4b5a-4978-8c6d-5e4f3a2b1c0d/sheets",
params={"template_id": "wastes"},
headers={"x-api-key": os.environ["DCYCLE_API_KEY"], "x-organization-id": os.environ["DCYCLE_ORG_ID"]},
)
print([sheet["name"] for sheet in response.json()["sheets"]])
{
"file_id": "6f1e2d3c-4b5a-4978-8c6d-5e4f3a2b1c0d",
"sheets": [
{ "name": "Enero", "rows": 412, "date_min": "2026-01-02", "date_max": "2026-01-31" },
{ "name": "Instrucciones", "rows": 8, "date_min": null, "date_max": null }
],
"selection": {
"state": "decided",
"template_id": "wastes",
"main_sheet": "Enero",
"sheets": ["Enero"],
"confidence": 0.97,
"source": "model",
"reason": null,
"spec_version": "b3-2026-10-28",
"updated_at": "2026-11-05T17:20:09Z"
}
}
Request
Path Parameters
string
required
The file’s id.
Query Parameters
string
The template to read the selector’s answer for. Without it, the one the file was classified in.
Headers
string
required
Your API key.
string
required
The organization that owns the file.
Response
array
One entry per tab:
name, rows (non-empty rows under its header) and date_min and date_max (the first and last
dates of its column with the most dates). All but name are null for a tab that was not profiled: past the limit of
tabs or of time, or unreadable.object
The sheet selector’s answer, a suggestion:
state (pending, decided, abstained, skipped, failed), main_sheet,
sheets, confidence and source. Null when there is none for this file and template: a CSV, an .xls, no
template, or the selector not being on for your organization. While pending, read it again.Errors
Errors are problem details.404 NOT_FOUND, 400 IMPORT_FILE_TYPE_NOT_SUPPORTED (not a
spreadsheet), 400 IMPORT_FILE_TOO_LARGE, 422 FILE_NOT_IMPORTABLE, 503 IMPORT_HEAVY_OPERATION_BUSY, and 429
beyond the rate limits. A workbook’s tabs are read once: asking again answers the same
tabs without reading the file again.
Related Endpoints
Open an Import Session
Import the tab you choose
Get a File (v2)
The file’s state
Was this page helpful?