Skip to content

API reference

Get site analytics realtime

analytics.GetSiteAnalyticsRealtimeReadAPI key

Read the number of distinct recent visitors to a hosted website. window_ms identifies the time interval covered.

POST/v1/operations/analytics.GetSiteAnalyticsRealtime
On this page

Access & visibility

Allow analytics.GetSiteAnalyticsRealtime on your API key.

Workspace access by default. Private member data requires approved member delegation through Brigg-Act-As; the key supplies permissions while private ownership and project boundaries remain enforced.

Set up authentication · Choose permissions

Request fields

Send a JSON object with the following fields. Required fields must be included; omit optional fields you do not need.

bundle_idstringRequired

Select a website and use its content_id. This is the website identity, not a domain hostname or workspace ID. workspace.ListBundles.

At least 1 character.

Response

Returns 200 OK with a JSON body.

bundle_idstringRequired

Bundle identifier.

visitorsnumberRequired

Distinct visitors during the recent window_ms interval. Unlike multi-day summaries, this is deduplicated within that live window.

window_msnumberRequired

Window ms, in milliseconds.

Errors & retries

This operation reads data. It needs no idempotency key and can be retried after a transient failure.

For rate limits, follow the server’s retry guidance and back off. See HTTP errors and safe retries and limits.

HTTP status Code What to do
400 invalid_json Send a JSON object with Content-Type: application/json.
400 invalid_input Check the request fields and types.
401 invalid_key The workspace API key is missing, invalid or revoked.
403 forbidden Check the key’s operation and resource grants. If Brigg-Act-As is supplied, the key must be authorized to delegate to that member.
404 not_found The requested operation or resource is not available to this credential.
429 rate_limited Wait for Retry-After before retrying.

Next steps

Download OpenAPI · Versioning & retirement

JSON schemas

Use the complete schemas for validation or client generation.

Full request JSON schema
{
  "type": "object",
  "properties": {
    "bundle_id": {
      "type": "string",
      "minLength": 1,
      "description": "Select a website and use its content_id. This is the website identity, not a domain hostname or workspace ID. [workspace.ListBundles](/reference/workspace/ListBundles)."
    }
  },
  "required": [
    "bundle_id"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "bundle_id": "e_example"
    }
  ]
}
Full response JSON schema
{
  "type": "object",
  "properties": {
    "bundle_id": {
      "type": "string",
      "description": "Bundle identifier."
    },
    "visitors": {
      "type": "number",
      "description": "Distinct visitors during the recent window_ms interval. Unlike multi-day summaries, this is deduplicated within that live window."
    },
    "window_ms": {
      "type": "number",
      "description": "Window ms, in milliseconds."
    }
  },
  "required": [
    "bundle_id",
    "visitors",
    "window_ms"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "bundle_id": "e_example",
      "visitors": 12,
      "window_ms": 300000
    }
  ]
}

Search by operation name or what you want to build.

Use arrow keys to browse. Enter opens a result.