Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Update API documentation to reflect changes in common parameters reference and restructure navigation

Bill Yangaff169a7d2b5
diff --git a/docs/content/docs/api/stats/getting-started.mdx b/docs/content/docs/api/getting-started.mdx
similarity index 95%
rename from docs/content/docs/api/stats/getting-started.mdx
rename to docs/content/docs/api/getting-started.mdx
index 08d93b9c7..b693ac32a 100644
--- a/docs/content/docs/api/stats/getting-started.mdx
+++ b/docs/content/docs/api/getting-started.mdx
@@ -4,9 +4,10 @@ description: Authentication, common parameters, and best practices for the Rybbi
---
import { TypeTable } from 'fumadocs-ui/components/type-table';
+import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
<Callout type="warn">
-The Stats API is currently in beta. There may be breaking changes as we continue to improve and expand the API.
+The API is currently in beta. There may be breaking changes as we continue to improve and expand the API.
</Callout>
## Authentication
@@ -354,7 +355,8 @@ The `filters` parameter accepts a JSON-encoded array of filter objects to narrow
#### Filter Examples
-**Single filter:**
+<Tabs items={['Single Filter', 'Multiple Filters', 'Contains', 'Regex', 'Numeric', 'URL-encoded']}>
+ <Tab value="Single Filter">
```json
[
{
@@ -364,8 +366,9 @@ The `filters` parameter accepts a JSON-encoded array of filter objects to narrow
}
]
```
-
-**Multiple filters (AND logic):**
+ </Tab>
+ <Tab value="Multiple Filters">
+Multiple filters use AND logic:
```json
[
{
@@ -380,8 +383,9 @@ The `filters` parameter accepts a JSON-encoded array of filter objects to narrow
}
]
```
-
-**Contains filter (substring match):**
+ </Tab>
+ <Tab value="Contains">
+Substring match:
```json
[
{
@@ -391,8 +395,9 @@ The `filters` parameter accepts a JSON-encoded array of filter objects to narrow
}
]
```
-
-**Regex filter (pattern match):**
+ </Tab>
+ <Tab value="Regex">
+Pattern match:
```json
[
{
@@ -402,8 +407,9 @@ The `filters` parameter accepts a JSON-encoded array of filter objects to narrow
}
]
```
-
-**Numeric comparison (geolocation):**
+ </Tab>
+ <Tab value="Numeric">
+Geolocation comparison:
```json
[
{
@@ -418,11 +424,13 @@ The `filters` parameter accepts a JSON-encoded array of filter objects to narrow
}
]
```
-
-**URL-encoded:**
+ </Tab>
+ <Tab value="URL-encoded">
```
?filters=%5B%7B%22parameter%22%3A%22country%22%2C%22type%22%3A%22equals%22%2C%22value%22%3A%5B%22US%22%5D%7D%5D
```
+ </Tab>
+</Tabs>
---
diff --git a/docs/content/docs/api/meta.json b/docs/content/docs/api/meta.json
index a3f4da784..f62b74823 100644
--- a/docs/content/docs/api/meta.json
+++ b/docs/content/docs/api/meta.json
@@ -1,4 +1,4 @@
{
"title": "API",
- "pages": ["sending-events", "stats"]
+ "pages": ["getting-started", "sending-events", "stats"]
}
diff --git a/docs/content/docs/api/stats/errors.mdx b/docs/content/docs/api/stats/errors.mdx
index 6cab269c2..c9a71bd48 100644
--- a/docs/content/docs/api/stats/errors.mdx
+++ b/docs/content/docs/api/stats/errors.mdx
@@ -53,7 +53,7 @@ Returns a list of unique error messages with occurrence counts and affected sess
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{
@@ -284,7 +284,7 @@ Returns individual error occurrences for a specific error message, with full con
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{
@@ -557,7 +557,7 @@ Returns error occurrence counts over time for a specific error message. Useful f
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{
diff --git a/docs/content/docs/api/stats/events.mdx b/docs/content/docs/api/stats/events.mdx
index afb42ce3d..9ef1e71b5 100644
--- a/docs/content/docs/api/stats/events.mdx
+++ b/docs/content/docs/api/stats/events.mdx
@@ -57,7 +57,7 @@ Returns a paginated list of events (pageviews, custom events, and outbound click
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{
@@ -341,7 +341,7 @@ Returns a list of unique custom event names with their occurrence counts.
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) (time and filters).
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) (time and filters).
### Response
@@ -540,7 +540,7 @@ Returns property key-value pairs for a specific event name with their occurrence
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{
@@ -763,7 +763,7 @@ Returns a list of outbound link clicks with their occurrence counts.
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) (time and filters).
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) (time and filters).
### Response
diff --git a/docs/content/docs/api/stats/funnels.mdx b/docs/content/docs/api/stats/funnels.mdx
index 5bb418e62..3d0eec81a 100644
--- a/docs/content/docs/api/stats/funnels.mdx
+++ b/docs/content/docs/api/stats/funnels.mdx
@@ -295,7 +295,7 @@ Analyzes a funnel and returns step-by-step conversion data. Sessions must comple
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) (time and filters).
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) (time and filters).
### Request Body
@@ -710,7 +710,7 @@ Returns sessions that either reached or dropped off at a specific funnel step. U
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{
diff --git a/docs/content/docs/api/stats/goals.mdx b/docs/content/docs/api/stats/goals.mdx
index f8f1a8299..805aee57a 100644
--- a/docs/content/docs/api/stats/goals.mdx
+++ b/docs/content/docs/api/stats/goals.mdx
@@ -61,7 +61,7 @@ Returns a paginated list of goals with their conversion metrics.
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{
@@ -421,7 +421,7 @@ Returns sessions that completed a specific goal. Useful for analyzing the behavi
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{
diff --git a/docs/content/docs/api/stats/meta.json b/docs/content/docs/api/stats/meta.json
index 6848056bb..4f0e87315 100644
--- a/docs/content/docs/api/stats/meta.json
+++ b/docs/content/docs/api/stats/meta.json
@@ -1,7 +1,6 @@
{
"title": "Stats",
"pages": [
- "getting-started",
"overview",
"sessions",
"events",
diff --git a/docs/content/docs/api/stats/misc.mdx b/docs/content/docs/api/stats/misc.mdx
index 385b19a91..032287dd2 100644
--- a/docs/content/docs/api/stats/misc.mdx
+++ b/docs/content/docs/api/stats/misc.mdx
@@ -328,7 +328,7 @@ Returns the most common page navigation paths (user journeys) within sessions. U
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{
diff --git a/docs/content/docs/api/stats/overview.mdx b/docs/content/docs/api/stats/overview.mdx
index 95b30b56f..a8ab3ab9f 100644
--- a/docs/content/docs/api/stats/overview.mdx
+++ b/docs/content/docs/api/stats/overview.mdx
@@ -57,7 +57,7 @@ Returns high-level analytics metrics for a site.
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) (time and filters).
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) (time and filters).
### Response
@@ -253,7 +253,7 @@ Returns time-series analytics data broken down by configurable time buckets. Use
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{
@@ -498,7 +498,7 @@ Returns dimensional analytics data broken down by a specific parameter. Supports
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{
diff --git a/docs/content/docs/api/stats/performance.mdx b/docs/content/docs/api/stats/performance.mdx
index aa5ad9ebb..5e35312c0 100644
--- a/docs/content/docs/api/stats/performance.mdx
+++ b/docs/content/docs/api/stats/performance.mdx
@@ -65,7 +65,7 @@ Returns aggregate performance metrics with percentile breakdowns for all Core We
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) (time and filters).
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) (time and filters).
### Response
@@ -287,7 +287,7 @@ Returns performance metrics over time, broken down by configurable time buckets.
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{
@@ -518,7 +518,7 @@ Returns performance metrics broken down by a specific dimension (page, country,
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{
diff --git a/docs/content/docs/api/stats/sessions.mdx b/docs/content/docs/api/stats/sessions.mdx
index 542957a84..c5d7d0bbb 100644
--- a/docs/content/docs/api/stats/sessions.mdx
+++ b/docs/content/docs/api/stats/sessions.mdx
@@ -53,7 +53,7 @@ Returns a paginated list of sessions with their analytics data.
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{
@@ -653,7 +653,7 @@ Returns aggregated session locations with coordinates for map visualization.
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) (time and filters).
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) (time and filters).
### Response
diff --git a/docs/content/docs/api/stats/users.mdx b/docs/content/docs/api/stats/users.mdx
index 9d1b36dc6..4169e0ed9 100644
--- a/docs/content/docs/api/stats/users.mdx
+++ b/docs/content/docs/api/stats/users.mdx
@@ -57,7 +57,7 @@ Returns a paginated list of users with their analytics data. Supports filtering
### Query Parameters
-Accepts all [Common Parameters](/docs/api/stats/getting-started#common-parameters) plus the following:
+Accepts all [Common Parameters](/docs/api/getting-started#common-parameters) plus the following:
<TypeTable
type={{