GET
/
reports
curl --request GET \
  --url https://api.togai.com/reports \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "report.23Xx0Jkc2DM.FgysO",
      "name": "acme-2024-09-18.csv",
      "status": "COMPLETED",
      "createdAt": "2024-09-18T01:30:08.216867Z",
      "updatedAt": "2024-09-18T01:30:08.350259Z",
      "accountId": null,
      "fileId": "file.23Xx0JkTljo.4JN5B",
      "queryInput": null,
      "reportTemplateId": null,
      "preSignedUrl": null,
      "type": "CUSTOM"
    },
    {
      "id": "report.231kfXmrPq7.YJkpy",
      "name": "Demo Report",
      "status": "COMPLETED",
      "createdAt": "2024-06-28T16:38:05.517189Z",
      "updatedAt": "2024-06-28T16:38:20.533519Z",
      "accountId": null,
      "fileId": "file.231kfo14hqu.7ejfb",
      "queryInput": {
        "selects": [
          {
            "columnName": "name",
            "dataSource": null,
            "alias": " cus1-account",
            "functions": null,
            "aggregator": null
          }
        ],
        "baseDataSource": "customers",
        "sort": [
          {
            "column": {
              "columnName": "name",
              "dataSource": null,
              "alias": " cus1-account",
              "functions": [],
              "aggregator": null
            },
            "sortOrder": "ASC"
          }
        ],
        "limit": "1000,",
        "queryFilters": null,
        "seekValues": null
      },
      "reportTemplateId": "report_template.231kfPGCpoQ.SSeyY",
      "preSignedUrl": null,
      "type": "TEMPLATE"
    }
  ],
  "nextToken": "eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEwMCwgInNvcnRPcmRlciI6ICJhc2MifQ=="
}

Downloading Reports:

Reports can be downloaded using the fileId parameter of the Report entity using the Files API.

Sharing Reports:

Sharable links can be generated using the Generate download URL API which are S3 signed URLs valid for 1 hour and do not require authentication.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

nextToken
string
Example:

"eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEwMCwgInNvcnRPcmRlciI6ICJhc2MifQ=="

pageSize
number
Example:

10

fetchFor
enum<string>
default:ORGANIZATION

Fetch for flag used to get the reports from:

  1. ALL: Both the organization and accounts
  2. ORGANIZATION: Only the organization
  3. ACCOUNTS: Only accounts, works with account_id filter only.
Available options:
ALL,
ORGANIZATION,
ACCOUNTS

Response

200
application/json
Response for List Report requests

Represents a list response for reports

data
object[]

Represents a Report

nextToken
string