---
title: "Get who viewed each app."
method: GET
path: "/api/export_app_views"
tags: ["Admin"]
---

# Get who viewed each app.

`GET /api/export_app_views`

## Request

- Base URL: `https://app.getdot.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://app.getdot.ai/api/export_app_views`
- Auth: one of:
  - API key in header `X-API-KEY`
  - API key in cookie `Authorization`
  - OAuth 2 (password, token URL `/api/auth/token`)
  - API key in query parameter `user_id+api_token`

Export every app's views, one row per app and viewer.

Every field on each row is documented under the response schema below;
see `AppViewRow`. A view is one open of the app, opens by the same viewer
within 15 minutes count once, and counting starts at `tracking_since`.
Opens by Dot support staff are left out.

## Query parameters

- `include_all_workspaces` boolean: Include app views from all workspaces (main workspace only)

## Response `200`

Successful Response

- ExportAppViewsResponse: Everything returned by `/api/export_app_views`.
  - `tracking_since` string, nullable: UTC timestamp when view counting started for this organization, ISO 8601 format. Views before it were not recorded. With `include_all_workspaces=true`, the earliest start among the included workspaces. Null when nothing has been viewed yet.
  - `views` AppViewRow[], required: One row per app and viewer, plus one row per app for its public-link visitors. Rows are grouped by app, and within an app the most views come first. Archived apps are included; an app nobody has opened since `tracking_since` has no rows.
    - `app_id` string, required: ID of the app, as in its link (`/apps/{app_id}`). Moving the app in Dot, or renaming or moving its folder, gives it a new ID, and its views move with it. Renaming the app keeps its ID.
    - `app_title` string, nullable: Title of the app. Null when no app in Production has this ID any more, for example because the app was deleted or exists only in an environment.
    - `archived` boolean: True when the app is archived: hidden from the Apps list (except under its Archived filter), search and Dot's answers. Its direct links still work for everyone who could open it.
    - `viewer` string, nullable: Email of the person who opened the app. For workspace users this is suffixed with `#{workspace_name}`, like `user_id` in `/api/export_history`. 'deleted' stands for every user who was deleted, or removed from the workspace, after opening the app. Null on the one row per app that counts visitors through a public share or embed link who were not signed in to this organization: they are counted but not named.
    - `views` integer, required: How many times this viewer opened the app since `tracking_since`. A view is one open; opens by the same viewer within 15 minutes of their previous open count once, so a dashboard left open on a wall screen is one view. On the public-link row, all of those visitors share one 15-minute window.
    - `first_viewed_at` string, nullable: UTC timestamp of this viewer's first open, ISO 8601 format. For 'deleted', the earliest open by any of those users.
    - `last_viewed_at` string, nullable: UTC timestamp of this viewer's latest open, ISO 8601 format, including an open within 15 minutes that did not add a view.
    - `workspace_name` string, nullable: Name of the workspace the app belongs to ('Main Workspace' for the main organization). Only populated when the export was requested with `include_all_workspaces=true`.
    - `workspace_org_id` string, nullable: Org ID of the workspace the app belongs to (e.g. 'getdot.ai-w-cause'). Only populated when the export was requested with `include_all_workspaces=true`.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/getdot/apis/dot-api-2.md) · [All operations](https://skmtc.dev/getdot/apis/dot-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/getdot/apis/dot-api-2/revisions/d26fe7163a7f?raw)
