---
title: "Server metrics and statistics"
description: "Access server and document statistics of your Tiptap Document server. Learn more in our docs!"
canonical_url: "https://tiptap.dev/docs/collaboration/operations/metrics"
---

# Server metrics and statistics

Access server and document statistics of your Tiptap Document server. Learn more in our docs!

The Tiptap Collaboration API offers several endpoints to access real-time statistics and health information for both the server and individual documents. A simplified version of the metrics is also available in the cloud dashboard.

These endpoints help to troubleshoot issues, monitor server performance, or build analytics dashboards for insights into user interactions and system status. Integrating statistics into your monitoring systems allows you to proactively manage your collaboration environment's health.

> **Review the postman collection:**
>
> Experiment with the REST API by visiting our [Postman
> Collection](https://www.postman.com/tiptap-platform/workspace/tiptap-workspace/request/33042171-1adccc70-772c-464a-8602-1303659f9af6).

## Access the API

The REST API is exposed directly from your Document server at your custom URL:

```bash
https://YOUR_APP_ID.collab.tiptap.cloud/
```

Replace `YOUR_APP_ID` with your document server ID, which is labeled "Document server ID" in the [Cloud dashboard](https://cloud.tiptap.dev/v2/configuration/document-server).

### Authentication

Authenticate your API requests by including your API secret in the `Authorization` header. You can find your API secret in
the [settings](https://cloud.tiptap.dev/v2/configuration/document-server) of your Tiptap Cloud dashboard.

### Document identifiers

If your document identifier contains a slash (`/`), encode it as `%2F`, e.g., using `encodeURIComponent`.

## Server statistics endpoint

This endpoint provides basic statistics about the Tiptap Collaboration server, offering insights into overall activity and usage metrics.

```bash
GET /api/statistics
```

> **Caution:**
>
> The total number of connections in the last 30 days and the lifetime connection count are
> presented as strings due to their internal representation as BigInt values.

**Example:** Server statistics

```json
{
  "totalDocuments": 4,
  "totalConnections30d": "3",
  "maxConcurrentConnections30d": 3,
  "lifetimeConnections": "144",
  "currentConnectionsCount": 3,
  "currentLoadedDocumentsCount": 1,
  "openDocuments": ["testdocument"],
  "connectionsPerDocument": {
    "testdocument": 3
  },
  "version": "3.33.0"
}
```

## Document statistics endpoint

Retrieve statistics for a specific document by its identifier. Use this endpoint to monitor real-time user engagement with a document.

```bash
GET /api/documents/:identifier/statistics
```

**Example:** Statistics of a document named :identifier

```json
{
  "currentConnections": 2,
  "connectedIps": ["127.0.0.1", "10.100.1.23"]
}
```

## Server health endpoint

Use this call to check liveness, readiness, and cconnectivity to essential components like the database and Redis.

```bash
GET /health
```

**Example:** Issue with Redis

```bash
HTTP 500:

DB:ok
REDIS:fail
```

**Example:** No Redis detected

```bash
HTTP 200:

DB:ok
REDIS:inactive
```
