Skip to content
Closed
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
154 changes: 154 additions & 0 deletions analytics.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,55 @@
"hasMore"
]
},
"FeedbackGroupedByPageResponse": {
"type": "object",
"properties": {
"feedback": {
"type": "array",
"description": "List of per-page feedback aggregates.",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "The documentation page path."
},
"thumbsUp": {
"type": "number",
"description": "Number of positive (thumbs up) ratings for the page."
},
"thumbsDown": {
"type": "number",
"description": "Number of negative (thumbs down) ratings for the page."
},
"code": {
"type": "number",
"description": "Number of code snippet feedback entries for the page."
},
"total": {
"type": "number",
"description": "Total number of feedback entries for the page."
}
},
"required": [
"path",
"thumbsUp",
"thumbsDown",
"code",
"total"
]
}
},
"hasMore": {
"type": "boolean",
"description": "Whether additional results are available beyond this page."
}
},
"required": [
"feedback",
"hasMore"
]
},
"AnalyticsErrorResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -483,6 +532,111 @@
}
}
},
"/v1/analytics/{projectId}/feedback/by-page": {
"get": {
"summary": "Get feedback grouped by page",
"description": "Returns feedback counts aggregated by documentation page path, including thumbs up/down for contextual feedback, code snippet count, and total per page",
"tags": [
"Analytics"
],
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"$ref": "#/components/parameters/projectId"
},
{
"schema": {
"type": "string",
"description": "Date in ISO 8601 or YYYY-MM-DD format",
"example": "2024-01-01"
},
"required": false,
"name": "dateFrom",
"in": "query"
},
{
"schema": {
"type": "string",
"description": "Date in ISO 8601 or YYYY-MM-DD format. `dateTo` is an exclusive upper limit. Results include dates before, but not on, the specified date.",
"example": "2024-01-01"
},
"required": false,
"name": "dateTo",
"in": "query"
},
{
"schema": {
"type": "string",
"enum": [
"code_snippet",
"contextual"
],
"description": "Filter by feedback source"
},
"required": false,
"name": "source",
"in": "query"
},
{
"schema": {
"type": "string",
"description": "Comma-separated list of statuses to filter by"
},
"required": false,
"name": "status",
"in": "query"
},
{
"schema": {
"type": "number",
"minimum": 1,
"maximum": 100,
"default": 10,
"description": "Max results per page"
},
"required": false,
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "Per-page feedback aggregates with pagination flag",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FeedbackGroupedByPageResponse"
}
}
}
},
"400": {
"description": "Invalid query parameters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnalyticsErrorResponse"
}
}
}
},
"500": {
"description": "Server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnalyticsErrorResponse"
}
}
}
}
}
}
},
"/v1/analytics/{projectId}/assistant": {
"get": {
"summary": "Get assistant conversations",
Expand Down
28 changes: 28 additions & 0 deletions api/analytics/feedback-by-page.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: "Get feedback by page"
description: "Retrieve feedback counts aggregated by documentation page, including thumbs up/down ratings and code snippet feedback."
openapi: /analytics.openapi.json GET /v1/analytics/{projectId}/feedback/by-page
keywords: ["analytics", "feedback", "export", "aggregated feedback", "by page"]
---

## Usage

Use this endpoint to get an overview of feedback volume across your documentation pages. Results are aggregated per page path and sorted by total feedback count in descending order.

Check warning on line 10 in api/analytics/feedback-by-page.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/analytics/feedback-by-page.mdx#L10

In general, use active voice instead of passive voice ('are aggregated').

Check the `hasMore` field in the response to determine if additional pages of results are available. Increase the `limit` parameter to retrieve more results per request.

## Filtering

Filter feedback aggregates by:
- **Date range**: Use `dateFrom` and `dateTo` to limit results to a specific time period
- **Source**: Filter by `code_snippet` or `contextual` feedback types
- **Status**: Filter by status values like `pending`, `in_progress`, `resolved`, or `dismissed`

## Response fields

Each item in the response represents a documentation page and includes:

- **thumbsUp**: Number of positive (helpful) contextual ratings

Check warning on line 25 in api/analytics/feedback-by-page.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/analytics/feedback-by-page.mdx#L25

Did you really mean 'thumbsUp'?
- **thumbsDown**: Number of negative (not helpful) contextual ratings

Check warning on line 26 in api/analytics/feedback-by-page.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/analytics/feedback-by-page.mdx#L26

Did you really mean 'thumbsDown'?
- **code**: Number of code snippet feedback entries
- **total**: Combined count of all feedback types for the page
5 changes: 3 additions & 2 deletions api/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
keywords: ["REST API", "endpoints", "API keys"]
---

The Mintlify REST (Representational State Transfer) API enables you to programmatically interact with your documentation, trigger updates, embed AI-powered chat experiences, and export analytics data.

Check warning on line 7 in api/introduction.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/introduction.mdx#L7

Spell out 'REST', if it's unfamiliar to the audience.

## Endpoints

Check warning on line 9 in api/introduction.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/introduction.mdx#L9

Use 'endpoints?' instead of 'Endpoints'.

- [Trigger update](/api/update/trigger): Trigger an update of your site when desired.
- [Get update status](/api/update/status): Get the status of an update and other details about your docs.
Expand All @@ -16,6 +16,7 @@
- [Create assistant message](/api/assistant/create-assistant-message-v2): Embed the assistant, trained on your docs, into any application of your choosing.
- [Search documentation](/api/assistant/search): Search through your documentation.
- [Get user feedback](/api/analytics/feedback): Export user feedback from your documentation.
- [Get feedback by page](/api/analytics/feedback-by-page): Export feedback counts aggregated by documentation page.
- [Get assistant conversations](/api/analytics/assistant-conversations): Export AI assistant conversation history.

### Common use cases
Expand All @@ -24,7 +25,7 @@
- **CI/CD integration**: Update documentation as part of your deployment pipeline when code changes with [Trigger update](/api/update/trigger).
- **Custom integrations**: Embed the AI assistant into your product, support portal, or internal tools with [Create assistant message](/api/assistant/create-assistant-message-v2) and [Search documentation](/api/assistant/search).
- **Automated editing**: Use agent jobs to programmatically update documentation at scale with [Create agent job](/api/agent/v2/create-agent-job), [Get agent job](/api/agent/v2/get-agent-job), and [Send follow-up message](/api/agent/v2/send-message).
- **Analytics export**: Export feedback and assistant conversations for external analysis with [Get user feedback](/api/analytics/feedback) and [Get assistant conversations](/api/analytics/assistant-conversations).
- **Analytics export**: Export feedback and assistant conversations for external analysis with [Get user feedback](/api/analytics/feedback), [Get feedback by page](/api/analytics/feedback-by-page), and [Get assistant conversations](/api/analytics/assistant-conversations).

## Authentication

Expand All @@ -34,7 +35,7 @@

### Admin API key

Use the admin API key to authenticate requests to [Trigger update](/api/update/trigger), [Get update status](/api/update/status), [Create agent job](/api/agent/v2/create-agent-job), [Get agent job](/api/agent/v2/get-agent-job), [Send follow-up message](/api/agent/v2/send-message), [Get user feedback](/api/analytics/feedback), and [Get assistant conversations](/api/analytics/assistant-conversations).
Use the admin API key to authenticate requests to [Trigger update](/api/update/trigger), [Get update status](/api/update/status), [Create agent job](/api/agent/v2/create-agent-job), [Get agent job](/api/agent/v2/get-agent-job), [Send follow-up message](/api/agent/v2/send-message), [Get user feedback](/api/analytics/feedback), [Get feedback by page](/api/analytics/feedback-by-page), and [Get assistant conversations](/api/analytics/assistant-conversations).

Admin API keys begin with the `mint_` prefix.

Expand Down
4 changes: 4 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@
"icon": "chart-line",
"pages": [
"api/analytics/feedback",
"api/analytics/feedback-by-page",
"api/analytics/assistant-conversations"
]
}
Expand Down Expand Up @@ -741,6 +742,7 @@
"icon": "chart-line",
"pages": [
"fr/api/analytics/feedback",
"fr/api/analytics/feedback-by-page",
"fr/api/analytics/assistant-conversations"
]
}
Expand Down Expand Up @@ -1111,6 +1113,7 @@
"icon": "chart-line",
"pages": [
"es/api/analytics/feedback",
"es/api/analytics/feedback-by-page",
"es/api/analytics/assistant-conversations"
]
}
Expand Down Expand Up @@ -1481,6 +1484,7 @@
"icon": "chart-line",
"pages": [
"zh/api/analytics/feedback",
"zh/api/analytics/feedback-by-page",
"zh/api/analytics/assistant-conversations"
]
}
Expand Down
Loading
Loading