Server metrics and statistics
The Tiptap Collaboration API provides several endpoints to access real-time statistics and health information for both the server and individual documents.
These endpoints should help to troubleshoot issues, monitor server performance, or build analytics dashboards that provide insights into user interactions and system status.
By integrating these statistics into your monitoring systems, you can proactively manage the health of your collaboration environment.
Review the postman collection
You can also experiment with the REST API by heading over to our Postman Collection.
Access the API
The REST API is exposed directly from your Collaboration app, available at your custom URL:
https://YOUR_APP_ID.collab.tiptap.cloud/
Authentication is done using an API secret which you can find in
the settings of your Collaboration app. The secret must be sent as
an Authorization
header.
If your document identifier contains a slash (/
), just make sure to 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.
GET /api/statistics
Example Response
Caution
The total number of connections of the last 30 days and the lifetime connection count are presented as strings due to their representation as BIGINT internally.
{
"totalDocuments": 4,
"totalConnections30d": "3",
"maxConcurrentConnections30d": 3,
"lifetimeConnections": "144",
"currentConnectionsCount": 3,
"currentLoadedDocumentsCount": 1,
"openDocuments": ["testdocument"],
"connectionsPerDocument": {
"testdocument": 3
},
"version": "3.9.2"
}
Document statistics endpoint
Retrieve statistics for a specific document by its identifier. This endpoint is useful for monitoring the real-time engagement of users with a document.
GET /api/documents/:identifier/statistics
Example Response
{
"currentConnections": 2,
"connectedIps": ["127.0.0.1", "10.100.1.23"]
}
Server Health Endpoint
Use this endpoint for liveness and readiness checks, or to manually verify the health of the server. It checks connectivity to essential components like the database and Redis.
GET /health
Example Responses
When there is an issue with Redis:
HTTP 500:
"DB":ok
"REDIS":fail
When Redis is not active:
HTTP 200:
"DB":ok
"REDIS":inactive