Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs-drift-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,6 @@

# Internal helper for the Data Manager dashboard view: lists metadata of the internal view event only.
/o/data-manager/events/internal

# Dev-only debug endpoint (the code comment says so): returns the raw journey graph, block logs and pending waits of one user for a debug visualization.
/o/journey-engine/user-status
1 change: 1 addition & 0 deletions docs/api/core/system/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ System endpoints expose operational runtime information for Countly, including v
- [Kafka Events List](./o-system-kafka-events.md) - `/o/system/kafka/events`
- [Kafka Events Meta Read](./o-system-kafka-events-meta.md) - `/o/system/kafka/events/meta`
- [Observability Read](./o-system-observability.md) - `/o/system/observability`
- [User Sync History Read](./o-system-usersync.md) - `/o/system/usersync`

## Configuration & Settings

Expand Down
106 changes: 106 additions & 0 deletions docs/api/core/system/o-system-usersync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
sidebar_label: "User Sync History"
keywords:
- "/o/system/usersync"
- "usersync"
- "system"
last_update:
date: "2026-10-23"
---

# System - User Sync History Read

## Endpoint

```plaintext
/o/system/usersync
```

## Overview

Returns the recent user sync history of an app, or of all apps together. Each record shows how long the user sync lagged at one run, and how many users it processed.

## Authentication

Pass `api_key` or `auth_token` as a query parameter, or send `countly-token` as a header. See [Authentication](../../index.md#authentication).

## Permissions

- Requires authenticated dashboard user access to management-read endpoints.

## Request Parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `api_key` | String | Yes (or use `auth_token`) | Dashboard API key. |
| `auth_token` | String | Yes (or use `api_key`) | Dashboard auth token. |
| `app` | String | No | App id. Defaults to `all`, which returns the records of all apps combined. |

## Examples

### Read the combined history of all apps

```plaintext
/o/system/usersync?api_key=YOUR_API_KEY
```

### Read the history of one app

```plaintext
/o/system/usersync?api_key=YOUR_API_KEY&app=6991c75b024cb89cdc04efd2
```

## Response

### Success Response

```json
{
"data": [
{
"a": "all",
"ts": 1771326000000,
"avg": 12.5,
"max": 40,
"median": 10,
"u": 1500
}
],
"app": "all"
}
```

### Response Fields

| Field | Type | Description |
|---|---|---|
| `data` | Array | History records of the requested app. |
| `data[].a` | String | App id, or `all` for the combined record. |
| `data[].ts` | Number or Date | Time of the sync run. |
| `data[].lag` | Number or Null | Sync lag of the run. Present in app records. |
| `data[].avg` | Number or Null | Average lag across apps. Present in `all` records. |
| `data[].max` | Number or Null | Maximum lag across apps. Present in `all` records. |
| `data[].median` | Number or Null | Median lag across apps. Present in `all` records. |
| `data[].u` | Number | Number of users processed in the run. |
| `app` | String | The requested app id, or `all`. |

## Behavior

- `data` is empty when no records exist for the requested `app`.
- Records are removed automatically after 24 hours.

## Related Endpoints

- [Kafka Status Read](./o-system-kafka.md)
- [Aggregator Status Read](./o-system-aggregator.md)

<details>
<summary>Implementation details</summary>

**Database Collections**

| Collection | Used for | Data touched by this endpoint |
|---|---|---|
| `countly.app_users_sync_history` | Source for user sync history records. | Reads records of the requested app. |

</details>
2 changes: 2 additions & 0 deletions docs/api/heatmaps/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ The Heatmaps feature shows where users click on the pages of your web app.
## Endpoints

- [Heatmaps - Domains Read](./o-heatmaps-domains.md) - `/o/heatmaps/domains`
- [Heatmaps - Metrics Read](./o-heatmaps-metrics.md) - `/o/heatmaps/metrics`
- [Heatmaps - Views Read](./o-heatmaps-views.md) - `/o/heatmaps/views`
72 changes: 72 additions & 0 deletions docs/api/heatmaps/o-heatmaps-metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
sidebar_label: "Metrics Read"
keywords:
- "/o/heatmaps/metrics"
- "heatmaps"
- "metrics"
last_update:
date: "2026-10-23"
---

# Heatmaps - Metrics Read

## Endpoint

```plaintext
/o/heatmaps/metrics
```

## Overview

Returns the total number of clicks (`t`) and the total scrolling value (`scr`) recorded by heatmaps in an app for a period.

## Authentication

Pass `api_key` or `auth_token` as a query parameter, or send `countly-token` as a header. See [Authentication](../index.md#authentication).

## Permissions

Requires `heatmaps` `Read` permission.

## Request Parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `api_key` | String | Conditional | Required if `auth_token` is not provided. |
| `auth_token` | String | Conditional | Required if `api_key` is not provided. |
| `app_id` | String | Yes | App id. |
| `period` | String | No | Period to read, for example `30days`, `7days` or a JSON array of two timestamps. Defaults to `30days`. |
| `segment` | String | No | View segment name. Defaults to no segment. |
| `segmentVal` | String | No | Value of the view segment. |

## Examples

### Read the metrics of an app

```plaintext
/o/heatmaps/metrics?api_key=YOUR_API_KEY&app_id=6991c75b024cb89cdc04efd2&period=30days
```

## Response

### Success Response

```json
{
"_id": null,
"t": 120,
"scr": 45
}
```

### Response Fields

| Field | Type | Description |
|---|---|---|
| `_id` | Null | Always `null`. |
| `t` | Number | Sum of the `t` values for the period. |
| `scr` | Number | Sum of the `scr` values for the period. |

## Behavior

- When there is no data for the period, `t` and `scr` are `0`.
101 changes: 101 additions & 0 deletions docs/api/heatmaps/o-heatmaps-views.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
sidebar_label: "Views Read"
keywords:
- "/o/heatmaps/views"
- "heatmaps"
- "views"
last_update:
date: "2026-10-23"
---

# Heatmaps - Views Read

## Endpoint

```plaintext
/o/heatmaps/views
```

## Overview

Returns the views of an app that have at least one recorded click, with their click (`t`) and scrolling (`scr`) values for a period. The response is in the table format used by the dashboard.

## Authentication

Pass `api_key` or `auth_token` as a query parameter, or send `countly-token` as a header. See [Authentication](../index.md#authentication).

## Permissions

Requires `heatmaps` `Read` permission.

## Request Parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `api_key` | String | Conditional | Required if `auth_token` is not provided. |
| `auth_token` | String | Conditional | Required if `api_key` is not provided. |
| `app_id` | String | Yes | App id. |
| `period` | String | No | Period to read, for example `30days`, `7days` or a JSON array of two timestamps. Defaults to `30days`. |
| `segment` | String | No | View segment name. Defaults to no segment. |
| `segmentVal` | String | No | Value of the view segment. |
| `iSortCol_0` | Number | No | Index of the column to sort by: `0` for name, `1` for `scr`, `2` for `t`. Used together with `sSortDir_0`. Without both, rows are sorted by `t` in descending order. |
| `sSortDir_0` | String | No | Sort direction, `asc` or `desc`. |
| `iDisplayStart` | Number | No | Number of rows to skip. |
| `iDisplayLength` | Number | No | Number of rows to return. When not set or `-1`, all rows are returned. |
| `sSearch` | String | No | Case-insensitive search text matched against the view name. |
| `sEcho` | String | No | Value returned unchanged as `sEcho` in the response. |

## Examples

### Read the views of an app

```plaintext
/o/heatmaps/views?api_key=YOUR_API_KEY&app_id=6991c75b024cb89cdc04efd2&period=30days&iDisplayStart=0&iDisplayLength=10
```

## Response

### Success Response

```json
{
"sEcho": "1",
"iTotalRecords": 1,
"iTotalDisplayRecords": 1,
"aaData": [
{
"_id": "6991c75b024cb89cdc04efd3",
"t": 120,
"scr": 45,
"view": "/home",
"url": "https://example.com/home",
"display": "/home"
}
]
}
```

### Response Fields

| Field | Type | Description |
|---|---|---|
| `sEcho` | String | The `sEcho` value from the request. |
| `iTotalRecords` | Number | Total number of rows. |
| `iTotalDisplayRecords` | Number | Total number of rows. |
| `aaData` | Array | Rows, one per view. |

Each row in `aaData` contains:

| Field | Type | Description |
|---|---|---|
| `_id` | String | View id. |
| `t` | Number | Click value for the period. |
| `scr` | Number | Scrolling value for the period. |
| `view` | String | View name, when known. |
| `url` | String | View URL, when known. |
| `display` | String | Display name of the view, when known. |

## Behavior

- Only views with `t` greater than `0` are returned.
- When there is no data, `aaData` is an empty array.
1 change: 1 addition & 0 deletions docs/api/hooks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The Hooks feature lets you automate actions when Countly events or schedules mat
- [Hooks - Update Status](./i-hook-status.md)
- [Hooks - Delete](./i-hook-delete.md)
- [Hooks - Test](./i-hook-test.md)
- [Hooks - API Endpoint Trigger](./o-hooks.md)

## Key Capabilities

Expand Down
63 changes: 63 additions & 0 deletions docs/api/hooks/o-hooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
sidebar_label: "API Endpoint Trigger"
keywords:
- "/o/hooks"
- "hooks"
- "api endpoint trigger"
last_update:
date: "2026-10-23"
---

# Hooks - API Endpoint Trigger

## Endpoint

```text
/o/hooks/{path}
```

## Overview

Runs a hook that uses the API endpoint trigger. `{path}` is the path configured in the hook's trigger. Every query parameter of the request is passed to the hook's effects.

## Authentication

The handler does not check `api_key` or `auth_token`; the hook is selected by `{path}` only. Anyone who knows the path can call it, so treat the path as a secret.

## Permissions

The handler does not validate a permission.

## Request Parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `{path}` | String | Yes | Path segment after `/o/hooks/`, matching the `path` of the hook's API endpoint trigger. |
| any other query parameter | Any | No | Passed to the hook's effects as request data. |

## Examples

### Trigger a hook

```text
/o/hooks/my-hook-path?user=john
```

## Response

### Success Response

```json
"ok"
```

## Behavior

- The response is `"ok"` whether or not a hook matches `{path}`.
- If no enabled hook uses `{path}`, nothing is run.
- If several hooks use the same path, only the oldest hook is run.

## Related Endpoints

- [Hooks - Save](i-hook-save.md)
- [Hooks - Test](i-hook-test.md)
4 changes: 4 additions & 0 deletions docs/api/journey_engine/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The feature uses config stored in the `plugins` document:
- [Pause Journey](journey-engine-journeys-pause.md) - `/i/journey-engine/journeys/pause`
- [Resume Journey](journey-engine-journeys-resume.md) - `/i/journey-engine/journeys/resume`
- [Approve Journey](journey-engine-approve.md) - `/i/journey-engine/approve`
- [Approval Queue](journey-engine-approval-queue.md) - `/o/journey-engine/approval-queue`

### Versions
- [List Versions](journey-engine-versions-list.md) - `/o/journey-engine/versions/list`
Expand All @@ -50,13 +51,16 @@ The feature uses config stored in the `plugins` document:
- [Performance Over Time](journey-engine-stats-performance.md) - `/o/journey-engine/stats/performance`
- [Active Users](journey-engine-stats-active-users.md) - `/o/journey-engine/stats/active-users`
- [Active Users Detail](journey-engine-stats-active-users-detail.md) - `/o/journey-engine/stats/active-users/detail`
- [Content Interaction Stats](journey-engine-stats-content.md) - `/o/journey-engine/stats/content`

### Logs & Instances
- [Journey Instances](journey-engine-journey-instances-list.md) - `/o/journey-engine/journey-instances/list`
- [Journey Logs](journey-engine-journey-logs-list.md) - `/o/journey-enginge/journey-logs/list`
- [Journey Block Logs](journey-engine-journey-block-logs-list.md) - `/o/journey-engine/journey-block-logs/list`

### Utilities
- [Settings](journey-engine-settings.md) - `/o/journey-engine/settings`
- [User Content](journey-engine-user-content.md) - `/o/journey-engine/user-content`
- [Create Custom Event](journey-engine-event-create.md) - `/i/journey-engine/event`
- [Debug Journey (Admin)](journey-engine-debug.md) - `/o/journey-engine/debug`

Expand Down
Loading
Loading