Skip to main content
GET
/
v1
/
analytics
/
vault
Get vault analytics
curl --request GET \
  --url https://api.oneofnone.io/v1/analytics/vault \
  --header 'x-api-key: <api-key>'
{
  "meta": {
    "pageviews": 1,
    "sessions": 1,
    "unique_visitors": 1,
    "avg_session_duration": 123,
    "bounce_rate": 123
  },
  "timeseries": [
    {
      "date": "<string>",
      "pageviews": 123,
      "sessions": 123,
      "unique_visitors": 123,
      "avg_session_duration": 123,
      "bounce_rate": 123
    }
  ],
  "top_pages": [
    {
      "name": "<string>",
      "pageviews": 123,
      "sessions": 123,
      "unique_visitors": 123
    }
  ],
  "top_referrers": [
    {
      "name": "<string>",
      "pageviews": 123,
      "sessions": 123,
      "unique_visitors": 123
    }
  ],
  "top_collections": [
    {
      "collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "pageviews": 1,
      "sessions": 1,
      "unique_visitors": 1,
      "collection": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "slug": "<string>",
        "type": "<string>",
        "image_url": "<string>"
      }
    }
  ]
}

Authorizations

x-api-key
string
header
required

The API key required for accessing protected routes. It should be included in the request headers as x-api-key.

Query Parameters

team_id
string

Filter by team ID. One of team_id, team_slug, team_ids, or team_slugs required.

team_slug
string

Filter by team slug.

team_ids
string

Comma-separated team IDs. Mutually exclusive with team_id/team_slug.

team_slugs
string

Comma-separated team slugs. Mutually exclusive with team_id/team_slug.

date_from
string<date>
required

The start date for the analytics in ISO 8601 format (e.g., "2024-09-01"). Required.

date_to
string<date>

The end date for the analytics in ISO 8601 format (e.g., "2024-09-30"). If not provided, defaults to current date.

aggregation
enum<string>
default:daily

The aggregation level for the data.

Available options:
daily,
weekly,
monthly,
quarterly,
yearly
collection_id
string<uuid>

The collection ID to filter by.

collection_slug
string

The collection slug to filter by.

token_id
integer

The token ID to filter by.

Required range: x >= 1
pathname
string

The page path to filter by.

referrer
string

The referrer to filter by.

country_code
string

The country code to filter by.

region_code
string

The region code to filter by.

device
enum<string>

The device type to filter by.

Available options:
mobile,
tablet,
desktop,
all
browser
string

The browser to filter by.

os
string

The operating system to filter by.

order_by
enum<string>

The field to order by.

Available options:
date,
sessions,
pageviews,
unique_visitors,
avg_session_duration
order
enum<string>

The sort order (ascending or descending).

Available options:
asc,
desc
limit
integer
default:50

The number of results per page.

Required range: x >= 1
offset
integer
default:0

The offset for pagination.

Required range: x >= 0

Response

Successfully fetched vault analytics.

Structured vault/analytics response (BFF pattern).

meta
object
required
timeseries
object[]
required
top_pages
object[]
required
top_referrers
object[]
required
top_collections
object[]
required