Stats

Site directory with per-site stats

Admin-only site directory, offset-paged via page + pageSize and sorted server-side (across every matching site, not just the returned page) via sortBy + sortDir — defaults to newest-created first. Each row carries the owning account name + email, owner user id + plan, content stats, and trailing-30-day traffic and a daily pageview sparkline. Optionally filtered by status and by a search term (subdomain, owner email, account name or custom hostname); total/totalPages reflect the filters. Row-level and names the owning account, so admin-only. Served from a short server-side cache (keyed per filter + sort + page).

get/stats/sites

Request

  • Base URL: https://api.nippy.host
  • URL: https://api.nippy.host/stats/sites
  • Auth: bearer (a scheme the document does not define)

Query parameters

status'live' | 'inactive' | 'suspended' | 'awaiting_verification'

Filter the directory to a single lifecycle status. Omit to return all non-pending sites. total always reflects the count matching this filter.

searchstring

Case-insensitive substring match against the subdomain, the owner email, the account name or an attached custom hostname. SQL wildcards in the input are treated literally.

pagenumber

1-based page number.

pageSizenumber

Rows per page.

sortBy'created' | 'pageviews' | 'visitors' | 'lastPublished'

Column to sort the directory by, across every matching site.

sortDir'asc' | 'desc'

Sort direction.

Response

totalnumber required

Total number of sites matching the status filter.

pagenumber required

1-based page number this response covers.

pageSizenumber required

Rows per page used for this response.

totalPagesnumber required

Total number of pages at this page size (always ≥ 1).

windowDaysnumber required

Trailing window the traffic figures and sparkline cover.

Example response

{
  "sites": [
    {
      "subdomain": "my-site",
      "url": "https://my-site.nippy.site",
      "viewsSeries": [
        0,
        0,
        1,
        3,
        2,
        0,
        5
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.