Analytics Suite — API Reference
Analyze the behaviors of Profiles in no time.
82 endpoints across 11 tags.
Analytics: Aggregates
POST /analytics/analytics/definitions-manager/aggregates/{aggregateId}/client/{clientId}/calculate/histogram — Calculate aggregate for profile with period conditions
Calculate the results of an aggregate in context of a single profile. The results can be date-filtered and aggregated in time periods.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_AGGREGATE_HISTOGRAM_FOR_CLIENT_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
aggregateId | path | string | required | Aggregate ID |
clientId | path | integer | required | Client ID |
Request body
application/json · analytics-AggregateHistogramRequest
| Field | Type | Required | Description |
|---|---|---|---|
variables | array<analytics-Variable> | required | A list of variable values to use in this calculation |
dateFilter | required | Definition of a date filter. Only data that meets the result of the filter will be included in the analysis. For no filter, leave this object empty. An absolute date filter lets you define static dates and times that always apply to the analysis. A relative date filter lets you create a date filter that goes back a certain time from the moment of calculating the analysis. | |
aggregateDataBy | object | required | The interval for grouping data |
Responses
| Status | Description |
|---|---|
200 application/json | Aggregate calculation result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/definitions-manager/aggregates/%7BaggregateId%7D/client/%7BclientId%7D/calculate/histogram \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"variables":[{"name":"string","value":"string"}],"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0}}'
POST /analytics/{namespace}/aggregates/preview/by/{identifierType} — Get aggregate preview
/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-preview-v2
Retrieve aggregate preview value. Previews are only available for the AGGREGATE type (profile aggregate). This request doesn't save an aggregate to the database.
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_AGGREGATES_READ, ANALYTICS_BACKEND_AGGREGATE_READ
User role permission required: analytics_aggregates: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
identifierType | path | enum<"id", "uuid", "email", "custom_identify"> | required | Profile identifier type |
Request body
application/json · analytics-PreviewAggregateRequest
| Field | Type | Required | Description |
|---|---|---|---|
aggregate | required | ||
identifierValue | string | required | Value of the selected identifier. Note that IDs must also be sent as strings. |
Responses
| Status | Description |
|---|---|
200 application/json | Aggregate preview |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/preview/by/%7BidentifierType%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"aggregate":{"oldId":0,"aggregateType":"AGGREGATE","name":"string","description":"string","action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string","id":0},"type":"AVG","level":0.01,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"size":0,"unique":false,"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"identifierValue":"string"}'
POST /analytics/{namespace}/aggregates/visible-for-client/by/{identifierType} — Get aggregates for profile card
Retrieve aggregates to display on a profile's card in the Profiles module ("isVisibleForClientProfile": true) in the expression config).
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_AGGREGATE_FOR_CLIENT_READ
User role permission required (at least one): analytics: read, client_analytics_preview: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
identifierType | path | enum<"id", "uuid", "email", "custom_identify"> | required | Profile identifier type |
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · object
| Field | Type | Required | Description |
|---|---|---|---|
identifierValue | string | required | Value of the selected identifier. Note that IDs must also be sent as strings. |
Responses
| Status | Description |
|---|---|
200 application/json | List of calculated aggregates configured as visible on the profile card |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/visible-for-client/by/%7BidentifierType%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"identifierValue":"string"}'
POST /analytics/{namespace}/aggregates/{aggregateId}/calculate/by/{identifierType} — Calculate aggregate for profile
/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-calculate
Calculate the result of an existing aggregate in context of a single profile.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_AGGREGATE_FOR_CLIENT_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
aggregateId | path | string | required | Aggregate ID |
identifierType | path | enum<"id", "uuid", "email", "custom_identify"> | required | Profile identifier type |
Request body
application/json · object
| Field | Type | Required | Description |
|---|---|---|---|
identifierValue | string | required | Value of the selected identifier. Note that IDs must also be sent as strings. |
Responses
| Status | Description |
|---|---|
200 application/json | Aggregate result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D/calculate/by/%7BidentifierType%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"identifierValue":"string"}'
GET /analytics/{namespace}/aggregates — List aggregates
/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregates-list
Returns a paginated list of aggregates.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_AGGREGATES_LIST_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | optional | The number of the page to retrieve |
limit | query | integer | optional | Limit of items per page |
search | query | string | optional | A string to search for in analyses' titles |
sortBy | query | enum<"name:asc", "name:desc", "author:asc", "author:desc", …> | optional | You can sort the results. The sorting direction is selected by adding asc or desc, for example sortBy=name:desc.
|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
directoryId | query | string | optional | Unique ID of the directory to retrieve analyses from |
ids | query | string | optional | Comma-separated list of IDs (in UUID format) to filter results through |
aggregateType | query | enum<"AGGREGATE", "RUNNING_AGGREGATE"> | optional | Filter by aggregate type |
Responses
| Status | Description |
|---|---|
200 application/json | List of aggregates |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/{namespace}/aggregates — Create aggregate
/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-create
Create an aggregate analysis and save it to the database.
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_AGGREGATES_CREATE, ANALYTICS_BACKEND_AGGREGATE_CREATE
User role permission required: analytics_aggregates: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · analytics-AggregateRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | required | Definition of the aggregate | |
isVisibleForClientProfile | boolean | required | When set to true, information about this analysis is shown on a profile's card.
|
previewDefaultObjectId | number | optional | The ID of the default profile for generating a preview of the results. |
Responses
| Status | Description |
|---|---|
201 application/json | Aggregate has been created |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"aggregateType":"RUNNING_AGGREGATE","excludeCurrent":true,"timeWindow":{"type":"YEARS","value":0},"name":"string","description":"string","action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string","id":0},"type":"AVG","level":0.01,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"size":0,"unique":false,"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"isVisibleForClientProfile":true,"previewDefaultObjectId":0}'
GET /analytics/{namespace}/aggregates/{aggregateId} — Get aggregate details
/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-get
Retrieve all data about an aggregate definition.
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_AGGREGATES_READ, ANALYTICS_BACKEND_AGGREGATE_READ
User role permission required: analytics_aggregates: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
aggregateId | path | string | required | Aggregate ID |
Responses
| Status | Description |
|---|---|
200 application/json | Details of the aggregate |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
PUT /analytics/{namespace}/aggregates/{aggregateId} — Update aggregate
/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-update
Update an aggregate.
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_AGGREGATES_UPDATE, ANALYTICS_BACKEND_AGGREGATE_UPDATE
User role permission required: analytics_aggregates: update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
aggregateId | path | string | required | Aggregate ID |
Request body
application/json · analytics-AggregateUpdateRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | required | ||
isVisibleForClientProfile | boolean | required | When set to true, information about this analysis is shown on a profile's card.
|
previewDefaultObjectId | number | optional | The ID of the default profile for generating a preview of the results. |
Responses
| Status | Description |
|---|---|
200 | Aggregate updated |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request PUT \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"oldId":0,"aggregateType":"RUNNING_AGGREGATE","excludeCurrent":true,"timeWindow":{"type":"YEARS","value":0},"name":"string","description":"string","action":{"id":0,"name":"page.visit"},"attribute":{"type":"PARAM","param":"string","id":0},"type":"AVG","level":0.01,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"size":0,"unique":false,"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"isVisibleForClientProfile":true,"previewDefaultObjectId":0}'
DELETE /analytics/{namespace}/aggregates/{aggregateId} — Delete aggregate
/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-delete
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_AGGREGATES_DELETE, ANALYTICS_BACKEND_AGGREGATE_DELETE
User role permission required: analytics_aggregates: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
aggregateId | path | string | required | Aggregate ID |
Responses
| Status | Description |
|---|---|
204 | Aggregate deleted |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/aggregates/%7BaggregateId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Analytics: Expressions
POST /analytics/{namespace}/expressions/visible-for-client/by/{identifierType} — Get expressions for profile card
Retrieve expressions to display on a profile's card in the Profiles module ("isVisibleForClientProfile": true in the expression config).
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_EXPRESSION_FOR_CLIENT_READ
User role permission required (at least one): analytics: read, client_analytics_preview: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
identifierType | path | enum<"id", "uuid", "email", "custom_identify"> | required | Profile identifier type |
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · object
| Field | Type | Required | Description |
|---|---|---|---|
identifierValue | string | required | Value of the selected identifier. Note that IDs must also be sent as strings. |
Responses
| Status | Description |
|---|---|
200 application/json | List of calculated expressions configured as visible on the profile card |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/visible-for-client/by/%7BidentifierType%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"identifierValue":"string"}'
POST /analytics/{namespace}/expressions/{expressionId}/calculate/by/{identifierType} — Calculate expression for profile
/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expression-calculate
Calculate the result of an expression in context of a single profile.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_EXPRESSION_FOR_CLIENT_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
expressionId | path | string | required | Expression ID |
identifierType | path | enum<"id", "uuid", "email", "custom_identify"> | required | Profile identifier type |
Request body
application/json · object
| Field | Type | Required | Description |
|---|---|---|---|
identifierValue | string | required | Value of the selected identifier. Note that IDs must also be sent as strings. |
Responses
| Status | Description |
|---|---|
200 application/json | Expression result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D/calculate/by/%7BidentifierType%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"identifierValue":"string"}'
GET /analytics/{namespace}/expressions — List expressions
/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-list
Returns a paginated list of expressions.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_EXPRESSIONS_LIST_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | optional | The number of the page to retrieve |
limit | query | integer | optional | Limit of items per page |
search | query | string | optional | A string to search for in analyses' titles |
sortBy | query | enum<"name:asc", "name:desc", "author:asc", "author:desc", …> | optional | You can sort the results. The sorting direction is selected by adding asc or desc, for example sortBy=name:desc.
|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
directoryId | query | string | optional | Unique ID of the directory to retrieve analyses from |
ids | query | string | optional | Comma-separated list of IDs (in UUID format) to filter results through |
Responses
| Status | Description |
|---|---|
200 application/json | List of expressions |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/analytics/%7Bnamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/{namespace}/expressions — Create expression
/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-create
Create an expression that is saved in the database and can be used in other analyses.
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_EXPRESSIONS_CREATE, ANALYTICS_BACKEND_EXPRESSION_CREATE
User role permission required: analytics: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · analytics-expressionCreateRequestBody
| Field | Type | Required | Description |
|---|---|---|---|
isVisibleForClientProfile | boolean | required | When set to true, information about this analysis is shown on a profile's card.
|
analysis | required | Details of an expression analysis |
Responses
| Status | Description |
|---|---|
201 application/json | Create expression |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"isVisibleForClientProfile":true,"analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"string","value":{"type":"EVENT","attribute":{"type":"PARAM","param":"string","id":0}}}}}'
GET /analytics/{namespace}/expressions/{expressionId} — Get expression details
/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-get
Retrieve information about an expression analysis
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_EXPRESSIONS_READ, ANALYTICS_BACKEND_EXPRESSION_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
expressionId | path | string | required | Expression ID |
Responses
| Status | Description |
|---|---|
200 application/json | Get expression details |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
PUT /analytics/{namespace}/expressions/{expressionId} — Update expression
/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-update
Update an existing expression
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_EXPRESSIONS_UPDATE, ANALYTICS_BACKEND_EXPRESSION_UPDATE
User role permission required: analytics: update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
expressionId | path | string | required | Expression ID |
Request body
application/json · analytics-expressionCreateRequestBody
| Field | Type | Required | Description |
|---|---|---|---|
isVisibleForClientProfile | boolean | required | When set to true, information about this analysis is shown on a profile's card.
|
analysis | required | Details of an expression analysis |
Responses
| Status | Description |
|---|---|
200 | Update expression |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request PUT \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"isVisibleForClientProfile":true,"analysis":{"type":"EVENT","action":{"id":0,"name":"page.visit"},"name":"string","description":"string","expression":{"type":"VALUE","title":"string","value":{"type":"EVENT","attribute":{"type":"PARAM","param":"string","id":0}}}}}'
DELETE /analytics/{namespace}/expressions/{expressionId} — Delete expression
/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-delete
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_EXPRESSIONS_DELETE, ANALYTICS_BACKEND_EXPRESSION_DELETE
User role permission required: analytics: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
expressionId | path | string | required | Expression ID |
Responses
| Status | Description |
|---|---|
204 | Delete expression |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/%7BexpressionId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/{namespace}/expressions/preview/by/{identifierType} — Get expression preview
/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expression-preview-v2
Retrieve expression preview value. Previews are only available for CLIENT-type expressions. This request doesn't save the expression.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_EXPRESSION_FOR_CLIENT_READ
User role permission required (at least one): analytics: read, client_analytics_preview: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
identifierType | path | enum<"id", "uuid", "email", "custom_identify"> | required | Profile identifier type |
Request body
application/json · analytics-ExpressionPreviewRequestWithClient
| Field | Type | Required | Description |
|---|---|---|---|
identifierValue | string | required | Value of the selected identifier. Note that IDs must also be sent as strings. |
expression | object | required | Details of a profile expression. In the Synerise Portal, they are called attribute expressions. |
Responses
| Status | Description |
|---|---|
200 application/json | Expression preview result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/expressions/preview/by/%7BidentifierType%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"identifierValue":"string","expression":{"type":"CLIENT","name":"string","description":"string","expression":{"type":"VALUE","title":"string","value":{"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}}}}'
Analytics: Funnels
POST /analytics/analytics/v2/funnels/preview — Preview funnel calculation
/api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnel-preview
Preview the results of a funnel. This request doesn't save the funnel.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_FUNNEL_READ
User role permission required: analytics: read
Request body (required)
application/json · analytics-FunnelRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | optional | Details of the funnel |
Responses
| Status | Description |
|---|---|
200 application/json | Preview of the results |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v2/funnels/preview \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}}'
POST /analytics/analytics/v2/funnels/{funnelId}/recalculate/override — Recalculate funnel with parameter override
/api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnel-preview-override
Recalculate a funnel with new parameters and/or variable (dynamic key) values.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_FUNNEL_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
funnelId | path | string | required | Funnel UUID |
Request body (required)
application/json · analytics-OverrideQueryRequest
| Field | Type | Required | Description |
|---|---|---|---|
dateFilter | optional | Definition of a date filter. Only data that meets the result of the filter will be included in the analysis. For no filter, leave this object empty. An absolute date filter lets you define static dates and times that always apply to the analysis. A relative date filter lets you create a date filter that goes back a certain time from the moment of calculating the analysis. | |
aggregateDataBy | optional | ||
filter | object | optional | This filter lets you limit the results to profiles that match it. For no filter, leave the object empty. |
variables | array<analytics-Variable> | required | A list of variable values to use in this calculation |
Responses
| Status | Description |
|---|---|
200 application/json;charset=UTF-8 | Funnel results |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v2/funnels/%7BfunnelId%7D/recalculate/override \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"string"}]}'
GET /analytics/{namespace}/funnels — List funnels
/api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-list
Returns a paginated list of funnels.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_FUNNELS_LIST_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | optional | The number of the page to retrieve |
limit | query | integer | optional | Limit of items per page |
search | query | string | optional | A string to search for in analyses' titles |
sortBy | query | enum<"name:asc", "name:desc", "author:asc", "author:desc", …> | optional | You can sort the results. The sorting direction is selected by adding asc or desc, for example sortBy=name:desc.
|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
directoryId | query | string | optional | Unique ID of the directory to retrieve analyses from |
ids | query | string | optional | Comma-separated list of IDs (in UUID format) to filter results through |
Responses
| Status | Description |
|---|---|
200 application/json | List of funnels |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/analytics/%7Bnamespace%7D/funnels?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/{namespace}/funnels — Create a funnel
/api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-create
Create a funnel.
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_FUNNELS_CREATE, ANALYTICS_BACKEND_FUNNEL_CREATE
User role permission required: analytics: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · analytics-FunnelRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | optional | Details of the funnel |
Responses
| Status | Description |
|---|---|
201 application/json | Funnel created |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/funnels \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}}'
GET /analytics/{namespace}/funnels/{funnelId} — Get funnel details
/api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-get
Retrieve the definition of a single funnel
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_FUNNELS_READ, ANALYTICS_BACKEND_FUNNEL_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
funnelId | path | string | required | Funnel UUID |
Responses
| Status | Description |
|---|---|
200 application/json | Details of the funnel |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
PUT /analytics/{namespace}/funnels/{funnelId} — Update funnel
/api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-update
Update a funnel definition
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_FUNNELS_UPDATE, ANALYTICS_BACKEND_FUNNEL_UPDATE
User role permission required: analytics: update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
funnelId | path | string | required | Funnel UUID |
Request body
application/json · analytics-FunnelRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | optional | Details of the funnel |
Responses
| Status | Description |
|---|---|
200 | Funnel updated |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request PUT \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}}'
DELETE /analytics/{namespace}/funnels/{funnelId} — Delete funnel
/api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-delete
Delete a funnel.
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_FUNNELS_DELETE, ANALYTICS_BACKEND_FUNNEL_DELETE
User role permission required: analytics: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
funnelId | path | string | required | Funnel UUID |
Responses
| Status | Description |
|---|---|
204 | Funnel deleted |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/funnels/%7BfunnelId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Analytics: Histograms
GET /analytics/{namespace}/histograms — List histograms
/api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-list
Returns a paginated list of histograms.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_HISTOGRAMS_LIST_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | optional | The number of the page to retrieve |
limit | query | integer | optional | Limit of items per page |
search | query | string | optional | A string to search for in analyses' titles |
sortBy | query | enum<"name:asc", "name:desc", "author:asc", "author:desc", …> | optional | You can sort the results. The sorting direction is selected by adding asc or desc, for example sortBy=name:desc.
|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
directoryId | query | string | optional | Unique ID of the directory to retrieve analyses from |
ids | query | string | optional | Comma-separated list of IDs (in UUID format) to filter results through |
Responses
| Status | Description |
|---|---|
200 application/json | List of histograms |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/analytics/%7Bnamespace%7D/histograms?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/{namespace}/histograms — Create histogram
/api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-create
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_HISTOGRAMS_CREATE, ANALYTICS_BACKEND_HISTOGRAM_CREATE
User role permission required: analytics: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · analytics-HistogramRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | required | Details of a histogram |
Responses
| Status | Description |
|---|---|
200 application/json | Histogram created |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/histograms \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","histogram":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"period":{"type":"YEARS","value":0},"eventMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","chartType":"COLUMN","title":"string"}]}}}'
GET /analytics/{namespace}/histograms/{histogramId} — Get histogram details
/api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-get
Retrieve the details of an existing histogram definition
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_HISTOGRAMS_READ, ANALYTICS_BACKEND_HISTOGRAM_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
histogramId | path | string | required | Histogram ID |
Responses
| Status | Description |
|---|---|
200 application/json | Histogram analysis details |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
PUT /analytics/{namespace}/histograms/{histogramId} — Update histogram analysis
/api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-update
Update an existing histogram analysis
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_HISTOGRAMS_UPDATE, ANALYTICS_BACKEND_HISTOGRAM_UPDATE
User role permission required: analytics: update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
histogramId | path | string | required | Histogram ID |
Request body
application/json · analytics-HistogramRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | required | Details of a histogram |
Responses
| Status | Description |
|---|---|
200 | Histogram updated |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request PUT \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","histogram":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"period":{"type":"YEARS","value":0},"eventMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","chartType":"COLUMN","title":"string"}]}}}'
DELETE /analytics/{namespace}/histograms/{histogramId} — Delete histogram
/api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-delete
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_HISTOGRAMS_DELETE, ANALYTICS_BACKEND_HISTOGRAM_DELETE
User role permission required: analytics: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
histogramId | path | string | required | Histogram ID |
Responses
| Status | Description |
|---|---|
204 | Histogram deleted |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/histograms/%7BhistogramId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/analytics/v2/metrics/histograms/{histogramId}/recalculate/override — Calculate histogram with parameter override
Calculate a histogram with new parameters and/or variable (dynamic key) values.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_HISTOGRAM_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
histogramId | path | string | required | Histogram ID |
Request body
application/json · analytics-OverrideQueryRequest
| Field | Type | Required | Description |
|---|---|---|---|
dateFilter | optional | Definition of a date filter. Only data that meets the result of the filter will be included in the analysis. For no filter, leave this object empty. An absolute date filter lets you define static dates and times that always apply to the analysis. A relative date filter lets you create a date filter that goes back a certain time from the moment of calculating the analysis. | |
aggregateDataBy | optional | ||
filter | object | optional | This filter lets you limit the results to profiles that match it. For no filter, leave the object empty. |
variables | array<analytics-Variable> | required | A list of variable values to use in this calculation |
Responses
| Status | Description |
|---|---|
200 application/json | Histogram override calculation result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v2/metrics/histograms/%7BhistogramId%7D/recalculate/override \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"string"}]}'
POST /analytics/analytics/v2/metrics/histograms/preview — Preview histogram
Preview the results of a histogram. This request doesn't save the histogram.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_HISTOGRAM_READ
User role permission required: analytics: read
Request body
application/json · analytics-HistogramLegacyPreviewRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | optional | Details of a histogram |
Responses
| Status | Description |
|---|---|
200 application/json | Histogram preview calculation result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v2/metrics/histograms/preview \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","histogram":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"period":{"type":"YEARS","value":0},"eventMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","chartType":"COLUMN","title":"string"}]}}}'
Analytics: Metrics
GET /analytics/{namespace}/metrics — List metrics
/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-list
Returns a paginated list of metrics.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_METRICS_LIST_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | optional | The number of the page to retrieve |
limit | query | integer | optional | Limit of items per page |
search | query | string | optional | A string to search for in analyses' titles |
sortBy | query | enum<"name:asc", "name:desc", "author:asc", "author:desc", …> | optional | You can sort the results. The sorting direction is selected by adding asc or desc, for example sortBy=name:desc.
|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
directoryId | query | string | optional | Unique ID of the directory to retrieve analyses from |
ids | query | string | optional | Comma-separated list of IDs (in UUID format) to filter results through |
Responses
| Status | Description |
|---|---|
200 application/json | List of metrics |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/analytics/%7Bnamespace%7D/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/{namespace}/metrics — Create metric analysis
/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-create
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_METRICS_CREATE, ANALYTICS_BACKEND_METRIC_CREATE
User role permission required: analytics: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · analytics-MetricRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | optional | Structure of the analytical query |
Responses
| Status | Description |
|---|---|
200 application/json | ID of the created analysis |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/metrics \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"comparison":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}}},"metricType":"SIMPLE","expression":{"type":"VALUE","value":{"type":"EVENT","title":"string","occurrenceType":"FIRST","aggregation":{"type":"COUNT","level":0.01,"attribute":{"type":"PARAM","param":"string","id":0}},"action":{"id":0,"name":"page.visit"},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}},"isVisibleForClientProfile":true}}'
GET /analytics/{namespace}/metrics/{metricId} — Get metric details
/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-get
Retrieve the details of a metric definition.
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_METRICS_READ, ANALYTICS_BACKEND_METRIC_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
metricId | path | string | required | Metric UUID |
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Responses
| Status | Description |
|---|---|
200 application/json | Metric details |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/metrics/%7BmetricId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
PUT /analytics/{namespace}/metrics/{metricId} — Update metric
/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-update
Update an existing metric definition.
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_METRICS_UPDATE, ANALYTICS_BACKEND_METRIC_UPDATE
User role permission required: analytics: update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
metricId | path | string | required | Metric UUID |
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · analytics-MetricRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | optional | Structure of the analytical query |
Responses
| Status | Description |
|---|---|
200 application/json | Metric details |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request PUT \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/metrics/%7BmetricId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"comparison":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}}},"metricType":"SIMPLE","expression":{"type":"VALUE","value":{"type":"EVENT","title":"string","occurrenceType":"FIRST","aggregation":{"type":"COUNT","level":0.01,"attribute":{"type":"PARAM","param":"string","id":0}},"action":{"id":0,"name":"page.visit"},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}},"isVisibleForClientProfile":true}}'
DELETE /analytics/{namespace}/metrics/{metricId} — Delete metric analysis
/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-delete
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_METRICS_DELETE, ANALYTICS_BACKEND_METRIC_DELETE
User role permission required: analytics: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
metricId | path | string | required | Metric UUID |
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Responses
| Status | Description |
|---|---|
204 | Metric deleted |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/metrics/%7BmetricId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/analytics/v3/metrics/preview — Preview metric
/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-preview-metric-legacy
Get the results of a metric. This request doesn't save the metric to the database.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_METRIC_READ
User role permission required: analytics: read
Request body
application/json · analytics-MetricLegacyPreview
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | required | Structure of the analytical query |
Responses
| Status | Description |
|---|---|
200 application/json | Metric preview result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v3/metrics/preview \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"comparison":{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}}},"metricType":"SIMPLE","expression":{"type":"VALUE","value":{"type":"EVENT","title":"string","occurrenceType":"FIRST","aggregation":{"type":"COUNT","level":0.01,"attribute":{"type":"PARAM","param":"string","id":0}},"action":{"id":0,"name":"page.visit"},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}},"isVisibleForClientProfile":true}}'
POST /analytics/analytics/v3/metrics/{metricId}/recalculate/override — Calculate metric with parameter override
Recalculate a metric with new parameters and/or variable (dynamic key) values.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_METRIC_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
metricId | path | string | required | Metric UUID |
Request body
application/json · analytics-OverrideQueryRequest
| Field | Type | Required | Description |
|---|---|---|---|
dateFilter | optional | Definition of a date filter. Only data that meets the result of the filter will be included in the analysis. For no filter, leave this object empty. An absolute date filter lets you define static dates and times that always apply to the analysis. A relative date filter lets you create a date filter that goes back a certain time from the moment of calculating the analysis. | |
aggregateDataBy | optional | ||
filter | object | optional | This filter lets you limit the results to profiles that match it. For no filter, leave the object empty. |
variables | array<analytics-Variable> | required | A list of variable values to use in this calculation |
Responses
| Status | Description |
|---|---|
200 application/json | Metric calculation result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v3/metrics/%7BmetricId%7D/recalculate/override \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"string"}]}'
POST /analytics/analytics/v3/metrics/{metricId}/recalculate — Calculate metric
/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-calculate-metric
Calculate a metric that was created earlier.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_METRIC_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
metricId | path | string | required | Metric UUID |
Responses
| Status | Description |
|---|---|
200 application/json | Metric calculation result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v3/metrics/%7BmetricId%7D/recalculate \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/analytics/v3/metrics/{metricId}/dynamic/value — Calculate dynamic metric
Calculate a metric that includes variables (dynamic keys).
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_METRIC_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
metricId | path | string | required | Metric UUID |
Request body
application/json · analytics-DynamicVariablesRequest
| Field | Type | Required | Description |
|---|---|---|---|
variables | array<object> | required | Dynamic keys used in this analysis |
Responses
| Status | Description |
|---|---|
200 application/json | Metric calculation result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v3/metrics/%7BmetricId%7D/dynamic/value \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"variables":[{"name":"event.params.PARAMNAME","value":"string"}]}'
GET /analytics/analytics/v3/metrics/histogram-metrics — Get metrics usable in histograms
/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-get-histogram-metrics
Retrieve a list of metrics that can be used in histograms.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_METRIC_HISTOGRAM_READ
User role permission required: analytics: read
Responses
| Status | Description |
|---|---|
200 application/json;charset=UTF-8 | List of metrics |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/analytics/analytics/v3/metrics/histogram-metrics \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
AI: Metrics
GET /metrics/v2/available — Check available metrics (recommendations)
/api-reference/analytics-suite#tag/AI:-Metrics/operation/ApiGetAvailableMetricsV2
Returns metrics available for the Workspace. The metrics can be used when defining boostMetric and sortMetric query parameters in recommendations and in metric-based recommendations.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: METRICS_RECOMMENDATIONS_READ
User role permission required: campaigns_recommendations: read
Responses
| Status | Description |
|---|---|
200 application/json | Available metrics |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/metrics/v2/available \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
GET /metrics/v2/available-ids — Retrieve IDs of available metrics (recommendations)
/api-reference/analytics-suite#tag/AI:-Metrics/operation/ApiGetAvailableMetricsIdsV2
Returns IDs of metrics that are available for the Workspace. The metrics can be used when defining boostMetric and sortMetric query parameters in recommendations and in metric-based recommendations.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: METRICS_RECOMMENDATIONS_READ
User role permission required: campaigns_recommendations: read
Responses
| Status | Description |
|---|---|
200 application/json | IDs of available metrics |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/metrics/v2/available-ids \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Analytics: Reports
POST /analytics/analytics/v4/reports/{reportId}/recalculate/override — Calculate report with override
Calculate a report with new parameters and/or variables (dynamic keys)
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_REPORT_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
reportId | path | string | required | Report ID |
Request body
application/json · analytics-OverrideQueryRequest
| Field | Type | Required | Description |
|---|---|---|---|
dateFilter | optional | Definition of a date filter. Only data that meets the result of the filter will be included in the analysis. For no filter, leave this object empty. An absolute date filter lets you define static dates and times that always apply to the analysis. A relative date filter lets you create a date filter that goes back a certain time from the moment of calculating the analysis. | |
aggregateDataBy | optional | ||
filter | object | optional | This filter lets you limit the results to profiles that match it. For no filter, leave the object empty. |
variables | array<analytics-Variable> | required | A list of variable values to use in this calculation |
Responses
| Status | Description |
|---|---|
200 application/json | Report calculation result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v4/reports/%7BreportId%7D/recalculate/override \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"string"}]}'
POST /analytics/analytics/v4/reports/{reportId}/recalculate — Recalculate report
/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-recalculate-report
Retrieve the results of a previously-created report.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_REPORT_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
reportId | path | string | required | Report ID |
Responses
| Status | Description |
|---|---|
200 application/json | Report calculation result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v4/reports/%7BreportId%7D/recalculate \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/analytics/v4/reports/preview — Preview report
/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-preview-report
Retrieve the results of a report. This request doesn't save the report.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_REPORT_READ
User role permission required: analytics: read
Request body
application/json · analytics-ReportRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | optional | Structure of the report analysis |
allowNull | boolean | optional | When true, null values can be included in the results.
|
Responses
| Status | Description |
|---|---|
200 application/json | Report calculation result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v4/reports/preview \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"reportMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"action":{"id":0,"name":"page.visit"},"format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"columnName":"string","grouping":{"type":"TOP","top":0},"groups":[{"title":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}]}]},"allowNull":true}'
POST /analytics/analytics/v4/reports/preview-csv — Preview report as CSV
/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-preview-csv-report
Retrieve the results of a report as CSV. This request doesn't save the report.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_REPORT_READ
User role permission required: analytics: read
Request body
application/json · analytics-ReportRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | optional | Structure of the report analysis |
allowNull | boolean | optional | When true, null values can be included in the results.
|
Responses
| Status | Description |
|---|---|
200 text/csv | CSV data |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v4/reports/preview-csv \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"reportMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"action":{"id":0,"name":"page.visit"},"format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"columnName":"string","grouping":{"type":"TOP","top":0},"groups":[{"title":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}]}]},"allowNull":true}'
GET /analytics/{namespace}/reports — List reports
/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-list
Returns a paginated list of reports.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_REPORTS_LIST_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | optional | The number of the page to retrieve |
limit | query | integer | optional | Limit of items per page |
search | query | string | optional | A string to search for in analyses' titles |
sortBy | query | enum<"name:asc", "name:desc", "author:asc", "author:desc", …> | optional | You can sort the results. The sorting direction is selected by adding asc or desc, for example sortBy=name:desc.
|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
directoryId | query | string | optional | Unique ID of the directory to retrieve analyses from |
ids | query | string | optional | Comma-separated list of IDs (in UUID format) to filter results through |
isMultiMetric | query | boolean | optional | Filter reports by whether they have more than one metric. |
Responses
| Status | Description |
|---|---|
200 application/json | List of reports |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/analytics/%7Bnamespace%7D/reports?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isMultiMetric=SOME_BOOLEAN_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/{namespace}/reports — Create report analysis
/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-create
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_REPORTS_CREATE, ANALYTICS_BACKEND_REPORT_CREATE
User role permission required: analytics: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · analytics-ReportRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | optional | Structure of the report analysis |
allowNull | boolean | optional | When true, null values can be included in the results.
|
Responses
| Status | Description |
|---|---|
200 application/json | ID of the created report |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/reports \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"reportMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"action":{"id":0,"name":"page.visit"},"format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"columnName":"string","grouping":{"type":"TOP","top":0},"groups":[{"title":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}]}]},"allowNull":true}'
GET /analytics/{namespace}/reports/{reportId} — Get report analysis details
/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-get
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_REPORTS_READ, ANALYTICS_BACKEND_REPORT_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
reportId | path | string | required | Report ID |
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Responses
| Status | Description |
|---|---|
200 application/json | Get report analysis details |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/reports/%7BreportId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
PUT /analytics/{namespace}/reports/{reportId} — Update report analysis
/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-update
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_REPORTS_UPDATE, ANALYTICS_BACKEND_REPORT_UPDATE
User role permission required: analytics: update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
reportId | path | string | required | Report ID |
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · analytics-ReportRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | optional | Structure of the report analysis |
allowNull | boolean | optional | When true, null values can be included in the results.
|
Responses
| Status | Description |
|---|---|
200 | Report analysis updated |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request PUT \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/reports/%7BreportId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"reportMetrics":[{"metricId":"c2cc9ad9-a69d-40a3-8e01-a95e09e71978","dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"action":{"id":0,"name":"page.visit"},"format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"columnName":"string","grouping":{"type":"TOP","top":0},"groups":[{"title":"string","format":{"compactNumbers":false,"currency":"EUR","dataFormat":"cash","fixedLength":0,"useSeparator":false},"type":"CLIENT","attribute":{"type":"SEGMENTATION","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08"}}]}]},"allowNull":true}'
DELETE /analytics/{namespace}/reports/{reportId} — Delete report analysis
/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-delete
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_REPORTS_DELETE, ANALYTICS_BACKEND_REPORT_DELETE
User role permission required: analytics: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
reportId | path | string | required | Report ID |
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Responses
| Status | Description |
|---|---|
204 | Report analysis deleted |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/reports/%7BreportId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Analytics: Sankeys
POST /analytics/analytics/v2/sankeys/preview — Preview Sankey analysis
/api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankey-preview-override
Preview the results of a Sankey analysis. This request doesn't save the analysis.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_SANKEY_READ
User role permission required: analytics: read
Request body (required)
application/json · analytics-CreateRequestSankeyAnalysis
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | required | Details of a Sankey analysis |
Responses
| Status | Description |
|---|---|
200 application/json;charset=UTF-8 | Calculation results |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v2/sankeys/preview \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"eventName":"page.visit","attribute":{"type":"PARAM","param":"string","id":0},"layer":0}],"drillDownCount":null,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"excludeEvents":true,"firstOccurrenceOnly":true}}'
GET /analytics/{namespace}/sankeys — List Sankeys
/api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-list
Returns a paginated list of Sankey analyses.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_SANKEYS_LIST_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | optional | The number of the page to retrieve |
limit | query | integer | optional | Limit of items per page |
search | query | string | optional | A string to search for in analyses' titles |
sortBy | query | enum<"name:asc", "name:desc", "author:asc", "author:desc", …> | optional | You can sort the results. The sorting direction is selected by adding asc or desc, for example sortBy=name:desc.
|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
directoryId | query | string | optional | Unique ID of the directory to retrieve analyses from |
ids | query | string | optional | Comma-separated list of IDs (in UUID format) to filter results through |
Responses
| Status | Description |
|---|---|
200 application/json | List of sankeys |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/analytics/%7Bnamespace%7D/sankeys?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/{namespace}/sankeys — Create Sankey analysis
/api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-create
Create sankey analysis
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_SANKEYS_CREATE, ANALYTICS_BACKEND_SANKEY_CREATE
User role permission required: analytics: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · analytics-SankeyRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | required | Details of a Sankey analysis |
Responses
| Status | Description |
|---|---|
200 application/json | ID of the created analysis |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/sankeys \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"eventName":"page.visit","attribute":{"type":"PARAM","param":"string","id":0},"layer":0}],"drillDownCount":null,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"excludeEvents":true,"firstOccurrenceOnly":true}}'
GET /analytics/{namespace}/sankeys/{sankeyId} — Get Sankey details
/api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-get
Retrieve the details of a Sankey analysis
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_SANKEYS_LIST_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
sankeyId | path | string | required | Sankey UUID |
Responses
| Status | Description |
|---|---|
200 application/json | Sankey analysis details |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
PUT /analytics/{namespace}/sankeys/{sankeyId} — Update Sankey
/api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-update
Update an existing Sankey analysis
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_SANKEYS_UPDATE, ANALYTICS_BACKEND_SANKEY_UPDATE
User role permission required: analytics: update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
sankeyId | path | string | required | Sankey UUID |
Request body
application/json · analytics-SankeyRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | required | Details of a Sankey analysis |
Responses
| Status | Description |
|---|---|
200 | Analysis updated |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request PUT \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","sourceEvent":{"action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]},"reverseOrder":true,"numberOfSteps":0,"numberOfPaths":0,"drillDown":[{"eventName":"page.visit","attribute":{"type":"PARAM","param":"string","id":0},"layer":0}],"drillDownCount":null,"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"eventFilters":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"excludeEvents":true,"firstOccurrenceOnly":true}}'
DELETE /analytics/{namespace}/sankeys/{sankeyId} — Delete Sankey
/api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-delete
Delete a Sankey analysis
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_SANKEYS_DELETE, ANALYTICS_BACKEND_SANKEY_DELETE
User role permission required: analytics: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
sankeyId | path | string | required | Sankey UUID |
Responses
| Status | Description |
|---|---|
204 | Deleted sankeys analysis |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/sankeys/%7BsankeyId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Analytics: Segmentations
POST /analytics/analytics/v2/segmentations/{segmentationId}/dynamic/value — Calculate dynamic segmentation
Calculate a segmentation that includes variables (dynamic keys).
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_SEGMENTATION_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
segmentationId | path | string | required | Segmentation UUID |
Request body
application/json · analytics-DynamicVariablesRequest
| Field | Type | Required | Description |
|---|---|---|---|
variables | array<object> | required | Dynamic keys used in this analysis |
Responses
| Status | Description |
|---|---|
200 application/json | Segmentation calculation results |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v2/segmentations/%7BsegmentationId%7D/dynamic/value \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"variables":[{"name":"event.params.PARAMNAME","value":"string"}]}'
POST /analytics/analytics/v2/segmentations/preview — Preview segmentation
Preview the results of a segmentation, with information about the results of each segment. This request does not save the analysis.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_SEGMENTATION_READ
User role permission required: analytics: read
Request body
application/json · analytics-SegmentationPreviewRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | required | Definition of the segmentation. |
allowNull | boolean | optional | When true, null values can be included in the results.
|
Responses
| Status | Description |
|---|---|
200 application/json | Calculation result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v2/segmentations/preview \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}],"unique":true},"allowNull":true}'
POST /analytics/analytics/v2/segmentations/preview/clients — Preview profiles in segmentation
Calculate a segmentation and get a list of profiles in each segment. This request doesn't save the segmentation in the database.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_SEGMENTATION_READ
User role permission required: analytics: read
Request body
application/json · analytics-SegmentationPreviewRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | required | Definition of the segmentation. |
allowNull | boolean | optional | When true, null values can be included in the results.
|
Responses
| Status | Description |
|---|---|
200 application/json | Array of segments |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v2/segmentations/preview/clients \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}],"unique":true},"allowNull":true}'
POST /analytics/profiles/segmentations/firstMatch/by/{identifierType} — Get first matching segmentation for profile from provided list
Check a number of segmentations and return the first one that matches the selected profile. Note that segmentations is a list of objects to check, and each object can also refer to multiple segmentations.
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_SEGMENTATIONS_READ, ANALYTICS_BACKEND_SEGMENTATION_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
identifierType | path | enum<"id", "uuid", "email", "custom_identify"> | required | Profile identifier type |
Request body (required)
application/json · analytics-AnalyticsFirstMatchRequest
| Field | Type | Required | Description |
|---|---|---|---|
identifierValue | string | required | Value of the selected identifier. Note that IDs must also be sent as strings. |
segmentations | array<analytics-FirstMatchingSegmentation> | required | An array of objects. The objects are checked in the order from the array, and when a segmentation from an object matches the profile, the value of that object's id is returned in the response. Note that each object can check multiple segmentations - in such cases, only one of those segmentation needs to match for the object to be considered a match.
|
Responses
| Status | Description |
|---|---|
200 application/json | Identifier (id from the request body) of the matched entry
|
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/profiles/segmentations/firstMatch/by/%7BidentifierType%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"identifierValue":"string","segmentations":[{"id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","segmentationIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"query":{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{}]}],"title":"string"}}],"expression":{}}}],"unique":true}}}]}'
GET /analytics/{namespace}/segmentations — List segmentations
/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentations-list
Returns a paginated list of segmentations.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_SEGMENTATIONS_LIST_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | optional | The number of the page to retrieve |
limit | query | integer | optional | Limit of items per page |
search | query | string | optional | A string to search for in analyses' titles |
sortBy | query | enum<"name:asc", "name:desc", "author:asc", "author:desc", …> | optional | You can sort the results. The sorting direction is selected by adding asc or desc, for example sortBy=name:desc.
|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
directoryId | query | string | optional | Unique ID of the directory to retrieve analyses from |
ids | query | string | optional | Comma-separated list of IDs (in UUID format) to filter results through |
shareType | query | enum<"CROSSWORKSPACE", "INTERNAL"> | optional | Type of sharing process |
Responses
| Status | Description |
|---|---|
200 application/json | List of segmentations |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&shareType=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/{namespace}/segmentations — Create segmentation
Create a new segmentation
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_SEGMENTATIONS_CREATE, ANALYTICS_BACKEND_SEGMENTATION_CREATE
User role permission required: analytics: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · analytics-SegmentationRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | required | Definition of the segmentation. |
isVisibleForClientProfile | boolean | required | When set to true, information about this analysis is shown on a profile's card.
|
Responses
| Status | Description |
|---|---|
200 application/json | ID of the created segmentation |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}],"unique":true},"isVisibleForClientProfile":true}'
GET /analytics/{namespace}/segmentations/{segmentationId} — Get segmentation details
/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-get
Retrieve the details of a segmentation analysis
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_SEGMENTATIONS_READ, ANALYTICS_BACKEND_SEGMENTATION_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
segmentationId | path | string | required | Segmentation UUID |
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Responses
| Status | Description |
|---|---|
200 application/json | Segmentation details |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
PUT /analytics/{namespace}/segmentations/{segmentationId} — Update segmentation
/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-update
Update an existing segmentation analysis.
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_SEGMENTATIONS_UPDATE, ANALYTICS_BACKEND_SEGMENTATION_UPDATE
User role permission required: analytics: update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
segmentationId | path | string | required | Segmentation UUID |
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · analytics-SegmentationRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | required | Definition of the segmentation. |
isVisibleForClientProfile | boolean | required | When set to true, information about this analysis is shown on a profile's card.
|
Responses
| Status | Description |
|---|---|
200 | Segmentation updated |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request PUT \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","segments":[{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}}}],"unique":true},"isVisibleForClientProfile":true}'
DELETE /analytics/{namespace}/segmentations/{segmentationId} — Delete segmentation
/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-delete
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_SEGMENTATIONS_DELETE, ANALYTICS_BACKEND_SEGMENTATION_DELETE
User role permission required: analytics: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
segmentationId | path | string | required | Segmentation UUID |
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Responses
| Status | Description |
|---|---|
204 | Deleted segmentation analysis |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations/%7BsegmentationId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/{namespace}/segmentations/visible-for-client/by/{identifierType} — Get segmentations for profile card
Retrieve segmentations to display on a profile's card in the Profiles module ("isVisibleForClientProfile": true) in the segmentation config).
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_SEGMENTATIONS_FOR_CLIENT_READ
User role permission required (at least one): analytics: read, client_analytics_preview: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
identifierType | path | enum<"id", "uuid", "email", "custom_identify"> | required | Profile identifier type |
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · object
| Field | Type | Required | Description |
|---|---|---|---|
identifierValue | string | required | Value of the selected identifier. Note that IDs must also be sent as strings. |
Responses
| Status | Description |
|---|---|
200 application/json | List of checked segmentations configured as visible on the profile card |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations/visible-for-client/by/%7BidentifierType%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"identifierValue":"string"}'
POST /analytics/{namespace}/segmentations/check/by/{identifierType} — Check if profile in segmentations
/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-check
Check if a profile is in a number of segmentations.
IMPORTANT: This endpoint is limited to:
- 10 segmentations per request
- 500 requests per second
- 10 requests per second per profile
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_SEGMENTATIONS_LIST_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
identifierType | path | enum<"id", "uuid", "email", "custom_identify"> | required | Profile identifier type |
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · object
| Field | Type | Required | Description |
|---|---|---|---|
identifierValue | string | required | Value of the selected identifier. Note that IDs must also be sent as strings. |
segmentationIds | array<analytics-analyticId> | required | UUIDs of the segmentations to check |
Responses
| Status | Description |
|---|---|
200 application/json | Check results |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/segmentations/check/by/%7BidentifierType%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"identifierValue":"string","segmentationIds":["5370bf3c-2dfa-4e89-98ff-07100cffee6c"]}'
Analytics: Trends
GET /analytics/{namespace}/trends — List trends
/api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trends-list
Returns a paginated list of trends.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_TRENDS_LIST_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | optional | The number of the page to retrieve |
limit | query | integer | optional | Limit of items per page |
search | query | string | optional | A string to search for in analyses' titles |
sortBy | query | enum<"name:asc", "name:desc", "author:asc", "author:desc", …> | optional | You can sort the results. The sorting direction is selected by adding asc or desc, for example sortBy=name:desc.
|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
directoryId | query | string | optional | Unique ID of the directory to retrieve analyses from |
ids | query | string | optional | Comma-separated list of IDs (in UUID format) to filter results through |
Responses
| Status | Description |
|---|---|
200 application/json | List of trends |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/analytics/%7Bnamespace%7D/trends?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/{namespace}/trends — Create a trend
/api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trend-create
Create a trend.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_TRENDS_CREATE
User role permission required: analytics_trends: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
Request body
application/json · analytics-TrendRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | required | Details of a trend analysis |
Responses
| Status | Description |
|---|---|
200 application/json | Trend created |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/trends \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"trend":{"aggregateDataBy":{"type":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"trendDefinitions":[{"title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}}}'
GET /analytics/{namespace}/trends/{trendId} — Get trend details
/api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trend-get
Retrieve the definition of a single trend
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_TRENDS_READ, ANALYTICS_BACKEND_TREND_READ
User role permission required: analytics_trends: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
trendId | path | string | required | Trend UUID |
Responses
| Status | Description |
|---|---|
200 application/json | Details of a trend |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/trends/%7BtrendId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
PUT /analytics/{namespace}/trends/{trendId} — Update trend
/api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trend-update
Update an existing trend
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_TRENDS_UPDATE, ANALYTICS_BACKEND_TREND_UPDATE
User role permission required: analytics_trends: update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
trendId | path | string | required | Trend UUID |
Request body
application/json · analytics-TrendRequest
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | required | Details of a trend analysis |
Responses
| Status | Description |
|---|---|
200 | Trend updated |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request PUT \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/trends/%7BtrendId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"trend":{"aggregateDataBy":{"type":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"trendDefinitions":[{"title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}}}'
DELETE /analytics/{namespace}/trends/{trendId} — Delete trend
/api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trend-delete
Delete a trend.
API consumers: Synerise User, Workspace (Business Profile)
API key permissions required (at least one): ANALYTICS_BACKEND_TRENDS_DELETE, ANALYTICS_BACKEND_TREND_DELETE
User role permission required: analytics_trends: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
namespace | path | enum<"profiles"> | required | Namespace. Currently, only profiles is available.
|
trendId | path | string | required | Trend UUID |
Responses
| Status | Description |
|---|---|
204 | Trend deleted |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/analytics/%7Bnamespace%7D/trends/%7BtrendId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/analytics/v2/trends/{trendId}/recalculate/override — Calculate trend with parameter override
Recalculate a trend with new parameters and/or variable (dynamic key) values.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_TREND_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
trendId | path | string | required | Trend UUID |
Request body
application/json · analytics-OverrideQueryRequest
| Field | Type | Required | Description |
|---|---|---|---|
dateFilter | optional | Definition of a date filter. Only data that meets the result of the filter will be included in the analysis. For no filter, leave this object empty. An absolute date filter lets you define static dates and times that always apply to the analysis. A relative date filter lets you create a date filter that goes back a certain time from the moment of calculating the analysis. | |
aggregateDataBy | optional | ||
filter | object | optional | This filter lets you limit the results to profiles that match it. For no filter, leave the object empty. |
variables | array<analytics-Variable> | required | A list of variable values to use in this calculation |
Responses
| Status | Description |
|---|---|
200 application/json | Trend calculation result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v2/trends/%7BtrendId%7D/recalculate/override \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0},"filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"variables":[{"name":"string","value":"string"}]}'
POST /analytics/analytics/v2/trends/preview — Preview trend calculation
/api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-preview-trend
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_BACKEND_TREND_READ
User role permission required: analytics: read
Request body
application/json · object
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | required | Details of a trend analysis |
Responses
| Status | Description |
|---|---|
200 application/json | Calculation result |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/v2/trends/preview \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"analysis":{"title":"string","description":"string","filter":{"matching":true,"expressions":[{"type":"FUNNEL","matching":true,"funnel":{"completedWithin":{"period":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"exact":false,"steps":[{"title":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}]}],"title":"string"}}],"expression":{}},"trend":{"aggregateDataBy":{"type":"YEARS","value":0},"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"trendDefinitions":[{"title":"string","description":"string","action":{"id":0,"name":"page.visit"},"expressions":[{"attribute":{"type":"PARAM","param":"string","id":0},"constraint":{"type":"BOOL","logic":"IS_TRUE"}}],"tabIndex":0,"aggregationType":"EVENT","chartType":"COLUMN"}]}}}'
Analytics: Management
POST /analytics/analytics/batch-delete — Delete multiple analyses
/api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-analytics-batch-delete
Deletes many analytics in a single request
API consumer: Synerise User
User role permission required: analytics: delete
Request body (required)
application/json · analytics-AnalyticsBatchDeleteRequest
| Field | Type | Required | Description |
|---|---|---|---|
funnelIds | array<string> | required | A list of funnels to delete |
segmentationIds | array<string> | required | A list of segmentations to delete |
trendIds | array<string> | required | A list of trends to delete |
metricIds | array<string> | required | A list of metrics to delete |
histogramIds | array<string> | required | A list of histograms to delete |
reportIds | array<string> | required | A list of reports to delete |
aggregateIds | array<string> | required | A list of aggregates to delete |
expressionIds | array<string> | required | A list of expressions to delete |
sankeyIds | array<string> | required | A list of sankey analyses to delete |
Responses
| Status | Description |
|---|---|
204 | Analytics deleted |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/analytics/batch-delete \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"funnelIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"segmentationIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"trendIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"metricIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"histogramIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"reportIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"aggregateIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"expressionIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"sankeyIds":["497f6eca-6276-4993-bfeb-53cbbbba6f08"]}'
GET /analytics/directories — List directories
/api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-list
Returns a list of directories for a given analytic type.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_DESCRIPTION_ANALYTICS_READ
User role permission required: analytics: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
analyticType | query | enum<"EXPRESSION", "AGGREGATE", "SEGMENTATION", "METRIC", …> | required | Type of object |
Responses
| Status | Description |
|---|---|
200 application/json | List of directories |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/analytics/directories?analyticType=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /analytics/directories — Create directory
/api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-create
Creates a new directory
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_DESCRIPTION_ANALYTICS_CREATE
User role permission required: analytics: create
Request body
application/json · analytics-DirectoryCreateRequest
| Field | Type | Required | Description |
|---|---|---|---|
name | string | required | Name of the resource |
analyticType | enum<"EXPRESSION", "AGGREGATE", "SEGMENTATION", "METRIC", …> | required |
Responses
| Status | Description |
|---|---|
201 application/json | ID of the created directory |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/analytics/directories \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":"string","analyticType":"EXPRESSION"}'
PATCH /analytics/directories/{directoryId} — Rename directory
/api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-rename
Renames a directory
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_DESCRIPTION_ANALYTICS_UPDATE
User role permission required: analytics: update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
directoryId | path | string | required | ID of a directory |
Request body
application/json · analytics-DirectoryRenameRequest
| Field | Type | Required | Description |
|---|---|---|---|
newName | string | required | New name for the directory |
Responses
| Status | Description |
|---|---|
204 | Directory renamed |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request PATCH \
--url https://api.synerise.com/analytics/directories/%7BdirectoryId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"newName":"string"}'
DELETE /analytics/directories/{directoryId} — Delete directory
/api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-delete
Deletes a directory. If the directory contains any analyses, they are moved to the default directory.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_DESCRIPTION_ANALYTICS_DELETE
User role permission required: analytics: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
directoryId | path | string | required | ID of a directory |
Responses
| Status | Description |
|---|---|
204 | Directory deleted |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/analytics/directories/%7BdirectoryId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
PATCH /analytics/directories/change/{analyticId} — Change Directory
/api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-change
Moves an analysis to another directory
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: ANALYTICS_DESCRIPTION_ANALYTICS_UPDATE
User role permission required: analytics: update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
analyticId | path | string | required | ID of the analysis |
Request body
application/json · analytics-DirectoryChangeRequest
| Field | Type | Required | Description |
|---|---|---|---|
newDir | string | required | ID of the new directory |
analyticType | enum<"EXPRESSION", "AGGREGATE", "SEGMENTATION", "METRIC", …> | required |
Responses
| Status | Description |
|---|---|
204 | Analysis moved |
4XX application/json | See error message for details |
5XX application/json | See error message for details |
Example request (cURL)
curl --request PATCH \
--url https://api.synerise.com/analytics/directories/change/%7BanalyticId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"newDir":"927cf82e-bfcc-4026-ba0d-96408cda03cb","analyticType":"EXPRESSION"}'