Report
Any report loaded into a TAG dashboard can be exposed through this API.
Reports are note exposed automatically via the REST API. You can add the api_clients property to your export configuration if you want to make it available for download.
In the api_clients list:
You can specify * to make it available for all clients
You can include the string ID of some specific clients to make it available only for them.
Example configuration of a report available to all clients with REPORT_READ or TRUSTED scope:
{
"label": "All delegates",
"id": "delegates",
"query": "SELECT id, first_name, last_name FROM delegate",
"parameters": [],
"fixed": [],
"api_clients": ["*"]
}
Example configuration of a report available only to two specific clients with REPORT_READ or TRUSTED scope:
{
"label": "All delegates",
"id": "delegates",
"query": "SELECT id, first_name, last_name FROM delegate",
"parameters": [],
"fixed": [],
"api_clients": [
"ee0b1eb185a33d62879da1485510e7bb",
"284ec491a1c93b5f53b4aa28a15bde86"
]
}
Note
Adding only the client ID in your configuration, and not assigning the correct REPORT_READ, REPORT_LIST or TRUSTED scope to your client(s) will not work.
The OAuth2 client must both:
have the REPORT_READ, REPORT_LIST or TRUSTED scope
be in the list of “api_clients” (either explicitly, or via *)
GET /report/{dashboard}/list.json
List the available reports. Requires the REPORT_LIST scope or the TRUSTED scope (which provides access to everything).
This endpoint also requires a user to be logged in, in addition to the client having a valid scope.
GET /report/{dashboard}/export/{exportId}/data.(json|csv)
Download the report data in the specified format (JSON or CSV). Requires the REPORT_READ scope or the TRUSTED scope (which provides access to everything).
This endpoint does not require a user to be logged in. A token obtained via a “client credentials” grant can be combined with the right scope to access it.