Reports¶
client.report() and client.report_url() call these functions. See the
reports guide.
report
¶
report(client: T3Client, endpoint: str, *, licenses: LicenseArg = None, format: str | None = None, to: str | Path | None = None, columns: str | Sequence[str] | None = None, filter: str | Sequence[str] | None = None, filter_logic: str | None = None, sort: str | None = None, row_limit: int | None = None, delivery: str | None = None, email: str | None = None, params: Mapping[str, Any] | None = None) -> Any
Download a report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
endpoint
|
str
|
A report's endpoint ID ( |
required |
licenses
|
LicenseArg
|
Up to 20 licenses. Defaults to the client's license. |
None
|
format
|
str | None
|
|
None
|
to
|
str | Path | None
|
Stream the report to this file and return its path. |
None
|
columns
|
str | Sequence[str] | None
|
Columns to include, in order. |
None
|
filter
|
str | Sequence[str] | None
|
|
None
|
filter_logic
|
str | None
|
|
None
|
sort
|
str | None
|
|
None
|
row_limit
|
int | None
|
Stop after this many rows. |
None
|
delivery
|
str | None
|
|
None
|
params
|
Mapping[str, Any] | None
|
Any other query parameters, by their spec names. |
None
|
Returns:
| Type | Description |
|---|---|
Any
|
The file path with |
Any
|
delivery; the sheet URL for |
report_url
¶
report_url(client: T3Client, endpoint: str, *, licenses: LicenseArg = None, format: str = 'csv', columns: str | Sequence[str] | None = None, filter: str | Sequence[str] | None = None, filter_logic: str | None = None, sort: str | None = None, row_limit: int | None = None, params: Mapping[str, Any] | None = None) -> str
A report URL with the secret key in ?secretKey=, for Excel or Google Sheets.
It sends no request. Anyone with the URL can use the key: deleting the key
(t3api keys revoke) is the only way to cut off a leaked URL, because
rotating keeps the same key value.