# Reports and data API

Query support performance reports, read workspace audit logs, and create or download workspace data exports through the dimmi JSON REST API.

## Audit logs

- `GET /audit-logs` - List the audit log: Lists who changed what in the workspace: sign-ins, role and member changes, invitations, tokens and settings, newest first. It shows other people's activity and addresses, so use it only for a question the person asked. Returns a page of entries with event, actor, subject, changes and time, and next_cursor for more.
- `GET /audit-logs/{audit_log}` - Get an audit log entry: Reads one entry of the audit log, with the IP address, browser and request it came from. Returns the entry with event, actor, subject, changes, ip, user_agent and time.

## Data exports

- `GET /data-exports` - List my data exports: Lists the exports you started, with where each stands. Other members' exports never show. Returns your exports, newest first, with status pending, running, ready, failed or expired.
- `POST /data-exports` - Export conversations, contacts or the whole workspace: Starts building a file of conversations or contacts, or one archive of the whole workspace, in the background. Each export belongs to you alone. For a privacy request about one customer, use POST /contacts/{contact}/exports instead. Returns the export with status pending; poll it until ready.
- `GET /data-exports/{data_export}` - Get a data export: Reads one of your exports: its status, row count, warnings and, once ready, when it expires. Returns the export.
- `GET /data-exports/{data_export}/link` - Get a download link for a data export: Signs a link a ready export's file downloads from for a few minutes, without credentials. Use it for a workspace export, which is too large to fetch as content. Whoever holds the link can download the file, so give it only to the person. Returns the link and when it stops working.
- `GET /data-exports/{data_export}/download` - Download a data export: Fetches a ready export's file: one file as it is, or several as a zip. It can hold many customers' personal data, so fetch it only for the person and never pass it on. Returns the file's content.
- `DELETE /data-exports/{data_export}` - Delete a data export: Deletes one of your exports and its file at once, instead of waiting for it to expire.

## Reports

- `GET /reports` - List reports: Lists the reports the caller may read: overview, responsiveness, resolution, team, live workload, satisfaction, AI, help center and any others the workspace has. Returns each report's key, title and one line about it, and whether it shows the present instead of a range.
- `GET /reports/workflows` - Report on workflows: Compares every workflow that ran over a period: runs started, completed, handed to a person, failed, and how many reached the workflow's goal. Returns one row per workflow with its counts, the busiest first.
- `GET /reports/procedures` - Report on procedures: Compares every procedure's runs, completions and handovers over a period. Returns one row per procedure with its counts and rates.
- `GET /reports/tickets/sla` - Report service level attainment: Shows, per SLA policy and target, the clocks that ended in the range met or breached and the share met. Returns per policy and target: met, breached, hit rate in percent and mean seconds to meet.
- `GET /reports/tickets/by-type` - Report tickets by type: Counts each type's tickets created and resolved in the range, and open now. Returns per type: created, resolved and open.
- `GET /reports/tickets/by-field` - Report tickets by field: Splits a type's tickets created in the range by the values of one field, such as refund reasons or bug severity. Each choice of a multiple choice field counts once. Returns the field and, per value (null for none), tickets and how many are resolved.
- `GET /reports/tickets/trackers` - Report tracker impact: Ranks the trackers open in the range, or resolved in it, by the monthly revenue of the companies whose conversations they gather, then by conversations. Returns trackers with conversations, those linked in the range, customers, companies and revenue.
- `GET /reports/tickets/time-in-state` - Report time in state: Shows how long tickets created in the range spent in each state, per type, to find where work waits. Time resolved is left out; a state still held counts up to now. Returns per type and state: tickets, mean, median and 90th percentile seconds.
- `GET /reports/{report}/conversations` - List the conversations behind a number: Lists the conversations one of a report's numbers counts, with the same range and filters, each with the value it added. Stops at ten thousand. Returns the conversations with number, subject, status, channel, start, close, assignee and value, slowest or newest first, and how many there are.
- `GET /reports/{report}` - Read a report: Reads one report for a range of days in the workspace's time zone, counting only conversations the caller may see. Durations are medians in seconds with the 90th percentile and mean beside them. Spam, test, deleted and merged-away conversations never count. Returns the headline numbers, each with its unit, value, value in the period before when compare is set, sample size and the metric that lists its conversations; and the charts as series or tables.

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
