Product Metrics (Public API)
User and project metrics for the API key’s workspace. Same data as v1 product-metrics; workspace is derived from the API key.
Get user metrics
GET /api/v2/product-metrics/user
Returns user metrics for the API key’s workspace in the given date range. Query: startDate, endDate (ISO 8601), optional offset, limit, sortBy, sortDirection.
curl "https://api.markup.io/api/v2/product-metrics/user?startDate=some+startDate&endDate=some+endDate" \
-X GET \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" {
"data": {
"rows": {},
"totalRows": 123
}
}Response Body UserMetricsResponse
| Option | Type | |
|---|---|---|
| rows | Array | |
| totalRows | number |
Request Query Params MetricsQuery
| Option | Type | |
|---|---|---|
| startDate | string | |
| endDate | string | |
| offset optional | number | |
| limit optional | number | |
| sortBy optional | string |
Get project metrics
GET /api/v2/product-metrics/project
Returns project metrics for the API key’s workspace in the given date range. Query: startDate, endDate (ISO 8601), optional offset, limit, sortBy, sortDirection.
curl "https://api.markup.io/api/v2/product-metrics/project?startDate=some+startDate&endDate=some+endDate" \
-X GET \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" {
"data": {
"rows": {},
"totalRows": 123
}
}Response Body ProjectMetricsResponse
| Option | Type | |
|---|---|---|
| rows | Array | |
| totalRows | number |
Request Query Params MetricsQuery
| Option | Type | |
|---|---|---|
| startDate | string | |
| endDate | string | |
| offset optional | number | |
| limit optional | number | |
| sortBy optional | string |
Get user metrics workspace totals
GET /api/v2/product-metrics/user/workspace-totals
Returns workspace-level user metrics totals for the date range. Query: startDate, endDate (ISO 8601).
curl "https://api.markup.io/api/v2/product-metrics/user/workspace-totals?startDate=some+startDate&endDate=some+endDate" \
-X GET \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" {
"data": {
"workspaceId": "some workspaceId",
"lastActivity": "some lastActivity",
"activeUsers": 123,
"projectsCreated": 123,
"commentsCreated": 123,
"threadsResolved": 123
}
}Response Body UserMetricsWorkspaceTotalsResponse
| Option | Type | |
|---|---|---|
| workspaceId | string | |
| lastActivity | string | |
| activeUsers | number | |
| projectsCreated | number | |
| commentsCreated | number | |
| threadsResolved | number |
Request Query Params WorkspaceTotalsQuery
| Option | Type | |
|---|---|---|
| startDate | string | |
| endDate | string |
Get project metrics workspace totals
GET /api/v2/product-metrics/project/workspace-totals
Returns workspace-level project metrics totals for the date range. Query: startDate, endDate (ISO 8601).
curl "https://api.markup.io/api/v2/product-metrics/project/workspace-totals?startDate=some+startDate&endDate=some+endDate" \
-X GET \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" {
"data": {
"workspaceId": "some workspaceId",
"lastActivity": "some lastActivity",
"commentsCreated": 123,
"threadsResolved": 123,
"threadsUnresolved": 123
}
}Response Body ProjectMetricsWorkspaceTotalsResponse
| Option | Type | |
|---|---|---|
| workspaceId | string | |
| lastActivity | string | |
| commentsCreated | number | |
| threadsResolved | number | |
| threadsUnresolved | number |
Request Query Params WorkspaceTotalsQuery
| Option | Type | |
|---|---|---|
| startDate | string | |
| endDate | string |
Get last user metrics update
GET /api/v2/product-metrics/user/last-updated
Returns the timestamp of the last user metrics update for the workspace.
curl "https://api.markup.io/api/v2/product-metrics/user/last-updated" \
-X GET \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" {
"data": {}
}Response Body - WorkspaceLastUpdatedResponse
Get last project metrics update
GET /api/v2/product-metrics/project/last-updated
Returns the timestamp of the last project metrics update for the workspace.
curl "https://api.markup.io/api/v2/product-metrics/project/last-updated" \
-X GET \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" {
"data": {}
}Response Body - WorkspaceLastUpdatedResponse
Related types
WorkspaceLastUpdatedResponse
| Option | Type |
|---|