Server metrics and statistics
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.
Access the API
The REST API is exposed directly from your Collaboration app at your custom URL:
https://YOUR_APP_ID.collab.tiptap.cloud/
Authentication
Authenticate your API requests by including your API secret in the Authorization
header. You can find your API secret in
the settings 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.
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
{
"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.
GET /api/documents/:identifier/statistics
Example: Statistics of a document named :identifier
{
"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.
GET /health
Example: Issue with Redis
HTTP 500:
DB:ok
REDIS:fail
Example: No Redis detected
HTTP 200:
DB:ok
REDIS:inactive