{ "info": { "description": "Composite OpenAPI source bundle generated for an A2APack agent.", "title": "OpenPanel Admin API Composite", "version": "1.0.0" }, "openapi": "3.1.0", "paths": {}, "servers": [ { "url": "https://analytics.a2acloud.io/api" } ], "x-a2a-composite-openapi": true, "x-a2a-sources": [ { "index": 1, "openapi": { "components": { "schemas": {} }, "info": { "title": "OpenPanel Admin API", "version": "1.0.0" }, "openapi": "3.1.0", "paths": { "/manage/clients": { "get": { "description": "List all API clients for the organization, optionally filtered by project.", "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] }, "post": { "description": "Create a new API client (read, write, or root type) and return its generated secret.", "requestBody": { "content": { "application/json": { "schema": { "properties": { "name": { "minLength": 1, "type": "string" }, "projectId": { "type": "string" }, "type": { "default": "write", "enum": [ "read", "write", "root" ], "type": "string" } }, "required": [ "name" ], "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] } }, "/manage/clients/{id}": { "delete": { "description": "Delete an API client.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] }, "get": { "description": "Get a single API client by ID.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] }, "patch": { "description": "Update an API client name.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "properties": { "name": { "minLength": 1, "type": "string" } }, "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] } }, "/manage/projects": { "get": { "description": "List all projects for the organization.", "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] }, "post": { "description": "Create a new project and its first write client.", "requestBody": { "content": { "application/json": { "schema": { "properties": { "cors": { "default": [], "items": { "type": "string" }, "type": "array" }, "crossDomain": { "default": false, "type": "boolean" }, "domain": { "anyOf": [ { "anyOf": [ { "format": "uri", "type": "string" }, { "const": "", "type": "string" } ] }, { "type": "null" } ] }, "name": { "minLength": 1, "type": "string" }, "types": { "default": [], "items": { "enum": [ "website", "app", "backend" ], "type": "string" }, "type": "array" } }, "required": [ "name" ], "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] } }, "/manage/projects/{id}": { "delete": { "description": "Soft-delete a project (scheduled for removal in 24 hours).", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] }, "get": { "description": "Get a single project by ID.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] }, "patch": { "description": "Update project settings (name, domain, CORS, tracking options).", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "properties": { "allowUnsafeRevenueTracking": { "type": "boolean" }, "cors": { "items": { "type": "string" }, "type": "array" }, "crossDomain": { "type": "boolean" }, "domain": { "anyOf": [ { "anyOf": [ { "format": "uri", "type": "string" }, { "const": "", "type": "string" } ] }, { "type": "null" } ] }, "name": { "minLength": 1, "type": "string" } }, "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] } }, "/manage/projects/{projectId}/dashboards": { "get": { "description": "List all dashboards for a project.", "parameters": [ { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] } }, "/manage/projects/{projectId}/dashboards/{dashboardId}/reports": { "get": { "description": "List all reports in a dashboard.", "parameters": [ { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "dashboardId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] } }, "/manage/references": { "get": { "description": "List annotation references for a project.", "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] }, "post": { "requestBody": { "content": { "application/json": { "schema": { "properties": { "datetime": { "type": "string" }, "description": { "type": "string" }, "projectId": { "type": "string" }, "title": { "minLength": 1, "type": "string" } }, "required": [ "projectId", "title", "datetime" ], "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] } }, "/manage/references/{id}": { "delete": { "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] }, "get": { "description": "Get a single annotation reference by ID.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] }, "patch": { "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "properties": { "datetime": { "type": "string" }, "description": { "type": "string" }, "title": { "minLength": 1, "type": "string" } }, "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Default Response" } }, "tags": [ "Manage" ] } } }, "servers": [ { "url": "https://analytics.a2acloud.io/api" } ], "tags": [ { "description": "Track events and sessions", "name": "Track" }, { "description": "Identify and update user profiles", "name": "Profile" }, { "description": "Export data", "name": "Export" }, { "description": "Import historical data", "name": "Import" }, { "description": "Query analytics data", "name": "Insights" }, { "description": "Manage projects and clients", "name": "Manage" }, { "description": "Legacy event ingestion (deprecated, use /track)", "name": "Event" } ] }, "server_url": "https://analytics.a2acloud.io/api", "title": "OpenPanel Admin API", "url": "https://analytics.a2acloud.io/api/documentation/admin.json" }, { "index": 2, "openapi": { "components": { "schemas": {} }, "info": { "title": "OpenPanel Project API", "version": "1.0.0" }, "openapi": "3.1.0", "paths": { "/event/": { "post": { "description": "Deprecated direct event ingestion endpoint. Use /track instead.", "responses": { "200": { "description": "Default Response" } }, "tags": [ "Event" ] } }, "/export/charts": { "get": { "description": "Export aggregated chart/analytics data for a series of events over a time range.", "parameters": [ { "description": "Array of dimensions to break down the data by", "in": "query", "name": "breakdowns", "schema": { "default": [], "description": "Array of dimensions to break down the data by", "items": { "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "name" ], "type": "object" }, "type": "array" } }, { "description": "The time interval for data aggregation (e.g., day, week, month)", "in": "query", "name": "interval", "schema": { "default": "day", "description": "The time interval for data aggregation (e.g., day, week, month)", "enum": [ "minute", "day", "hour", "week", "month" ], "type": "string" } }, { "description": "The time range for which data should be displayed", "in": "query", "name": "range", "schema": { "default": "30d", "description": "The time range for which data should be displayed", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "description": "Whether to show data from the previous period for comparison", "in": "query", "name": "previous", "schema": { "default": false, "description": "Whether to show data from the previous period for comparison", "type": "boolean" } }, { "description": "Custom start date for the data range (overrides range if provided)", "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Custom start date for the data range (overrides range if provided)" } }, { "description": "Custom end date for the data range (overrides range if provided)", "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Custom end date for the data range (overrides range if provided)" } }, { "in": "query", "name": "project_id", "schema": { "type": "string" } }, { "in": "query", "name": "projectId", "schema": { "type": "string" } }, { "in": "query", "name": "series", "schema": { "items": { "properties": { "filters": { "default": [], "description": "Filters applied specifically to this event", "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" }, "name": { "type": "string" }, "property": { "description": "Optional property of the event used for specific segment calculations (e.g., value for property_sum/average)", "type": "string" }, "segment": { "default": "event", "description": "Defines how the event data should be segmented or aggregated", "enum": [ "event", "user", "session", "group", "user_average", "one_event_per_user", "property_sum", "property_average", "property_max", "property_min" ], "type": "string" } }, "required": [ "name" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "events", "schema": { "items": { "properties": { "filters": { "default": [], "description": "Filters applied specifically to this event", "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" }, "name": { "type": "string" }, "property": { "description": "Optional property of the event used for specific segment calculations (e.g., value for property_sum/average)", "type": "string" }, "segment": { "default": "event", "description": "Defines how the event data should be segmented or aggregated", "enum": [ "event", "user", "session", "group", "user_average", "one_event_per_user", "property_sum", "property_average", "property_max", "property_min" ], "type": "string" } }, "required": [ "name" ], "type": "object" }, "type": "array" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Export" ] } }, "/export/events": { "get": { "description": "Export a paginated list of raw events with optional filtering by date, profile, and event type.", "parameters": [ { "in": "query", "name": "project_id", "schema": { "type": "string" } }, { "in": "query", "name": "projectId", "schema": { "type": "string" } }, { "in": "query", "name": "profileId", "schema": { "type": "string" } }, { "in": "query", "name": "event", "schema": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ] } }, { "in": "query", "name": "start", "schema": { "type": "string" } }, { "in": "query", "name": "end", "schema": { "type": "string" } }, { "in": "query", "name": "page", "schema": { "default": 1, "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 50, "type": "number" } }, { "in": "query", "name": "filters", "schema": { "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "includes", "schema": { "items": { "type": "string" }, "type": "array" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Export" ] } }, "/import/events": { "post": { "description": "Bulk import historical events.", "responses": { "200": { "description": "Default Response" } }, "tags": [ "Import" ] } }, "/insights/{projectId}/active_users": { "get": { "description": "Get rolling active user counts over the last N days.", "parameters": [ { "in": "query", "name": "days", "schema": { "default": 7, "maximum": 90, "minimum": 1, "type": "integer" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/brand": { "get": { "description": "Get top values for the \"brand\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/browser": { "get": { "description": "Get top values for the \"browser\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/browser_version": { "get": { "description": "Get top values for the \"browser_version\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/city": { "get": { "description": "Get top values for the \"city\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/country": { "get": { "description": "Get top values for the \"country\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/device": { "get": { "description": "Get top values for the \"device\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/engagement": { "get": { "description": "Get engagement metrics for the project.", "parameters": [ { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/events": { "get": { "description": "Query events with optional filters for date range, profile, and properties.", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "eventNames", "schema": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ] } }, { "in": "query", "name": "path", "schema": { "type": "string" } }, { "in": "query", "name": "country", "schema": { "type": "string" } }, { "in": "query", "name": "city", "schema": { "type": "string" } }, { "in": "query", "name": "device", "schema": { "type": "string" } }, { "in": "query", "name": "browser", "schema": { "type": "string" } }, { "in": "query", "name": "os", "schema": { "type": "string" } }, { "in": "query", "name": "referrer", "schema": { "type": "string" } }, { "in": "query", "name": "referrerName", "schema": { "type": "string" } }, { "in": "query", "name": "referrerType", "schema": { "type": "string" } }, { "in": "query", "name": "profileId", "schema": { "type": "string" } }, { "in": "query", "name": "properties", "schema": { "additionalProperties": { "type": "string" }, "propertyNames": { "type": "string" }, "type": "object" } }, { "in": "query", "name": "filters", "schema": { "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "limit", "schema": { "default": 20, "maximum": 100, "minimum": 1, "type": "integer" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/events/names": { "get": { "description": "List all distinct event names tracked in the project.", "parameters": [ { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/events/properties": { "get": { "description": "List all property keys for a given event name.", "parameters": [ { "in": "query", "name": "eventName", "schema": { "type": "string" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/events/property_values": { "get": { "description": "Get the top values for a specific event property key.", "parameters": [ { "in": "query", "name": "eventName", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "propertyKey", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/funnel": { "get": { "description": "Get funnel conversion rates for a sequence of events.", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "steps", "required": true, "schema": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ] } }, { "in": "query", "name": "windowHours", "schema": { "default": 24, "maximum": 720, "minimum": 1, "type": "integer" } }, { "in": "query", "name": "groupBy", "schema": { "default": "session_id", "enum": [ "session_id", "profile_id" ], "type": "string" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/groups": { "get": { "description": "Search and filter groups.", "parameters": [ { "in": "query", "name": "type", "schema": { "type": "string" } }, { "in": "query", "name": "search", "schema": { "type": "string" } }, { "in": "query", "name": "limit", "schema": { "default": 20, "maximum": 100, "minimum": 1, "type": "integer" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/groups/types": { "get": { "description": "List all group types defined in the project.", "parameters": [ { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/groups/{groupId}": { "get": { "description": "Get a single group with its members.", "parameters": [ { "in": "query", "name": "memberLimit", "schema": { "default": 10, "maximum": 50, "minimum": 1, "type": "integer" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "groupId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/gsc/cannibalization": { "get": { "description": "Detect keyword cannibalization across pages in Google Search Console.", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/gsc/overview": { "get": { "description": "Get a Google Search Console performance overview (clicks, impressions, CTR, position).", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "interval", "schema": { "default": "day", "enum": [ "day", "week", "month" ], "type": "string" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/gsc/pages": { "get": { "description": "Get top pages from Google Search Console.", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "limit", "schema": { "default": 100, "maximum": 1000, "minimum": 1, "type": "integer" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/gsc/pages/details": { "get": { "description": "Get detailed GSC metrics for a specific page URL.", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "page", "required": true, "schema": { "format": "uri", "type": "string" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/gsc/queries": { "get": { "description": "Get top search queries from Google Search Console.", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "limit", "schema": { "default": 100, "maximum": 1000, "minimum": 1, "type": "integer" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/gsc/queries/details": { "get": { "description": "Get detailed GSC metrics for a specific search query.", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "query", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/gsc/queries/opportunities": { "get": { "description": "Get GSC query opportunities (high impressions, low CTR).", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "minImpressions", "schema": { "default": 50, "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/live": { "get": { "description": "Get the current number of live (active) visitors.", "parameters": [ { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/metrics": { "get": { "description": "Get aggregated website metrics including sessions, pageviews, and bounce rate.", "parameters": [ { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/model": { "get": { "description": "Get top values for the \"model\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/os": { "get": { "description": "Get top values for the \"os\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/os_version": { "get": { "description": "Get top values for the \"os_version\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/overview": { "get": { "description": "Get an overview of key metrics for the project (sessions, pageviews, bounce rate, duration).", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "interval", "schema": { "enum": [ "hour", "day", "week", "month" ], "type": "string" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/pages": { "get": { "description": "Get top pages with pageview counts for the selected date range.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/pages/entry_exit": { "get": { "description": "Get entry or exit pages ranked by session count.", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "mode", "schema": { "default": "entry", "enum": [ "entry", "exit" ], "type": "string" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/pages/performance": { "get": { "description": "Get page-level performance metrics (bounce rate, avg duration, sessions).", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "search", "schema": { "type": "string" } }, { "in": "query", "name": "sortBy", "schema": { "enum": [ "sessions", "pageviews", "bounce_rate", "avg_duration" ], "type": "string" } }, { "in": "query", "name": "sortOrder", "schema": { "enum": [ "asc", "desc" ], "type": "string" } }, { "in": "query", "name": "limit", "schema": { "default": 50, "maximum": 500, "minimum": 1, "type": "integer" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/pages/top": { "get": { "description": "Get the top pages by pageviews for the given date range.", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/profiles": { "get": { "description": "Search and filter user profiles.", "parameters": [ { "in": "query", "name": "name", "schema": { "type": "string" } }, { "in": "query", "name": "email", "schema": { "type": "string" } }, { "in": "query", "name": "country", "schema": { "type": "string" } }, { "in": "query", "name": "city", "schema": { "type": "string" } }, { "in": "query", "name": "device", "schema": { "type": "string" } }, { "in": "query", "name": "browser", "schema": { "type": "string" } }, { "in": "query", "name": "inactiveDays", "schema": { "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, { "in": "query", "name": "minSessions", "schema": { "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, { "in": "query", "name": "performedEvent", "schema": { "type": "string" } }, { "in": "query", "name": "filters", "schema": { "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "sortOrder", "schema": { "default": "desc", "enum": [ "asc", "desc" ], "type": "string" } }, { "in": "query", "name": "limit", "schema": { "default": 20, "maximum": 100, "minimum": 1, "type": "integer" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/profiles/{profileId}": { "get": { "description": "Get a single user profile with their recent events.", "parameters": [ { "in": "query", "name": "eventLimit", "schema": { "default": 20, "maximum": 100, "minimum": 1, "type": "integer" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "profileId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/profiles/{profileId}/metrics": { "get": { "description": "Get aggregated metrics for a specific user profile.", "parameters": [ { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "profileId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/profiles/{profileId}/sessions": { "get": { "description": "Get sessions for a specific user profile.", "parameters": [ { "in": "query", "name": "limit", "schema": { "default": 20, "maximum": 100, "minimum": 1, "type": "integer" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "profileId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/referrer": { "get": { "description": "Get top values for the \"referrer\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/referrer_name": { "get": { "description": "Get top values for the \"referrer_name\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/referrer_type": { "get": { "description": "Get top values for the \"referrer_type\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/region": { "get": { "description": "Get top values for the \"region\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/reports/{reportId}/data": { "get": { "description": "Get the data for a saved report.", "parameters": [ { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "reportId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/retention": { "get": { "description": "Get weekly retention series data.", "parameters": [ { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/retention/cohort": { "get": { "description": "Get retention cohort data.", "parameters": [ { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/sessions": { "get": { "description": "Query sessions with optional filters.", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "country", "schema": { "type": "string" } }, { "in": "query", "name": "city", "schema": { "type": "string" } }, { "in": "query", "name": "device", "schema": { "type": "string" } }, { "in": "query", "name": "browser", "schema": { "type": "string" } }, { "in": "query", "name": "os", "schema": { "type": "string" } }, { "in": "query", "name": "referrer", "schema": { "type": "string" } }, { "in": "query", "name": "referrerName", "schema": { "type": "string" } }, { "in": "query", "name": "referrerType", "schema": { "type": "string" } }, { "in": "query", "name": "profileId", "schema": { "type": "string" } }, { "in": "query", "name": "filters", "schema": { "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "limit", "schema": { "default": 20, "maximum": 100, "minimum": 1, "type": "integer" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/traffic/devices": { "get": { "description": "Get traffic breakdown by device type, browser, or OS.", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "breakdown", "schema": { "default": "device", "enum": [ "device", "browser", "os" ], "type": "string" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/traffic/geo": { "get": { "description": "Get traffic breakdown by geographic dimension (country, region, city).", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "breakdown", "schema": { "default": "country", "enum": [ "country", "region", "city" ], "type": "string" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/traffic/referrers": { "get": { "description": "Get traffic breakdown by referrer source.", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "breakdown", "schema": { "default": "referrer_name", "enum": [ "referrer_name", "referrer_type", "referrer", "utm_source", "utm_medium", "utm_campaign" ], "type": "string" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/user_flow": { "get": { "description": "Get user flow paths before, after, or between specified events.", "parameters": [ { "in": "query", "name": "startDate", "schema": { "type": "string" } }, { "in": "query", "name": "endDate", "schema": { "type": "string" } }, { "in": "query", "name": "range", "schema": { "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "startEvent", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "endEvent", "schema": { "type": "string" } }, { "in": "query", "name": "mode", "schema": { "default": "after", "enum": [ "after", "before", "between" ], "type": "string" } }, { "in": "query", "name": "steps", "schema": { "default": 5, "maximum": 10, "minimum": 2, "type": "integer" } }, { "in": "query", "name": "exclude", "schema": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ] } }, { "in": "query", "name": "include", "schema": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ] } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/utm_campaign": { "get": { "description": "Get top values for the \"utm_campaign\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/utm_content": { "get": { "description": "Get top values for the \"utm_content\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/utm_medium": { "get": { "description": "Get top values for the \"utm_medium\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/utm_source": { "get": { "description": "Get top values for the \"utm_source\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/insights/{projectId}/utm_term": { "get": { "description": "Get top values for the \"utm_term\" dimension.", "parameters": [ { "in": "query", "name": "filters", "schema": { "default": [], "items": { "properties": { "cohortId": { "description": "DEPRECATED: legacy single-cohort id, kept for saved reports. New code reads cohortIds via getCohortIds(filter).", "type": "string" }, "cohortIds": { "description": "Cohort IDs for inCohort/notInCohort. Multiple ids OR-match (matches profiles in any of the listed cohorts).", "items": { "type": "string" }, "type": "array" }, "id": { "description": "Unique identifier for the filter", "type": "string" }, "name": { "description": "The property name to filter on", "type": "string" }, "operator": { "description": "The operator to use for the filter", "enum": [ "is", "isNot", "contains", "doesNotContain", "startsWith", "endsWith", "regex", "isNull", "isNotNull", "gt", "lt", "gte", "lte", "inCohort", "notInCohort" ], "type": "string" }, "value": { "description": "The values to filter on", "items": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, { "type": "boolean" } ] }, { "type": "null" } ] }, "type": "array" } }, "required": [ "name", "operator", "value" ], "type": "object" }, "type": "array" } }, { "in": "query", "name": "startDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "endDate", "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "range", "schema": { "default": "7d", "enum": [ "30min", "lastHour", "last24h", "today", "yesterday", "7d", "30d", "3m", "6m", "12m", "monthToDate", "lastMonth", "yearToDate", "lastYear", "custom" ], "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "number" } }, { "in": "query", "name": "limit", "schema": { "default": 10, "type": "number" } }, { "in": "path", "name": "projectId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Default Response" } }, "tags": [ "Insights" ] } }, "/profile/": { "post": { "description": "Identify or update a user profile.", "responses": { "200": { "description": "Default Response" } }, "tags": [ "Profile" ] } }, "/profile/decrement": { "post": { "description": "Decrement a numeric property on a user profile.", "responses": { "200": { "description": "Default Response" } }, "tags": [ "Profile" ] } }, "/profile/increment": { "post": { "description": "Increment a numeric property on a user profile.", "responses": { "200": { "description": "Default Response" } }, "tags": [ "Profile" ] } }, "/track/": { "post": { "description": "Ingest a tracking event (track, identify, group, increment, decrement, replay).", "requestBody": { "content": { "application/json": { "schema": { "allOf": [ { "oneOf": [ { "properties": { "payload": { "properties": { "groups": { "anyOf": [ { "items": { "minLength": 1, "type": "string" }, "type": "array" }, { "type": "null" } ] }, "name": { "minLength": 1, "type": "string" }, "profileId": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "number" } ] }, "properties": { "additionalProperties": {}, "propertyNames": { "type": "string" }, "type": "object" } }, "required": [ "name" ], "type": "object" }, "type": { "enum": [ "track" ], "type": "string" } }, "required": [ "type", "payload" ], "title": "Track", "type": "object" }, { "properties": { "payload": { "properties": { "avatar": { "format": "uri", "type": "string" }, "email": { "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", "type": "string" }, "firstName": { "type": "string" }, "lastName": { "type": "string" }, "profileId": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "number" } ] }, "properties": { "additionalProperties": {}, "propertyNames": { "type": "string" }, "type": "object" } }, "required": [ "profileId" ], "type": "object" }, "type": { "enum": [ "identify" ], "type": "string" } }, "required": [ "type", "payload" ], "title": "Identify", "type": "object" }, { "properties": { "payload": { "properties": { "profileId": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "number" } ] }, "property": { "minLength": 1, "type": "string" }, "value": { "exclusiveMinimum": 0, "type": "number" } }, "required": [ "profileId", "property" ], "type": "object" }, "type": { "enum": [ "increment" ], "type": "string" } }, "required": [ "type", "payload" ], "title": "Increment", "type": "object" }, { "properties": { "payload": { "properties": { "profileId": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "number" } ] }, "property": { "minLength": 1, "type": "string" }, "value": { "exclusiveMinimum": 0, "type": "number" } }, "required": [ "profileId", "property" ], "type": "object" }, "type": { "enum": [ "decrement" ], "type": "string" } }, "required": [ "type", "payload" ], "title": "Decrement", "type": "object" }, { "properties": { "payload": { "properties": { "alias": { "minLength": 1, "type": "string" }, "profileId": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "number" } ] } }, "required": [ "profileId", "alias" ], "type": "object" }, "type": { "enum": [ "alias" ], "type": "string" } }, "required": [ "type", "payload" ], "title": "Alias", "type": "object" }, { "properties": { "payload": { "properties": { "chunk_index": { "maximum": 65535, "minimum": 0, "type": "integer" }, "ended_at": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" }, "events_count": { "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "is_full_snapshot": { "type": "boolean" }, "payload": { "maxLength": 2097152, "type": "string" }, "started_at": { "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "type": "string" } }, "required": [ "chunk_index", "events_count", "is_full_snapshot", "started_at", "ended_at", "payload" ], "type": "object" }, "type": { "enum": [ "replay" ], "type": "string" } }, "required": [ "type", "payload" ], "title": "Replay", "type": "object" }, { "properties": { "payload": { "properties": { "id": { "minLength": 1, "type": "string" }, "name": { "minLength": 1, "type": "string" }, "properties": { "additionalProperties": {}, "propertyNames": { "type": "string" }, "type": "object" }, "type": { "minLength": 1, "type": "string" } }, "required": [ "id", "type", "name" ], "type": "object" }, "type": { "enum": [ "group" ], "type": "string" } }, "required": [ "type", "payload" ], "title": "Group", "type": "object" }, { "properties": { "payload": { "properties": { "groupIds": { "items": { "minLength": 1, "type": "string" }, "type": "array" }, "profileId": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "number" } ] } }, "required": [ "groupIds" ], "type": "object" }, "type": { "enum": [ "assign_group" ], "type": "string" } }, "required": [ "type", "payload" ], "title": "Assign Group", "type": "object" } ], "type": "object" }, { "properties": { "clientId": { "type": "string" }, "clientSecret": { "type": "string" } }, "type": "object" } ] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "deviceId": { "type": "string" }, "sessionId": { "type": "string" } }, "required": [ "deviceId", "sessionId" ], "type": "object" } } }, "description": "Default Response" } }, "tags": [ "Track" ] } }, "/track/device-id": { "get": { "description": "Get or generate a stable device ID and session ID for the current visitor.", "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "deviceId": { "type": "string" }, "message": { "type": "string" }, "sessionId": { "type": "string" } }, "required": [ "deviceId", "sessionId" ], "type": "object" } } }, "description": "Default Response" } }, "tags": [ "Track" ] } } }, "servers": [ { "url": "https://analytics.a2acloud.io/api" } ], "tags": [ { "description": "Track events and sessions", "name": "Track" }, { "description": "Identify and update user profiles", "name": "Profile" }, { "description": "Export data", "name": "Export" }, { "description": "Import historical data", "name": "Import" }, { "description": "Query analytics data", "name": "Insights" }, { "description": "Manage projects and clients", "name": "Manage" }, { "description": "Legacy event ingestion (deprecated, use /track)", "name": "Event" } ] }, "server_url": "https://analytics.a2acloud.io/api", "title": "OpenPanel Project API", "url": "https://analytics.a2acloud.io/api/documentation/project.json" } ] }