Uniform Insights API
The Insights API from Uniform — 3 operation(s) for insights.
The Insights API from Uniform — 3 operation(s) for insights.
openapi: 3.0.3
info:
title: Uniform Platform Aggregates Insights API
version: '2.0'
tags:
- name: Insights
paths:
/api/v1/insights-connections:
get:
description: Gets insights connection for a project and workspace
deprecated: true
parameters:
- schema:
type: string
required: true
name: projectId
in: query
- schema:
type: string
required: false
name: workspace
in: query
- schema:
type: string
required: false
name: id
in: query
responses:
'200':
description: 200 response
content:
application/json:
schema:
type: object
properties:
insightsConnection:
type: object
properties:
id:
type: string
projectId:
type: string
workspace:
type: string
trackingToken:
type: string
dashboardToken:
type: string
apiHost:
type: string
region:
type: string
required:
- id
- projectId
- workspace
- trackingToken
- dashboardToken
- apiHost
- region
additionalProperties: false
required:
- insightsConnection
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
description: 404 response
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
additionalProperties: false
'429':
$ref: '#/components/responses/RateLimitError'
'500':
$ref: '#/components/responses/InternalServerError'
tags:
- Insights
security:
- ApiKeyAuth: []
- BearerAuth: []
delete:
description: Deletes an insights connection
deprecated: true
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
projectId:
type: string
required:
- projectId
additionalProperties: false
responses:
'200':
description: 200 response
content:
application/json:
schema:
type: object
properties:
id:
type: string
required:
- id
additionalProperties: false
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
description: 404 response
'429':
$ref: '#/components/responses/RateLimitError'
'500':
$ref: '#/components/responses/InternalServerError'
tags:
- Insights
security:
- ApiKeyAuth: []
- BearerAuth: []
put:
description: Creates an insights connection with read/write tokens
deprecated: true
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
projectId:
type: string
workspace:
type: string
minLength: 1
maxLength: 255
apiHost:
type: string
region:
type: string
enum:
- europe-west2
- europe-west3
- us-east4
- northamerica-northeast2
- eu-central-1
- eu-west-1
- us-east-1
- us-west-2
- local
required:
- projectId
- workspace
- region
additionalProperties: false
responses:
'200':
description: 200 response
content:
application/json:
schema:
type: object
properties:
id:
type: string
required:
- id
additionalProperties: false
'201':
description: 201 response
content:
application/json:
schema:
type: object
properties:
id:
type: string
required:
- id
additionalProperties: false
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
description: 404 response
'429':
$ref: '#/components/responses/RateLimitError'
'500':
$ref: '#/components/responses/InternalServerError'
tags:
- Insights
security:
- ApiKeyAuth: []
- BearerAuth: []
/api/v1/insights:
get:
tags:
- Insights
parameters:
- in: query
name: insightsType
description: The type of insights to fetch
required: true
schema:
type: string
- in: query
name: projectId
description: The project to fetch insights for
required: true
schema:
type: string
format: uuid
- in: query
name: metricType
description: The selected metric type to fetch insights for
required: false
schema:
type: string
- in: query
name: name
description: The name of the test or personalization to fetch insights for
required: false
schema:
type: string
- in: query
name: goalId
description: The goal id to fetch insights for
required: false
schema:
type: string
- in: query
name: dateStart
description: The date start to fetch insights for
required: false
schema:
type: string
- in: query
name: dateEnd
description: The date end to fetch insights for
required: false
schema:
type: string
- in: query
name: pathName
description: The pathname to fetch insights for
required: false
schema:
type: string
security:
- ApiKeyAuth: []
- BearerAuth: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/InsightDefinition'
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'429':
$ref: '#/components/responses/RateLimitError'
'500':
$ref: '#/components/responses/InternalServerError'
/api/v2/insights:
get:
description: Fetch insights data
deprecated: true
parameters:
- schema:
type: string
enum:
- compositionAnalytics
- pageViewsAnalytics
- personalizationViews
- personalizationGoals
- sessionsAnalytics
- testViews
- testGoals
- segmentUpdates
- goalsAnalytics
- enrichmentsOverview
- deviceAnalytics
- personalizationSummary
- testsSummary
- sessionsSummary
required: true
name: insightType
in: query
- schema:
type: string
required: true
name: projectId
in: query
- schema:
type: string
required: false
name: goalId
in: query
- schema:
type: string
required: false
name: name
in: query
- schema:
type: string
required: false
name: compositionId
in: query
- schema:
type: string
required: false
name: startDate
in: query
- schema:
type: string
required: false
name: endDate
in: query
- schema:
type: string
required: false
name: pathname
in: query
- schema:
type: string
required: false
name: pmNodePath
in: query
- schema:
type: string
required: false
name: sessionId
in: query
- schema:
type: string
required: false
name: visitorId
in: query
- schema:
type: number
required: false
name: limit
in: query
- schema:
type: number
required: false
name: offset
in: query
- schema:
type: boolean
required: false
name: isBounce
in: query
- schema:
type: string
required: false
name: segmentId
in: query
- schema:
type: boolean
required: false
name: includeGoals
in: query
- schema:
type: boolean
required: false
name: includeBounceRate
in: query
responses:
'200':
description: 200 response
content:
application/json:
schema:
type: object
properties:
data:
nullable: true
'400':
$ref: '#/components/responses/BadRequestError'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
description: 404 response
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'429':
$ref: '#/components/responses/RateLimitError'
'500':
$ref: '#/components/responses/InternalServerError'
tags:
- Insights
security:
- ApiKeyAuth: []
- BearerAuth: []
components:
responses:
ForbiddenError:
description: Permission was denied
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
RateLimitError:
description: Too many requests in allowed time period
BadRequestError:
description: Request input validation failed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
InternalServerError:
description: Execution error occurred
UnauthorizedError:
description: API key or token was not valid
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Error:
type: object
properties:
errorMessage:
description: Error message(s) that occurred while processing the request
oneOf:
- type: array
items:
type: string
- type: string
InsightDefinition:
type: object
required:
- data
- integrationKey
properties:
data:
description: Data retrieved for the requested insights type
type: string
integrationKey:
description: The integration key (id) associated with the retrieved insights data
type: string
additionalProperties: false
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: x-api-key
BearerAuth:
type: http
scheme: bearer