diff --git a/app/composer.json b/app/composer.json index 00edcac39..fa795b179 100644 --- a/app/composer.json +++ b/app/composer.json @@ -13,12 +13,15 @@ "slim/twig-view": "^3.0.0", "php-di/php-di": "^7.0", "ext-json": "*", - "symfony/yaml": "^6.4.7" + "symfony/yaml": "^6.4.7", + "swagger-api/swagger-ui": "^5.29" }, - "require-dev": {}, "scripts": { "serve": [ "php -S 0.0.0.0:8000 -t public" + ], + "start-ddev": [ + "cd .. && bash ddev-developer-docs.sh" ] } } diff --git a/app/composer.lock b/app/composer.lock index b9c9f8253..f9b26cb3e 100644 --- a/app/composer.lock +++ b/app/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8e7625275ee088c7506467802bf801e4", + "content-hash": "59e820d0a20ce981d153bfe54e80c92d", "packages": [ { "name": "dflydev/dot-access-data", @@ -1487,6 +1487,67 @@ }, "time": "2024-09-26T05:42:02+00:00" }, + { + "name": "swagger-api/swagger-ui", + "version": "v5.29.0", + "source": { + "type": "git", + "url": "https://github.com/swagger-api/swagger-ui.git", + "reference": "26e6d3cce2a49195681116c97318b2a38c06e21c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/26e6d3cce2a49195681116c97318b2a38c06e21c", + "reference": "26e6d3cce2a49195681116c97318b2a38c06e21c", + "shasum": "" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Anna Bodnia", + "email": "anna.bodnia@gmail.com" + }, + { + "name": "Buu Nguyen", + "email": "buunguyen@gmail.com" + }, + { + "name": "Josh Ponelat", + "email": "jponelat@gmail.com" + }, + { + "name": "Kyle Shockey", + "email": "kyleshockey1@gmail.com" + }, + { + "name": "Robert Barnwell", + "email": "robert@robertismy.name" + }, + { + "name": "Sahar Jafari", + "email": "shr.jafari@gmail.com" + } + ], + "description": " Swagger UI is a collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.", + "homepage": "http://swagger.io", + "keywords": [ + "api", + "documentation", + "openapi", + "specification", + "swagger", + "ui" + ], + "support": { + "issues": "https://github.com/swagger-api/swagger-ui/issues", + "source": "https://github.com/swagger-api/swagger-ui/tree/v5.29.0" + }, + "time": "2025-09-09T14:04:45+00:00" + }, { "name": "symfony/deprecation-contracts", "version": "v3.5.1", diff --git a/app/config/app.php b/app/config/app.php index 2cef9144f..85c1d339a 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -24,3 +24,7 @@ if (! defined('WEBHOOK_TOKEN')) { define('WEBHOOK_TOKEN', '$2y$10$7StRWWP4gYyuhLIOAWD1Cuw.jOsMWuTwi9DTENPUVakrNN4/H31Gq'); // "changeme" } + +if (! defined('DISABLE_INCLUDE_HTTPS')) { + define('DISABLE_INCLUDE_HTTPS', false); // This is mainly to change local URLs to http if not using https in development +} diff --git a/app/helpers/Markdown/IncludeFilePostprocessor.php b/app/helpers/Markdown/IncludeFilePostprocessor.php index baa1e6d78..731bde6a3 100644 --- a/app/helpers/Markdown/IncludeFilePostprocessor.php +++ b/app/helpers/Markdown/IncludeFilePostprocessor.php @@ -67,6 +67,17 @@ private function getFileContent($url, $escape) return 'remote file inclusion disabled'; } + // Replace the placeholder with the actual domain + if (str_contains($url, '[DOCS_DOMAIN]')) { + $url = str_replace('[DOCS_DOMAIN]', DOCS_DOMAIN, $url); + } + + // When necessary, convert to http for local development environments + if (str_contains($url, '[HTTPS]')) { + $protocol = DISABLE_INCLUDE_HTTPS ? 'http://' : 'https://'; + $url = str_replace('[HTTPS]', $protocol, $url); + } + try { $content = @file_get_contents($url); if ($content) { diff --git a/app/openapi/demo_matomo_spec_v1.0.0.json b/app/openapi/demo_matomo_spec_v1.0.0.json new file mode 100644 index 000000000..7327a6512 --- /dev/null +++ b/app/openapi/demo_matomo_spec_v1.0.0.json @@ -0,0 +1,12141 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Matomo Reporting API", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https:\/\/demo.matomo.cloud\/", + "description": "Matomo demo server" + } + ], + "paths": { + "\/index.php?module=API&method=CustomReports.duplicateCustomReport": { + "get": { + "tags": [ + "CustomReports" + ], + "summary": "Copies a specified custom report to one or more sites. If a custom report with the same name already exists, the new custom report\nwill have an automatically adjusted name to make it unique to the assigned site.", + "operationId": "CustomReports.duplicateCustomReport", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idCustomReport", + "in": "query", + "description": "The ID of the custom report to duplicate.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "idDestinationSites", + "in": "query", + "description": "Optional array of IDs identifying which site(s) the new custom report is to be assigned to. The default is [idSite] when nothing is provided.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer" + }, + "default": [] + } + } + ], + "responses": { + "200": { + "description": "Response indicating success and containing the ID of the newly created report.", + "content": { + "text\/xml": { + "schema": { + "properties": { + "additionalData": { + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "success": "1", + "message": "The custom report has been successfully copied.", + "additionalData": { + "idSite": "1", + "idDestinationSites": "", + "idCustomReport": "1", + "newIds": "9" + } + } + }, + "application\/json": { + "schema": { + "properties": { + "success": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "additionalData": { + "properties": { + "idSite": { + "type": "integer" + }, + "idDestinationSites": { + "type": "array", + "items": [] + }, + "idCustomReport": { + "type": "integer" + }, + "newIds": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "example": { + "success": true, + "message": "The custom report has been successfully copied.", + "additionalData": { + "idSite": 1, + "idDestinationSites": [], + "idCustomReport": 1, + "newIds": 9 + } + } + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=CustomReports.addCustomReport": { + "get": { + "tags": [ + "CustomReports" + ], + "summary": "Adds a new custom report", + "operationId": "CustomReports.addCustomReport", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "name", + "in": "query", + "description": "The name of the report.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "reportType", + "in": "query", + "description": "The type of report you want to create, for example 'table' or 'evolution'. For a list of available reports call 'CustomReports.getAvailableReportTypes'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "metricIds", + "in": "query", + "description": "A list of metric IDs. For a list of available metrics call 'CustomReports.getAvailableMetrics'", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "categoryId", + "in": "query", + "description": "By default, the report will be put into a custom report category unless a specific categoryId is provided. For a list of available categories call 'CustomReports.getAvailableCategories'.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "dimensionIds", + "in": "query", + "description": "A list of dimension IDs. For a list of available metrics call 'CustomReports.getAvailableDimensions'", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + } + }, + { + "name": "subcategoryId", + "in": "query", + "description": "By default, a new reporting page will be created for this report unless you specifiy a specific name or subcategoryID. For a list of available subcategories call 'CustomReports.getAvailableCategories'.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "description", + "in": "query", + "description": "An optional description for the report, will be shown in the title help icon of the report.", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "segmentFilter", + "in": "query", + "description": "An optional segment to filter the report data. Needs to be sent urlencoded.", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "multipleIdSites", + "in": "query", + "description": "An optional list of idsites for which we need to execute the report", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericInteger" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=CustomReports.updateCustomReport": { + "get": { + "tags": [ + "CustomReports" + ], + "summary": "Updates an existing custom report. Be aware that if you change metrics, dimensions, the report type or the segment filter,\npreviously processed\/archived reports may become unavailable and would need to be re-processed.", + "operationId": "CustomReports.updateCustomReport", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idCustomReport", + "in": "query", + "description": "The ID of the custom report to update.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "name", + "in": "query", + "description": "The name of the report.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "reportType", + "in": "query", + "description": "The type of report you want to create, for example 'table' or 'evolution'. For a list of available reports call 'CustomReports.getAvailableReportTypes'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "metricIds", + "in": "query", + "description": "A list of metric IDs. For a list of available metrics call 'CustomReports.getAvailableMetrics'", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "categoryId", + "in": "query", + "description": "By default, the report will be put into a custom report category unless a specific categoryId is provided. For a list of available categories call 'CustomReports.getAvailableCategories'.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "dimensionIds", + "in": "query", + "description": "A list of dimension IDs. For a list of available metrics call 'CustomReports.getAvailableDimensions'", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + } + }, + { + "name": "subcategoryId", + "in": "query", + "description": "By default, a new reporting page will be created for this report unless you specifiy a specific name or subcategoryID. For a list of available subcategories call 'CustomReports.getAvailableCategories'.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "description", + "in": "query", + "description": "An optional description for the report, will be shown in the title help icon of the report.", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "segmentFilter", + "in": "query", + "description": "An optional segment to filter the report data. Needs to be sent urlencoded.", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "subCategoryReportIds", + "in": "query", + "description": "List of sub report ids mapped to this report", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer" + }, + "default": [] + } + }, + { + "name": "multipleIdSites", + "in": "query", + "description": "An optional list of idsites for which we need to execute the report", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=CustomReports.getConfiguredReports": { + "get": { + "tags": [ + "CustomReports" + ], + "summary": "Get all custom report configurations for a specific site.", + "operationId": "CustomReports.getConfiguredReports", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "skipCategoryMetadata", + "in": "query", + "description": "Optional flag indicating whether to omit metadata for the category.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=CustomReports.getConfiguredReports&idSite=1&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=CustomReports.getConfiguredReports&idSite=1&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "properties": { + "category": { + "type": "object" + }, + "dimensions": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "metrics": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "site": { + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "idcustomreport": "1", + "idsite": "1", + "revision": "0", + "report_type": "table", + "name": "Pages by New\\\/Returning visitor", + "description": "", + "category": { + "id": "CustomReports_CustomReports", + "name": "Custom Reports", + "order": "65", + "icon": "icon-business" + }, + "subcategory": "", + "subcategory_order": "9999999", + "dimensions": { + "row": [ + "CoreHome.VisitorReturning", + "Actions.PageTitle" + ] + }, + "metrics": { + "row": [ + "nb_uniq_visitors", + "nb_visits", + "pageviews" + ] + }, + "segment_filter": "", + "created_date": "2017-10-20 02:31:50", + "updated_date": "2017-10-20 02:31:50", + "status": "active", + "multiple_idsites": "", + "site": { + "id": "1", + "name": "Demo Site" + }, + "allowedToEdit": "0" + }, + { + "idcustomreport": "2", + "idsite": "1", + "revision": "0", + "report_type": "table", + "name": "Bali pages, breakdown new\\\/returning", + "description": "", + "category": { + "id": "CustomReports_CustomReports", + "name": "Custom Reports", + "order": "65", + "icon": "icon-business" + }, + "subcategory": "", + "subcategory_order": "9999999", + "dimensions": { + "row": [ + "Actions.PageTitle", + "CoreHome.VisitorReturning" + ] + }, + "metrics": { + "row": [ + "nb_uniq_visitors", + "pageviews", + "nb_visits" + ] + }, + "segment_filter": "pageTitle=@bali", + "created_date": "2017-10-20 02:41:08", + "updated_date": "2017-10-20 02:41:08", + "status": "active", + "multiple_idsites": "", + "site": { + "id": "1", + "name": "Demo Site" + }, + "allowedToEdit": "0" + }, + { + "idcustomreport": "5", + "idsite": "1", + "revision": "0", + "report_type": "table", + "name": "Country by New\\\/returning with a filter", + "description": "", + "category": { + "id": "CustomReports_CustomReports", + "name": "Custom Reports", + "order": "65", + "icon": "icon-business" + }, + "subcategory": "", + "subcategory_order": "9999999", + "dimensions": { + "row": [ + "UserCountry.Country", + "CoreHome.VisitorReturning" + ] + }, + "metrics": { + "row": [ + "nb_uniq_visitors", + "goal_7_conversion", + "goal_7_conversion_uniq_visitors_rate" + ] + }, + "segment_filter": "countryCode!=pl", + "created_date": "2018-01-26 03:51:11", + "updated_date": "2018-01-26 03:51:11", + "status": "active", + "multiple_idsites": "", + "site": { + "id": "1", + "name": "Demo Site" + }, + "allowedToEdit": "0" + }, + { + "idcustomreport": "8", + "idsite": "1", + "revision": "0", + "report_type": "evolution", + "name": "Evolution KPIs", + "description": "", + "category": { + "id": "CustomReports_CustomReports", + "name": "Custom Reports", + "order": "65", + "icon": "icon-business" + }, + "subcategory": "", + "subcategory_order": "9999999", + "dimensions": "", + "metrics": { + "row": [ + "nb_uniq_visitors", + "goal_7_conversion", + "goal_7_conversion_uniq_visitors_rate", + "goal_4_conversion" + ] + }, + "segment_filter": "", + "created_date": "2018-04-03 02:55:32", + "updated_date": "2018-04-03 02:55:32", + "status": "active", + "multiple_idsites": "", + "site": { + "id": "1", + "name": "Demo Site" + }, + "allowedToEdit": "0" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "idcustomreport": { + "type": "integer" + }, + "idsite": { + "type": "integer" + }, + "revision": { + "type": "integer" + }, + "report_type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "site": { + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "subcategory": { + "type": [ + "string", + "number", + "integer", + "boolean", + "array", + "object", + "null" + ] + }, + "subcategory_order": { + "type": "integer" + }, + "segment_filter": { + "type": "string" + }, + "created_date": { + "type": "string" + }, + "updated_date": { + "type": "string" + }, + "status": { + "type": "string" + }, + "multiple_idsites": { + "type": [ + "string", + "number", + "integer", + "boolean", + "array", + "object", + "null" + ] + }, + "allowedToEdit": { + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "idcustomreport": 1, + "idsite": 1, + "revision": 0, + "report_type": "table", + "name": "Pages by New\\\/Returning visitor", + "description": "", + "category": { + "id": "CustomReports_CustomReports", + "name": "Custom Reports", + "order": 65, + "icon": "icon-business" + }, + "subcategory": null, + "subcategory_order": 9999999, + "dimensions": [ + "CoreHome.VisitorReturning", + "Actions.PageTitle" + ], + "metrics": [ + "nb_uniq_visitors", + "nb_visits", + "pageviews" + ], + "segment_filter": "", + "created_date": "2017-10-20 02:31:50", + "updated_date": "2017-10-20 02:31:50", + "status": "active", + "multiple_idsites": null, + "site": { + "id": 1, + "name": "Demo Site" + }, + "allowedToEdit": false + }, + { + "idcustomreport": 2, + "idsite": 1, + "revision": 0, + "report_type": "table", + "name": "Bali pages, breakdown new\\\/returning", + "description": "", + "category": { + "id": "CustomReports_CustomReports", + "name": "Custom Reports", + "order": 65, + "icon": "icon-business" + }, + "subcategory": null, + "subcategory_order": 9999999, + "dimensions": [ + "Actions.PageTitle", + "CoreHome.VisitorReturning" + ], + "metrics": [ + "nb_uniq_visitors", + "pageviews", + "nb_visits" + ], + "segment_filter": "pageTitle=@bali", + "created_date": "2017-10-20 02:41:08", + "updated_date": "2017-10-20 02:41:08", + "status": "active", + "multiple_idsites": null, + "site": { + "id": 1, + "name": "Demo Site" + }, + "allowedToEdit": false + }, + { + "idcustomreport": 5, + "idsite": 1, + "revision": 0, + "report_type": "table", + "name": "Country by New\\\/returning with a filter", + "description": "", + "category": { + "id": "CustomReports_CustomReports", + "name": "Custom Reports", + "order": 65, + "icon": "icon-business" + }, + "subcategory": null, + "subcategory_order": 9999999, + "dimensions": [ + "UserCountry.Country", + "CoreHome.VisitorReturning" + ], + "metrics": [ + "nb_uniq_visitors", + "goal_7_conversion", + "goal_7_conversion_uniq_visitors_rate" + ], + "segment_filter": "countryCode!=pl", + "created_date": "2018-01-26 03:51:11", + "updated_date": "2018-01-26 03:51:11", + "status": "active", + "multiple_idsites": null, + "site": { + "id": 1, + "name": "Demo Site" + }, + "allowedToEdit": false + }, + { + "idcustomreport": 8, + "idsite": 1, + "revision": 0, + "report_type": "evolution", + "name": "Evolution KPIs", + "description": "", + "category": { + "id": "CustomReports_CustomReports", + "name": "Custom Reports", + "order": 65, + "icon": "icon-business" + }, + "subcategory": null, + "subcategory_order": 9999999, + "dimensions": [], + "metrics": [ + "nb_uniq_visitors", + "goal_7_conversion", + "goal_7_conversion_uniq_visitors_rate", + "goal_4_conversion" + ], + "segment_filter": "", + "created_date": "2018-04-03 02:55:32", + "updated_date": "2018-04-03 02:55:32", + "status": "active", + "multiple_idsites": null, + "site": { + "id": 1, + "name": "Demo Site" + }, + "allowedToEdit": false + } + ] + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=CustomReports.getConfiguredReport": { + "get": { + "tags": [ + "CustomReports" + ], + "summary": "Get a specific custom report configuration.", + "operationId": "CustomReports.getConfiguredReport", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idCustomReport", + "in": "query", + "description": "The ID of the custom report.", + "required": true, + "schema": { + "type": "integer", + "example": 1 + } + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=CustomReports.getConfiguredReport&idSite=1&idCustomReport=1&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=CustomReports.getConfiguredReport&idSite=1&idCustomReport=1&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "category": { + "type": "object" + }, + "dimensions": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "metrics": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "site": { + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "idcustomreport": "1", + "idsite": "1", + "revision": "0", + "report_type": "table", + "name": "Pages by New\\\/Returning visitor", + "description": "", + "category": { + "id": "CustomReports_CustomReports", + "name": "Custom Reports", + "order": "65", + "icon": "icon-business" + }, + "subcategory": "", + "subcategory_order": "9999999", + "dimensions": { + "row": [ + "CoreHome.VisitorReturning", + "Actions.PageTitle" + ] + }, + "metrics": { + "row": [ + "nb_uniq_visitors", + "nb_visits", + "pageviews" + ] + }, + "segment_filter": "", + "created_date": "2017-10-20 02:31:50", + "updated_date": "2017-10-20 02:31:50", + "status": "active", + "multiple_idsites": "", + "site": { + "id": "1", + "name": "Demo Site" + }, + "child_reports": "", + "multipleIdSites": "", + "allowedToEdit": "0" + } + }, + "application\/json": { + "schema": { + "properties": { + "idcustomreport": { + "type": "integer" + }, + "idsite": { + "type": "integer" + }, + "revision": { + "type": "integer" + }, + "report_type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "multipleIdSites": { + "type": "array", + "items": [] + }, + "subcategory": { + "type": [ + "string", + "number", + "integer", + "boolean", + "array", + "object", + "null" + ] + }, + "subcategory_order": { + "type": "integer" + }, + "segment_filter": { + "type": "string" + }, + "created_date": { + "type": "string" + }, + "updated_date": { + "type": "string" + }, + "status": { + "type": "string" + }, + "multiple_idsites": { + "type": [ + "string", + "number", + "integer", + "boolean", + "array", + "object", + "null" + ] + }, + "allowedToEdit": { + "type": "boolean" + } + }, + "type": "object" + }, + "example": { + "idcustomreport": 1, + "idsite": 1, + "revision": 0, + "report_type": "table", + "name": "Pages by New\\\/Returning visitor", + "description": "", + "category": { + "id": "CustomReports_CustomReports", + "name": "Custom Reports", + "order": 65, + "icon": "icon-business" + }, + "subcategory": null, + "subcategory_order": 9999999, + "dimensions": [ + "CoreHome.VisitorReturning", + "Actions.PageTitle" + ], + "metrics": [ + "nb_uniq_visitors", + "nb_visits", + "pageviews" + ], + "segment_filter": "", + "created_date": "2017-10-20 02:31:50", + "updated_date": "2017-10-20 02:31:50", + "status": "active", + "multiple_idsites": null, + "site": { + "id": 1, + "name": "Demo Site" + }, + "child_reports": [], + "multipleIdSites": [], + "allowedToEdit": false + } + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=CustomReports.deleteCustomReport": { + "get": { + "tags": [ + "CustomReports" + ], + "summary": "Deletes the given custom report.", + "description": "When a custom report is deleted, its report will be no longer available in the API and tracked data for this\nreport might be removed at some point by the system.", + "operationId": "CustomReports.deleteCustomReport", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idCustomReport", + "in": "query", + "description": "The ID of the custom report to duplicate.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "text\/xml": { + "schema": { + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "success": "" + } + }, + "application\/json": { + "schema": { + "properties": { + "result": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "type": "object" + }, + "example": { + "result": "success", + "message": "ok" + } + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=CustomReports.pauseCustomReport": { + "get": { + "tags": [ + "CustomReports" + ], + "summary": "Pauses the given custom report.", + "description": "When a custom report is paused, its report will be no longer be archived", + "operationId": "CustomReports.pauseCustomReport", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idCustomReport", + "in": "query", + "description": "The ID of the custom report to pause.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=CustomReports.resumeCustomReport": { + "get": { + "tags": [ + "CustomReports" + ], + "summary": "Resumes the given custom report.", + "description": "When a custom report is resumed, its report will start archiving again", + "operationId": "CustomReports.resumeCustomReport", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idCustomReport", + "in": "query", + "description": "The ID of the custom report to resume.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=CustomReports.getAvailableCategories": { + "get": { + "tags": [ + "CustomReports" + ], + "summary": "Get a list of available categories that can be used in custom reports.", + "operationId": "CustomReports.getAvailableCategories", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=CustomReports.getAvailableCategories&idSite=1&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=CustomReports.getAvailableCategories&idSite=1&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "properties": { + "subcategories": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "uniqueId": "General_Actions", + "name": "Behaviour", + "subcategories": { + "row": [ + { + "uniqueId": "customdimension2", + "name": "Page Author" + }, + { + "uniqueId": "customdimension4", + "name": "Page Location" + }, + { + "uniqueId": "customdimension5", + "name": "Page Type" + }, + { + "uniqueId": "VisitorInterest_Engagement", + "name": "Engagement" + }, + { + "uniqueId": "Transitions_Transitions", + "name": "Transitions" + }, + { + "uniqueId": "General_Downloads", + "name": "Downloads" + }, + { + "uniqueId": "Actions_SubmenuPagesEntry", + "name": "Entry pages" + }, + { + "uniqueId": "Actions_SubmenuPagesExit", + "name": "Exit pages" + }, + { + "uniqueId": "General_Outlinks", + "name": "Outlinks" + }, + { + "uniqueId": "Actions_SubmenuPageTitles", + "name": "Page titles" + }, + { + "uniqueId": "General_Pages", + "name": "Pages" + }, + { + "uniqueId": "Actions_SubmenuSitesearch", + "name": "Site Search" + }, + { + "uniqueId": "Events_Events", + "name": "Events" + }, + { + "uniqueId": "Contents_Contents", + "name": "Contents" + }, + { + "uniqueId": "PagePerformance_Performance", + "name": "Performance" + }, + { + "uniqueId": "UsersFlow_TopPaths", + "name": "Top Paths" + }, + { + "uniqueId": "UsersFlow_UsersFlow", + "name": "Users Flow" + }, + { + "uniqueId": "SearchEngineKeywordsPerformance_CrawlingErrors", + "name": "Crawling errors" + } + ] + } + }, + { + "uniqueId": "General_Visitors", + "name": "Visitors", + "subcategories": { + "row": [ + { + "uniqueId": "customdimension1", + "name": "User Type" + }, + { + "uniqueId": "DevicesDetection_Devices", + "name": "Devices" + }, + { + "uniqueId": "DevicesDetection_Software", + "name": "Software" + }, + { + "uniqueId": "General_Overview", + "name": "Overview" + }, + { + "uniqueId": "UserCountry_SubmenuLocations", + "name": "Locations" + }, + { + "uniqueId": "VisitTime_SubmenuTimes", + "name": "Times" + }, + { + "uniqueId": "UserCountryMap_RealTimeMap", + "name": "Real-time Map" + }, + { + "uniqueId": "General_RealTime", + "name": "Real-time" + }, + { + "uniqueId": "Live_VisitorLog", + "name": "Visits Log" + }, + { + "uniqueId": "UserId_UserReportTitle", + "name": "User IDs" + }, + { + "uniqueId": "CustomVariables_CustomVariables", + "name": "Custom Variables" + } + ] + } + }, + { + "uniqueId": "Referrers_Referrers", + "name": "Acquisition", + "subcategories": { + "row": [ + { + "uniqueId": "Referrers_AIAssistants", + "name": "AI Assistants" + }, + { + "uniqueId": "Referrers_WidgetGetAll", + "name": "All Channels" + }, + { + "uniqueId": "Referrers_URLCampaignBuilder", + "name": "Campaign URL Builder" + }, + { + "uniqueId": "Referrers_Campaigns", + "name": "Campaigns" + }, + { + "uniqueId": "General_Overview", + "name": "Overview" + }, + { + "uniqueId": "Referrers_SubmenuSearchEngines", + "name": "Search Engines & Keywords" + }, + { + "uniqueId": "Referrers_Socials", + "name": "Social Networks" + }, + { + "uniqueId": "Referrers_SubmenuWebsitesOnly", + "name": "Websites" + }, + { + "uniqueId": "SearchEngineKeywordsPerformance_CrawlingStats", + "name": "Crawling overview" + } + ] + } + }, + { + "uniqueId": "Goals_Goals", + "name": "Goals", + "subcategories": { + "row": [ + { + "uniqueId": "8", + "name": "Agoda click" + }, + { + "uniqueId": "7", + "name": "Liveaboard.com click" + }, + { + "uniqueId": "4", + "name": "New Job Application" + }, + { + "uniqueId": "6", + "name": "New Resume" + }, + { + "uniqueId": "10", + "name": "Newsletter Signup" + }, + { + "uniqueId": "9", + "name": "User Comments" + }, + { + "uniqueId": "5", + "name": "View Submit Job" + }, + { + "uniqueId": "General_Overview", + "name": "Overview" + }, + { + "uniqueId": "MultiChannelConversionAttribution_MultiAttribution", + "name": "Multi Attribution" + } + ] + } + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "uniqueId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "subcategories": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "uniqueId": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "uniqueId": "General_Actions", + "name": "Behaviour", + "subcategories": [ + { + "uniqueId": "customdimension2", + "name": "Page Author" + }, + { + "uniqueId": "customdimension4", + "name": "Page Location" + }, + { + "uniqueId": "customdimension5", + "name": "Page Type" + }, + { + "uniqueId": "VisitorInterest_Engagement", + "name": "Engagement" + }, + { + "uniqueId": "Transitions_Transitions", + "name": "Transitions" + }, + { + "uniqueId": "General_Downloads", + "name": "Downloads" + }, + { + "uniqueId": "Actions_SubmenuPagesEntry", + "name": "Entry pages" + }, + { + "uniqueId": "Actions_SubmenuPagesExit", + "name": "Exit pages" + }, + { + "uniqueId": "General_Outlinks", + "name": "Outlinks" + }, + { + "uniqueId": "Actions_SubmenuPageTitles", + "name": "Page titles" + }, + { + "uniqueId": "General_Pages", + "name": "Pages" + }, + { + "uniqueId": "Actions_SubmenuSitesearch", + "name": "Site Search" + }, + { + "uniqueId": "Events_Events", + "name": "Events" + }, + { + "uniqueId": "Contents_Contents", + "name": "Contents" + }, + { + "uniqueId": "PagePerformance_Performance", + "name": "Performance" + }, + { + "uniqueId": "UsersFlow_TopPaths", + "name": "Top Paths" + }, + { + "uniqueId": "UsersFlow_UsersFlow", + "name": "Users Flow" + }, + { + "uniqueId": "SearchEngineKeywordsPerformance_CrawlingErrors", + "name": "Crawling errors" + } + ] + }, + { + "uniqueId": "General_Visitors", + "name": "Visitors", + "subcategories": [ + { + "uniqueId": "customdimension1", + "name": "User Type" + }, + { + "uniqueId": "DevicesDetection_Devices", + "name": "Devices" + }, + { + "uniqueId": "DevicesDetection_Software", + "name": "Software" + }, + { + "uniqueId": "General_Overview", + "name": "Overview" + }, + { + "uniqueId": "UserCountry_SubmenuLocations", + "name": "Locations" + }, + { + "uniqueId": "VisitTime_SubmenuTimes", + "name": "Times" + }, + { + "uniqueId": "UserCountryMap_RealTimeMap", + "name": "Real-time Map" + }, + { + "uniqueId": "General_RealTime", + "name": "Real-time" + }, + { + "uniqueId": "Live_VisitorLog", + "name": "Visits Log" + }, + { + "uniqueId": "UserId_UserReportTitle", + "name": "User IDs" + }, + { + "uniqueId": "CustomVariables_CustomVariables", + "name": "Custom Variables" + } + ] + }, + { + "uniqueId": "Referrers_Referrers", + "name": "Acquisition", + "subcategories": [ + { + "uniqueId": "Referrers_AIAssistants", + "name": "AI Assistants" + }, + { + "uniqueId": "Referrers_WidgetGetAll", + "name": "All Channels" + }, + { + "uniqueId": "Referrers_URLCampaignBuilder", + "name": "Campaign URL Builder" + }, + { + "uniqueId": "Referrers_Campaigns", + "name": "Campaigns" + }, + { + "uniqueId": "General_Overview", + "name": "Overview" + }, + { + "uniqueId": "Referrers_SubmenuSearchEngines", + "name": "Search Engines & Keywords" + }, + { + "uniqueId": "Referrers_Socials", + "name": "Social Networks" + }, + { + "uniqueId": "Referrers_SubmenuWebsitesOnly", + "name": "Websites" + }, + { + "uniqueId": "SearchEngineKeywordsPerformance_CrawlingStats", + "name": "Crawling overview" + } + ] + }, + { + "uniqueId": "Goals_Goals", + "name": "Goals", + "subcategories": [ + { + "uniqueId": "8", + "name": "Agoda click" + }, + { + "uniqueId": "7", + "name": "Liveaboard.com click" + }, + { + "uniqueId": "4", + "name": "New Job Application" + }, + { + "uniqueId": "6", + "name": "New Resume" + }, + { + "uniqueId": "10", + "name": "Newsletter Signup" + }, + { + "uniqueId": "9", + "name": "User Comments" + }, + { + "uniqueId": "5", + "name": "View Submit Job" + }, + { + "uniqueId": "General_Overview", + "name": "Overview" + }, + { + "uniqueId": "MultiChannelConversionAttribution_MultiAttribution", + "name": "Multi Attribution" + } + ] + } + ] + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=CustomReports.getAvailableReportTypes": { + "get": { + "tags": [ + "CustomReports" + ], + "summary": "Get a list of available report types that can be used in custom reports.", + "operationId": "CustomReports.getAvailableReportTypes", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=CustomReports.getAvailableReportTypes&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=CustomReports.getAvailableReportTypes&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=CustomReports.getAvailableReportTypes&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "key": "table", + "value": "Table" + }, + { + "key": "evolution", + "value": "Evolution" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "key": "table", + "value": "Table" + }, + { + "key": "evolution", + "value": "Evolution" + } + ] + }, + "application\/vnd.ms-excel": { + "example": "key value\n * table Table\n * evolution Evolution" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=CustomReports.getAvailableDimensions": { + "get": { + "tags": [ + "CustomReports" + ], + "summary": "Get a list of available dimensions that can be used in custom reports.", + "operationId": "CustomReports.getAvailableDimensions", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=CustomReports.getAvailableDimensions&idSite=1&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=CustomReports.getAvailableDimensions&idSite=1&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "properties": { + "dimensions": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "category": "Visitor location", + "dimensions": { + "row": [ + { + "uniqueId": "UserCountry.City", + "name": "City", + "sqlSegment": "log_visit.location_city" + }, + { + "uniqueId": "UserCountry.Continent", + "name": "Continent", + "sqlSegment": "log_visit.location_country" + }, + { + "uniqueId": "UserCountry.Country", + "name": "Country", + "sqlSegment": "log_visit.location_country" + }, + { + "uniqueId": "UserLanguage.Language", + "name": "Language", + "sqlSegment": "log_visit.location_browser_lang" + }, + { + "uniqueId": "UserCountry.Latitude", + "name": "Latitude", + "sqlSegment": "log_visit.location_latitude" + }, + { + "uniqueId": "UserCountry.Longitude", + "name": "Longitude", + "sqlSegment": "log_visit.location_longitude" + }, + { + "uniqueId": "UserCountry.Region", + "name": "Region", + "sqlSegment": "log_visit.location_region" + } + ] + }, + "orderId": "7" + }, + { + "category": "Events", + "dimensions": { + "row": [ + { + "uniqueId": "Events.EventAction", + "name": "Event Action", + "sqlSegment": "log_link_visit_action.idaction_event_action" + }, + { + "uniqueId": "Events.EventCategory", + "name": "Event Category", + "sqlSegment": "log_link_visit_action.idaction_event_category" + }, + { + "uniqueId": "Events.EventName", + "name": "Event Name", + "sqlSegment": "log_link_visit_action.idaction_name" + }, + { + "uniqueId": "Events.EventUrl", + "name": "Event URL", + "sqlSegment": "log_link_visit_action.idaction_url" + }, + { + "uniqueId": "Events.EventValue", + "name": "Event Value", + "sqlSegment": "log_link_visit_action.custom_float" + } + ] + }, + "orderId": "12" + }, + { + "category": "Acquisition", + "dimensions": { + "row": [ + { + "uniqueId": "AdvertisingConversionExport.AdClickId", + "name": "Ad Click ID", + "sqlSegment": "log_clickid.adclickid" + }, + { + "uniqueId": "AdvertisingConversionExport.AdProvider", + "name": "Ad Provider", + "sqlSegment": "log_clickid.adprovider" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignContent", + "name": "Campaign Content", + "sqlSegment": "log_visit.campaign_content" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignGroup", + "name": "Campaign Group", + "sqlSegment": "log_visit.campaign_group" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignId", + "name": "Campaign Id", + "sqlSegment": "log_visit.campaign_id" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignKeyword", + "name": "Campaign Keyword", + "sqlSegment": "log_visit.campaign_keyword" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignMedium", + "name": "Campaign Medium", + "sqlSegment": "log_visit.campaign_medium" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignName", + "name": "Campaign Name", + "sqlSegment": "log_visit.campaign_name" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignPlacement", + "name": "Campaign Placement", + "sqlSegment": "log_visit.campaign_placement" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignSource", + "name": "Campaign Source", + "sqlSegment": "log_visit.campaign_source" + }, + { + "uniqueId": "Referrers.ReferrerType", + "name": "Channel Type", + "sqlSegment": "log_visit.referer_type" + }, + { + "uniqueId": "Referrers.Keyword", + "name": "Keyword", + "sqlSegment": "log_visit.referer_keyword" + }, + { + "uniqueId": "Referrers.ReferrerName", + "name": "Referrer Name", + "sqlSegment": "log_visit.referer_name" + }, + { + "uniqueId": "Referrers.ReferrerUrl", + "name": "Referrer URL", + "sqlSegment": "log_visit.referer_url" + } + ] + }, + "orderId": "15" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "category": { + "type": "string" + }, + "dimensions": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "uniqueId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sqlSegment": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "orderId": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "category": "Visitor location", + "dimensions": [ + { + "uniqueId": "UserCountry.City", + "name": "City", + "sqlSegment": "log_visit.location_city" + }, + { + "uniqueId": "UserCountry.Continent", + "name": "Continent", + "sqlSegment": "log_visit.location_country" + }, + { + "uniqueId": "UserCountry.Country", + "name": "Country", + "sqlSegment": "log_visit.location_country" + }, + { + "uniqueId": "UserLanguage.Language", + "name": "Language", + "sqlSegment": "log_visit.location_browser_lang" + }, + { + "uniqueId": "UserCountry.Latitude", + "name": "Latitude", + "sqlSegment": "log_visit.location_latitude" + }, + { + "uniqueId": "UserCountry.Longitude", + "name": "Longitude", + "sqlSegment": "log_visit.location_longitude" + }, + { + "uniqueId": "UserCountry.Region", + "name": "Region", + "sqlSegment": "log_visit.location_region" + } + ], + "orderId": 7 + }, + { + "category": "Events", + "dimensions": [ + { + "uniqueId": "Events.EventAction", + "name": "Event Action", + "sqlSegment": "log_link_visit_action.idaction_event_action" + }, + { + "uniqueId": "Events.EventCategory", + "name": "Event Category", + "sqlSegment": "log_link_visit_action.idaction_event_category" + }, + { + "uniqueId": "Events.EventName", + "name": "Event Name", + "sqlSegment": "log_link_visit_action.idaction_name" + }, + { + "uniqueId": "Events.EventUrl", + "name": "Event URL", + "sqlSegment": "log_link_visit_action.idaction_url" + }, + { + "uniqueId": "Events.EventValue", + "name": "Event Value", + "sqlSegment": "log_link_visit_action.custom_float" + } + ], + "orderId": 12 + }, + { + "category": "Acquisition", + "dimensions": [ + { + "uniqueId": "AdvertisingConversionExport.AdClickId", + "name": "Ad Click ID", + "sqlSegment": "log_clickid.adclickid" + }, + { + "uniqueId": "AdvertisingConversionExport.AdProvider", + "name": "Ad Provider", + "sqlSegment": "log_clickid.adprovider" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignContent", + "name": "Campaign Content", + "sqlSegment": "log_visit.campaign_content" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignGroup", + "name": "Campaign Group", + "sqlSegment": "log_visit.campaign_group" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignId", + "name": "Campaign Id", + "sqlSegment": "log_visit.campaign_id" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignKeyword", + "name": "Campaign Keyword", + "sqlSegment": "log_visit.campaign_keyword" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignMedium", + "name": "Campaign Medium", + "sqlSegment": "log_visit.campaign_medium" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignName", + "name": "Campaign Name", + "sqlSegment": "log_visit.campaign_name" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignPlacement", + "name": "Campaign Placement", + "sqlSegment": "log_visit.campaign_placement" + }, + { + "uniqueId": "MarketingCampaignsReporting.CampaignSource", + "name": "Campaign Source", + "sqlSegment": "log_visit.campaign_source" + }, + { + "uniqueId": "Referrers.ReferrerType", + "name": "Channel Type", + "sqlSegment": "log_visit.referer_type" + }, + { + "uniqueId": "Referrers.Keyword", + "name": "Keyword", + "sqlSegment": "log_visit.referer_keyword" + }, + { + "uniqueId": "Referrers.ReferrerName", + "name": "Referrer Name", + "sqlSegment": "log_visit.referer_name" + }, + { + "uniqueId": "Referrers.ReferrerUrl", + "name": "Referrer URL", + "sqlSegment": "log_visit.referer_url" + } + ], + "orderId": 15 + } + ] + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=CustomReports.getAvailableMetrics": { + "get": { + "tags": [ + "CustomReports" + ], + "summary": "Get a list of available metrics that can be used in custom reports.", + "operationId": "CustomReports.getAvailableMetrics", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=CustomReports.getAvailableMetrics&idSite=1&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=CustomReports.getAvailableMetrics&idSite=1&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "properties": { + "metrics": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "category": "Visitor location", + "metrics": { + "row": [ + { + "uniqueId": "nb_uniq_usercountry_city", + "name": "Unique Cities", + "description": "The unique number of Cities. When viewing a period that is not day, then this metric will become \"Sum of Unique Cities\". In such case, if the same Cities appear in 2 or more days within the selected period, then it will be counted as 2 or the total number of days it has appeared and not 1." + }, + { + "uniqueId": "nb_uniq_usercountry_continent", + "name": "Unique Continents", + "description": "The unique number of Continents. When viewing a period that is not day, then this metric will become \"Sum of Unique Continents\". In such case, if the same Continents appear in 2 or more days within the selected period, then it will be counted as 2 or the total number of days it has appeared and not 1." + }, + { + "uniqueId": "nb_uniq_usercountry_country", + "name": "Unique Countries", + "description": "The unique number of Countries. When viewing a period that is not day, then this metric will become \"Sum of Unique Countries\". In such case, if the same Countries appear in 2 or more days within the selected period, then it will be counted as 2 or the total number of days it has appeared and not 1." + }, + { + "uniqueId": "nb_uniq_userlanguage_language", + "name": "Unique Languages", + "description": "The unique number of Languages. When viewing a period that is not day, then this metric will become \"Sum of Unique Languages\". In such case, if the same Languages appear in 2 or more days within the selected period, then it will be counted as 2 or the total number of days it has appeared and not 1." + }, + { + "uniqueId": "nb_uniq_usercountry_latitude", + "name": "Unique Latitudes", + "description": "The unique number of Latitudes. When viewing a period that is not day, then this metric will become \"Sum of Unique Latitudes\". In such case, if the same Latitudes appear in 2 or more days within the selected period, then it will be counted as 2 or the total number of days it has appeared and not 1." + }, + { + "uniqueId": "nb_uniq_usercountry_longitude", + "name": "Unique Longitudes", + "description": "The unique number of Longitudes. When viewing a period that is not day, then this metric will become \"Sum of Unique Longitudes\". In such case, if the same Longitudes appear in 2 or more days within the selected period, then it will be counted as 2 or the total number of days it has appeared and not 1." + }, + { + "uniqueId": "nb_uniq_usercountry_region", + "name": "Unique Regions", + "description": "The unique number of Regions. When viewing a period that is not day, then this metric will become \"Sum of Unique Regions\". In such case, if the same Regions appear in 2 or more days within the selected period, then it will be counted as 2 or the total number of days it has appeared and not 1." + } + ] + }, + "orderId": "7" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "category": { + "type": "string" + }, + "metrics": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "uniqueId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "orderId": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "category": "Visitor location", + "metrics": [ + { + "uniqueId": "nb_uniq_usercountry_city", + "name": "Unique Cities", + "description": "The unique number of Cities. When viewing a period that is not day, then this metric will become \"Sum of Unique Cities\". In such case, if the same Cities appear in 2 or more days within the selected period, then it will be counted as 2 or the total number of days it has appeared and not 1." + }, + { + "uniqueId": "nb_uniq_usercountry_continent", + "name": "Unique Continents", + "description": "The unique number of Continents. When viewing a period that is not day, then this metric will become \"Sum of Unique Continents\". In such case, if the same Continents appear in 2 or more days within the selected period, then it will be counted as 2 or the total number of days it has appeared and not 1." + }, + { + "uniqueId": "nb_uniq_usercountry_country", + "name": "Unique Countries", + "description": "The unique number of Countries. When viewing a period that is not day, then this metric will become \"Sum of Unique Countries\". In such case, if the same Countries appear in 2 or more days within the selected period, then it will be counted as 2 or the total number of days it has appeared and not 1." + }, + { + "uniqueId": "nb_uniq_userlanguage_language", + "name": "Unique Languages", + "description": "The unique number of Languages. When viewing a period that is not day, then this metric will become \"Sum of Unique Languages\". In such case, if the same Languages appear in 2 or more days within the selected period, then it will be counted as 2 or the total number of days it has appeared and not 1." + }, + { + "uniqueId": "nb_uniq_usercountry_latitude", + "name": "Unique Latitudes", + "description": "The unique number of Latitudes. When viewing a period that is not day, then this metric will become \"Sum of Unique Latitudes\". In such case, if the same Latitudes appear in 2 or more days within the selected period, then it will be counted as 2 or the total number of days it has appeared and not 1." + }, + { + "uniqueId": "nb_uniq_usercountry_longitude", + "name": "Unique Longitudes", + "description": "The unique number of Longitudes. When viewing a period that is not day, then this metric will become \"Sum of Unique Longitudes\". In such case, if the same Longitudes appear in 2 or more days within the selected period, then it will be counted as 2 or the total number of days it has appeared and not 1." + }, + { + "uniqueId": "nb_uniq_usercountry_region", + "name": "Unique Regions", + "description": "The unique number of Regions. When viewing a period that is not day, then this metric will become \"Sum of Unique Regions\". In such case, if the same Regions appear in 2 or more days within the selected period, then it will be counted as 2 or the total number of days it has appeared and not 1." + } + ], + "orderId": 7 + } + ] + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=CustomReports.getCustomReport": { + "get": { + "tags": [ + "CustomReports" + ], + "summary": "Get report data for a previously created custom report.", + "operationId": "CustomReports.getCustomReport", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "period", + "in": "query", + "description": "The ID of the custom report to look up data for.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "date", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "idCustomReport", + "in": "query", + "description": "The ID of the custom report to look up data for.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "segment", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "expanded", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "flat", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "idSubtable", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "columns", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/index.php?module=API&method=CustomReports.getCustomReport&idSite=1&idCustomReport=5&period=day&date=today&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/index.php?module=API&method=CustomReports.getCustomReport&idSite=1&idCustomReport=5&period=day&date=today&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/index.php?module=API&method=CustomReports.getCustomReport&idSite=1&idCustomReport=5&period=day&date=today&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "label": "Australia", + "nb_uniq_visitors": "1", + "goal_7_conversion": "0", + "level": "1", + "goal_7_conversion_uniq_visitors_rate": "0", + "segment": "countryCode==au;countryCode!=pl" + }, + { + "label": "United States", + "nb_uniq_visitors": "1", + "goal_7_conversion": "0", + "level": "1", + "goal_7_conversion_uniq_visitors_rate": "0", + "segment": "countryCode==us;countryCode!=pl" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "label": { + "type": "string" + }, + "nb_uniq_visitors": { + "type": "integer" + }, + "goal_7_conversion": { + "type": "integer" + }, + "level": { + "type": "integer" + }, + "goal_7_conversion_uniq_visitors_rate": { + "type": "integer" + }, + "segment": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "label": "Australia", + "nb_uniq_visitors": 1, + "goal_7_conversion": 0, + "level": 1, + "goal_7_conversion_uniq_visitors_rate": 0, + "segment": "countryCode==au;countryCode!=pl" + }, + { + "label": "United States", + "nb_uniq_visitors": 1, + "goal_7_conversion": 0, + "level": 1, + "goal_7_conversion_uniq_visitors_rate": 0, + "segment": "countryCode==us;countryCode!=pl" + } + ] + }, + "application\/vnd.ms-excel": { + "example": "label nb_uniq_visitors goal_7_conversion level goal_7_conversion_uniq_visitors_rate metadata_segment\n * Australia 1 0 1 0 \"countryCode==au;countryCode!=pl\"\n * United States 1 0 1 0 \"countryCode==us;countryCode!=pl\"" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.getMetrics": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Get summary metrics for a specific funnel like the number of conversions, the conversion rate, the number of\nentries etc.", + "operationId": "Funnels.getMetrics", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "period", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "date", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "idFunnel", + "in": "query", + "description": "Either idFunnel or idGoal has to be set", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "idGoal", + "in": "query", + "description": "Either idFunnel or idGoal has to be set. If goal given, will return the latest funnel for that goal.", + "required": false, + "schema": { + "type": "integer", + "example": 4 + } + }, + { + "name": "segment", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getMetrics&idSite=1&period=day&date=today&idGoal=4&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getMetrics&idSite=1&period=day&date=today&idGoal=4&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getMetrics&idSite=1&period=day&date=today&idGoal=4&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "funnel_sum_entries": "0", + "funnel_sum_exits": "0", + "funnel_nb_conversions": "0", + "funnel_conversion_rate": "0%", + "funnel_abandoned_rate": "0%" + } + }, + "application\/json": { + "schema": { + "properties": { + "funnel_sum_entries": { + "type": "integer" + }, + "funnel_sum_exits": { + "type": "integer" + }, + "funnel_nb_conversions": { + "type": "integer" + }, + "funnel_conversion_rate": { + "type": "string" + }, + "funnel_abandoned_rate": { + "type": "string" + } + }, + "type": "object" + }, + "example": { + "funnel_sum_entries": 0, + "funnel_sum_exits": 0, + "funnel_nb_conversions": 0, + "funnel_conversion_rate": "0%", + "funnel_abandoned_rate": "0%" + } + }, + "application\/vnd.ms-excel": { + "example": "funnel_sum_entries funnel_sum_exits funnel_nb_conversions funnel_conversion_rate funnel_abandoned_rate\n * 0 0 0 0% 0%" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.getFunnelFlow": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Get funnel flow information. The returned datatable will include a row for each step within the funnel\nshowing information like how many visits have entered or left the funnel at a certain position, how many\nhave completed a certain step etc.", + "operationId": "Funnels.getFunnelFlow", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "period", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "date", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "idFunnel", + "in": "query", + "description": "Either idFunnel or idGoal has to be set", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "idGoal", + "in": "query", + "description": "Either idFunnel or idGoal has to be set. If goal given, will return the latest funnel for that goal.", + "required": false, + "schema": { + "type": "integer", + "example": 4 + } + }, + { + "name": "segment", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelFlow&idSite=1&period=day&date=today&idGoal=4&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelFlow&idSite=1&period=day&date=today&idGoal=4&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelFlow&idSite=1&period=day&date=today&idGoal=4&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "label": "Job board", + "step_nb_visits_actual": "0", + "step_nb_entries": "0", + "step_nb_exits": "0", + "step_nb_visits": "0", + "step_nb_skipped": "0", + "step_nb_proceeded": "0", + "step_nb_progressions": "0", + "step_proceeded_rate": "0%", + "step_definition": "Pattern: Path equals \"\\\/jobs\"", + "step_position": "1" + }, + { + "label": "Job view", + "step_nb_visits_actual": "0", + "step_nb_entries": "0", + "step_nb_exits": "0", + "step_nb_visits": "0", + "step_nb_skipped": "0", + "step_nb_proceeded": "0", + "step_nb_progressions": "0", + "step_proceeded_rate": "0%", + "step_definition": "Pattern: Path starts with \"\\\/jobs\\\/view\\\/\"", + "step_position": "2" + }, + { + "label": "New Job Application", + "step_nb_visits_actual": "0", + "step_nb_entries": "0", + "step_nb_exits": "0", + "step_nb_visits": "0", + "step_nb_proceeded": "0", + "step_nb_progressions": "0", + "step_proceeded_rate": "0%", + "step_definition": "Converts goal: New Job Application", + "step_position": "3" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "label": { + "type": "string" + }, + "step_nb_visits_actual": { + "type": "integer" + }, + "step_nb_entries": { + "type": "integer" + }, + "step_nb_exits": { + "type": "integer" + }, + "step_nb_visits": { + "type": "integer" + }, + "step_nb_skipped": { + "type": "integer" + }, + "step_nb_proceeded": { + "type": "integer" + }, + "step_nb_progressions": { + "type": "integer" + }, + "step_proceeded_rate": { + "type": "string" + }, + "step_definition": { + "type": "string" + }, + "step_position": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "label": "Job board", + "step_nb_visits_actual": 0, + "step_nb_entries": 0, + "step_nb_exits": 0, + "step_nb_visits": 0, + "step_nb_skipped": 0, + "step_nb_proceeded": 0, + "step_nb_progressions": 0, + "step_proceeded_rate": "0%", + "step_definition": "Pattern: Path equals \"\\\/jobs\"", + "step_position": 1 + }, + { + "label": "Job view", + "step_nb_visits_actual": 0, + "step_nb_entries": 0, + "step_nb_exits": 0, + "step_nb_visits": 0, + "step_nb_skipped": 0, + "step_nb_proceeded": 0, + "step_nb_progressions": 0, + "step_proceeded_rate": "0%", + "step_definition": "Pattern: Path starts with \"\\\/jobs\\\/view\\\/\"", + "step_position": 2 + }, + { + "label": "New Job Application", + "step_nb_visits_actual": 0, + "step_nb_entries": 0, + "step_nb_exits": "0", + "step_nb_visits": 0, + "step_nb_proceeded": 0, + "step_nb_progressions": 0, + "step_proceeded_rate": "0%", + "step_definition": "Converts goal: New Job Application", + "step_position": 3 + } + ] + }, + "application\/vnd.ms-excel": { + "example": "label step_nb_visits_actual step_nb_entries step_nb_exits step_nb_visits step_nb_skipped step_nb_proceeded step_nb_progressions step_proceeded_rate metadata_step_definition metadata_step_position\n * Job board 0 0 0 0 0 0 0 0% \"Pattern: Path equals \"\"\/jobs\"\"\" 1\n * Job view 0 0 0 0 0 0 0 0% \"Pattern: Path starts with \"\"\/jobs\/view\/\"\"\" 2\n * New Job Application 0 0 0 0 0 0 0% Converts goal: New Job Application 3" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.getFunnelFlowTable": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Get funnel flow information. The returned datatable will include a row for each step within the funnel\nshowing information like how many visits have entered or left the funnel at a certain position, how many\nhave completed a certain step etc.", + "operationId": "Funnels.getFunnelFlowTable", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "period", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "date", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "idFunnel", + "in": "query", + "description": "Either idFunnel or idGoal has to be set", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "idGoal", + "in": "query", + "description": "Either idFunnel or idGoal has to be set. If goal given, will return the latest funnel for that goal.", + "required": false, + "schema": { + "type": "integer", + "example": 4 + } + }, + { + "name": "segment", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelFlowTable&idSite=1&period=day&date=today&idGoal=4&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelFlowTable&idSite=1&period=day&date=today&idGoal=4&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelFlowTable&idSite=1&period=day&date=today&idGoal=4&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "label": "Job board", + "step_nb_visits": "0", + "step_nb_progressions": "0", + "step_nb_entries": "0", + "step_nb_skipped": "0", + "step_nb_proceeded": "0", + "step_nb_exits": "0", + "Actions": "0", + "step_proceeded_rate": "0%", + "customLabel": "Job board", + "isVisitorLogEnabled": "1", + "step_definition": "Pattern: Path equals \"\\\/jobs\"", + "step_position": "1" + }, + { + "label": "Job view", + "step_nb_visits": "0", + "step_nb_progressions": "0", + "step_nb_entries": "0", + "step_nb_skipped": "0", + "step_nb_proceeded": "0", + "step_nb_exits": "0", + "Actions": "0", + "step_proceeded_rate": "0%", + "customLabel": "Job view", + "isVisitorLogEnabled": "1", + "step_definition": "Pattern: Path starts with \"\\\/jobs\\\/view\\\/\"", + "step_position": "2" + }, + { + "label": "New Job Application", + "step_nb_visits": "0", + "step_nb_progressions": "0", + "step_nb_entries": "0", + "step_nb_skipped": "0", + "step_nb_proceeded": "0", + "step_nb_exits": "0", + "Actions": "0", + "step_proceeded_rate": "0%", + "customLabel": "New Job Application", + "isVisitorLogEnabled": "1", + "step_definition": "Converts goal: New Job Application", + "step_position": "3" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "label": { + "type": "string" + }, + "step_nb_visits": { + "type": "integer" + }, + "step_nb_progressions": { + "type": "integer" + }, + "step_nb_entries": { + "type": "integer" + }, + "step_nb_skipped": { + "type": "integer" + }, + "step_nb_proceeded": { + "type": "integer" + }, + "step_nb_exits": { + "type": "integer" + }, + "Actions": { + "type": "integer" + }, + "step_proceeded_rate": { + "type": "string" + }, + "customLabel": { + "type": "string" + }, + "isVisitorLogEnabled": { + "type": "boolean" + }, + "step_definition": { + "type": "string" + }, + "step_position": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "label": "Job board", + "step_nb_visits": 0, + "step_nb_progressions": 0, + "step_nb_entries": 0, + "step_nb_skipped": 0, + "step_nb_proceeded": 0, + "step_nb_exits": 0, + "Actions": 0, + "step_proceeded_rate": "0%", + "customLabel": "Job board", + "isVisitorLogEnabled": true, + "step_definition": "Pattern: Path equals \"\\\/jobs\"", + "step_position": 1 + }, + { + "label": "Job view", + "step_nb_visits": 0, + "step_nb_progressions": 0, + "step_nb_entries": 0, + "step_nb_skipped": 0, + "step_nb_proceeded": 0, + "step_nb_exits": 0, + "Actions": 0, + "step_proceeded_rate": "0%", + "customLabel": "Job view", + "isVisitorLogEnabled": true, + "step_definition": "Pattern: Path starts with \"\\\/jobs\\\/view\\\/\"", + "step_position": 2 + }, + { + "label": "New Job Application", + "step_nb_visits": 0, + "step_nb_progressions": 0, + "step_nb_entries": 0, + "step_nb_skipped": false, + "step_nb_proceeded": 0, + "step_nb_exits": "0", + "Actions": 0, + "step_proceeded_rate": "0%", + "customLabel": "New Job Application", + "isVisitorLogEnabled": true, + "step_definition": "Converts goal: New Job Application", + "step_position": 3 + } + ] + }, + "application\/vnd.ms-excel": { + "example": "label step_nb_visits step_nb_progressions step_nb_entries step_nb_skipped step_nb_proceeded step_nb_exits Actions step_proceeded_rate customLabel metadata_isVisitorLogEnabled metadata_step_definition metadata_step_position\n * Job board 0 0 0 0 0 0 0 0% Job board 1 \"Pattern: Path equals \"\"\/jobs\"\"\" 1\n * Job view 0 0 0 0 0 0 0 0% Job view 1 \"Pattern: Path starts with \"\"\/jobs\/view\/\"\"\" 2\n * New Job Application 0 0 0 0 0 0 0 0% New Job Application 1 Converts goal: New Job Application 3" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.getFunnelStepSubtable": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Get subTable funnel flow information. The returned datatable will include a row for proceeded, entries, and\nexists. If they have any values, they'll have a subTable of their own.", + "operationId": "Funnels.getFunnelStepSubtable", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "period", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "date", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "stepPosition", + "in": "query", + "description": "The step number to pull the data for.", + "required": true, + "schema": { + "type": "integer", + "example": 1 + } + }, + { + "name": "idFunnel", + "in": "query", + "description": "Either idFunnel or idGoal has to be set", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "idGoal", + "in": "query", + "description": "Either idFunnel or idGoal has to be set. If goal given, will return the latest funnel for that goal.", + "required": false, + "schema": { + "type": "integer", + "example": 4 + } + }, + { + "name": "segment", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelStepSubtable&idSite=1&period=day&date=today&stepPosition=1&idGoal=4&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelStepSubtable&idSite=1&period=day&date=today&stepPosition=1&idGoal=4&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelStepSubtable&idSite=1&period=day&date=today&stepPosition=1&idGoal=4&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "label": "Entries", + "nb_hits": "0", + "table_depth": "2", + "step_position": "1", + "sub_step_type": "entry" + }, + { + "label": "Exits", + "nb_hits": "0", + "table_depth": "2", + "step_position": "1", + "sub_step_type": "exit" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "label": { + "type": "string" + }, + "nb_hits": { + "type": "integer" + }, + "table_depth": { + "type": "integer" + }, + "step_position": { + "type": "integer" + }, + "sub_step_type": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "label": "Entries", + "nb_hits": 0, + "table_depth": 2, + "step_position": 1, + "sub_step_type": "entry" + }, + { + "label": "Exits", + "nb_hits": 0, + "table_depth": 2, + "step_position": 1, + "sub_step_type": "exit" + } + ] + }, + "application\/vnd.ms-excel": { + "example": "label nb_hits metadata_table_depth metadata_step_position metadata_sub_step_type\n * Entries 0 2 1 entry\n * Exits 0 2 1 exit" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.getFunnelEntries": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Get all entry actions for the given funnel at the given step.", + "operationId": "Funnels.getFunnelEntries", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "period", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "date", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "idFunnel", + "in": "query", + "description": "The ID of the funnel for which to get data.", + "required": true, + "schema": { + "type": "integer", + "example": 99 + } + }, + { + "name": "segment", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "step", + "in": "query", + "description": "Optional name of a step in the funnel to filter the results by.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "expanded", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "idSubtable", + "in": "query", + "required": false, + "schema": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ] + } + }, + { + "name": "flat", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelEntries&idSite=1&period=day&date=today&idFunnel=99&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelEntries&idSite=1&period=day&date=today&idFunnel=99&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelEntries&idSite=1&period=day&date=today&idFunnel=99&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "label": "Homepage", + "step_position": "1" + }, + { + "label": "50% off scuba diving masks promotion", + "step_position": "2" + }, + { + "label": "Item added to cart", + "step_position": "3" + }, + { + "label": "View cart", + "step_position": "4" + }, + { + "label": "Order page", + "step_position": "5" + }, + { + "label": "Thank you page", + "step_position": "6" + }, + { + "label": "Sales", + "step_position": "7" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "label": { + "type": "string" + }, + "step_position": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "label": "Homepage", + "step_position": 1 + }, + { + "label": "50% off scuba diving masks promotion", + "step_position": 2 + }, + { + "label": "Item added to cart", + "step_position": 3 + }, + { + "label": "View cart", + "step_position": 4 + }, + { + "label": "Order page", + "step_position": 5 + }, + { + "label": "Thank you page", + "step_position": 6 + }, + { + "label": "Sales", + "step_position": 7 + } + ] + }, + "application\/vnd.ms-excel": { + "example": "label metadata_step_position\n * Homepage 1\n * 50% off scuba diving masks promotion 2\n * Item added to cart 3\n * View cart 4\n * Order page 5\n * Thank you page 6\n * Sales 7" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.getFunnelExits": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Get all exit actions for the given funnel at the given step.", + "operationId": "Funnels.getFunnelExits", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "period", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "date", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "idFunnel", + "in": "query", + "description": "The ID of the funnel for which to get data.", + "required": true, + "schema": { + "type": "integer", + "example": 99 + } + }, + { + "name": "segment", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "step", + "in": "query", + "description": "Optional name of a step in the funnel to filter the results by.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelExits&idSite=1&period=day&date=today&idFunnel=99&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelExits&idSite=1&period=day&date=today&idFunnel=99&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnelExits&idSite=1&period=day&date=today&idFunnel=99&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "label": "Homepage", + "step_position": "1" + }, + { + "label": "50% off scuba diving masks promotion", + "step_position": "2" + }, + { + "label": "Item added to cart", + "step_position": "3" + }, + { + "label": "View cart", + "step_position": "4" + }, + { + "label": "Order page", + "step_position": "5" + }, + { + "label": "Thank you page", + "step_position": "6" + }, + { + "label": "Sales", + "step_position": "7" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "label": { + "type": "string" + }, + "step_position": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "label": "Homepage", + "step_position": 1 + }, + { + "label": "50% off scuba diving masks promotion", + "step_position": 2 + }, + { + "label": "Item added to cart", + "step_position": 3 + }, + { + "label": "View cart", + "step_position": 4 + }, + { + "label": "Order page", + "step_position": 5 + }, + { + "label": "Thank you page", + "step_position": 6 + }, + { + "label": "Sales", + "step_position": 7 + } + ] + }, + "application\/vnd.ms-excel": { + "example": "label metadata_step_position\n * Homepage 1\n * 50% off scuba diving masks promotion 2\n * Item added to cart 3\n * View cart 4\n * Order page 5\n * Thank you page 6\n * Sales 7" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.getGoalFunnel": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Get funnel information for this goal.", + "operationId": "Funnels.getGoalFunnel", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "idGoal", + "in": "query", + "description": "The ID of the goal for which to get funnel data.", + "required": true, + "schema": { + "type": "integer", + "example": 4 + } + } + ], + "responses": { + "200": { + "description": "Null when no funnel has been configured yet, the funnel otherwise.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getGoalFunnel&idSite=1&idGoal=4&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getGoalFunnel&idSite=1&idGoal=4&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getGoalFunnel&idSite=1&idGoal=4&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "steps": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "idfunnel": "7", + "idsite": "1", + "idgoal": "4", + "revision": "0", + "name": "New Job Application", + "created_date": "2016-11-18 00:40:28", + "activated": "1", + "steps": { + "row": [ + { + "position": "1", + "name": "Job board", + "pattern_type": "path_equals", + "pattern": "\\\/jobs", + "required": "1", + "patternComparison": "path" + }, + { + "position": "2", + "name": "Job view", + "pattern_type": "path_startswith", + "pattern": "\\\/jobs\\\/view\\\/", + "required": "1", + "patternComparison": "path" + } + ] + }, + "isSalesFunnel": "0", + "final_step_position": "3" + } + }, + "application\/json": { + "schema": { + "properties": { + "idfunnel": { + "type": "integer" + }, + "idsite": { + "type": "integer" + }, + "idgoal": { + "type": "integer" + }, + "revision": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "created_date": { + "type": "string" + }, + "activated": { + "type": "boolean" + }, + "steps": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "position": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "pattern_type": { + "type": "string" + }, + "pattern": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "patternComparison": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "isSalesFunnel": { + "type": "boolean" + }, + "final_step_position": { + "type": "integer" + } + }, + "type": "object" + }, + "example": { + "idfunnel": 7, + "idsite": 1, + "idgoal": 4, + "revision": 0, + "name": "New Job Application", + "created_date": "2016-11-18 00:40:28", + "activated": true, + "steps": [ + { + "position": 1, + "name": "Job board", + "pattern_type": "path_equals", + "pattern": "\\\/jobs", + "required": true, + "patternComparison": "path" + }, + { + "position": 2, + "name": "Job view", + "pattern_type": "path_startswith", + "pattern": "\\\/jobs\\\/view\\\/", + "required": true, + "patternComparison": "path" + } + ], + "isSalesFunnel": false, + "final_step_position": 3 + } + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.getSalesFunnelForSite": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Get funnel information for this goal.", + "operationId": "Funnels.getSalesFunnelForSite", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Null when no funnel has been configured yet, the funnel otherwise.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getSalesFunnelForSite&idSite=1&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getSalesFunnelForSite&idSite=1&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "steps": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "idfunnel": "99", + "idsite": "1", + "idgoal": "0", + "revision": "0", + "name": "Sales", + "created_date": "2018-05-09 00:33:10", + "activated": "1", + "steps": { + "row": [ + { + "position": "1", + "name": "Homepage", + "pattern_type": "path_equals", + "pattern": "\\\/", + "required": "0", + "patternComparison": "path" + }, + { + "position": "2", + "name": "50% off scuba diving masks promotion", + "pattern_type": "path_equals", + "pattern": "\\\/promotion\\\/50-off-scuba-diving-masks", + "required": "1", + "patternComparison": "path" + }, + { + "position": "3", + "name": "Item added to cart", + "pattern_type": "eventname_equals", + "pattern": "added - diving mask", + "required": "1", + "patternComparison": "eventname" + }, + { + "position": "4", + "name": "View cart", + "pattern_type": "path_equals", + "pattern": "\\\/cart", + "required": "0", + "patternComparison": "path" + }, + { + "position": "5", + "name": "Order page", + "pattern_type": "path_equals", + "pattern": "\\\/checkout", + "required": "1", + "patternComparison": "path" + }, + { + "position": "6", + "name": "Thank you page", + "pattern_type": "path_startswith", + "pattern": "\\\/checkout\\\/order-received", + "required": "1", + "patternComparison": "path" + } + ] + }, + "isSalesFunnel": "1", + "final_step_position": "7" + } + }, + "application\/json": { + "schema": { + "properties": { + "idfunnel": { + "type": "integer" + }, + "idsite": { + "type": "integer" + }, + "idgoal": { + "type": "integer" + }, + "revision": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "created_date": { + "type": "string" + }, + "activated": { + "type": "boolean" + }, + "steps": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "position": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "pattern_type": { + "type": "string" + }, + "pattern": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "patternComparison": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "isSalesFunnel": { + "type": "boolean" + }, + "final_step_position": { + "type": "integer" + } + }, + "type": "object" + }, + "example": { + "idfunnel": 99, + "idsite": 1, + "idgoal": 0, + "revision": 0, + "name": "Sales", + "created_date": "2018-05-09 00:33:10", + "activated": true, + "steps": [ + { + "position": 1, + "name": "Homepage", + "pattern_type": "path_equals", + "pattern": "\\\/", + "required": false, + "patternComparison": "path" + }, + { + "position": 2, + "name": "50% off scuba diving masks promotion", + "pattern_type": "path_equals", + "pattern": "\\\/promotion\\\/50-off-scuba-diving-masks", + "required": true, + "patternComparison": "path" + }, + { + "position": 3, + "name": "Item added to cart", + "pattern_type": "eventname_equals", + "pattern": "added - diving mask", + "required": true, + "patternComparison": "eventname" + }, + { + "position": 4, + "name": "View cart", + "pattern_type": "path_equals", + "pattern": "\\\/cart", + "required": false, + "patternComparison": "path" + }, + { + "position": 5, + "name": "Order page", + "pattern_type": "path_equals", + "pattern": "\\\/checkout", + "required": true, + "patternComparison": "path" + }, + { + "position": 6, + "name": "Thank you page", + "pattern_type": "path_startswith", + "pattern": "\\\/checkout\\\/order-received", + "required": true, + "patternComparison": "path" + } + ], + "isSalesFunnel": true, + "final_step_position": 7 + } + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.getFunnel": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Get funnel information by ID.", + "operationId": "Funnels.getFunnel", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "idFunnel", + "in": "query", + "description": "The ID of the funnel for which to get data.", + "required": true, + "schema": { + "type": "integer", + "example": 99 + } + } + ], + "responses": { + "200": { + "description": "Null when no funnel has been configured yet, the funnel otherwise.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnel&idSite=1&idFunnel=99&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getFunnel&idSite=1&idFunnel=99&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "steps": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "idfunnel": "99", + "idsite": "1", + "idgoal": "0", + "revision": "0", + "name": "Sales", + "created_date": "2018-05-09 00:33:10", + "activated": "1", + "steps": { + "row": [ + { + "position": "1", + "name": "Homepage", + "pattern_type": "path_equals", + "pattern": "\\\/", + "required": "0", + "patternComparison": "path" + }, + { + "position": "2", + "name": "50% off scuba diving masks promotion", + "pattern_type": "path_equals", + "pattern": "\\\/promotion\\\/50-off-scuba-diving-masks", + "required": "1", + "patternComparison": "path" + }, + { + "position": "3", + "name": "Item added to cart", + "pattern_type": "eventname_equals", + "pattern": "added - diving mask", + "required": "1", + "patternComparison": "eventname" + }, + { + "position": "4", + "name": "View cart", + "pattern_type": "path_equals", + "pattern": "\\\/cart", + "required": "0", + "patternComparison": "path" + }, + { + "position": "5", + "name": "Order page", + "pattern_type": "path_equals", + "pattern": "\\\/checkout", + "required": "1", + "patternComparison": "path" + }, + { + "position": "6", + "name": "Thank you page", + "pattern_type": "path_startswith", + "pattern": "\\\/checkout\\\/order-received", + "required": "1", + "patternComparison": "path" + } + ] + }, + "isSalesFunnel": "1", + "final_step_position": "7" + } + }, + "application\/json": { + "schema": { + "properties": { + "idfunnel": { + "type": "integer" + }, + "idsite": { + "type": "integer" + }, + "idgoal": { + "type": "integer" + }, + "revision": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "created_date": { + "type": "string" + }, + "activated": { + "type": "boolean" + }, + "steps": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "position": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "pattern_type": { + "type": "string" + }, + "pattern": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "patternComparison": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "isSalesFunnel": { + "type": "boolean" + }, + "final_step_position": { + "type": "integer" + } + }, + "type": "object" + }, + "example": { + "idfunnel": 99, + "idsite": 1, + "idgoal": 0, + "revision": 0, + "name": "Sales", + "created_date": "2018-05-09 00:33:10", + "activated": true, + "steps": [ + { + "position": 1, + "name": "Homepage", + "pattern_type": "path_equals", + "pattern": "\\\/", + "required": false, + "patternComparison": "path" + }, + { + "position": 2, + "name": "50% off scuba diving masks promotion", + "pattern_type": "path_equals", + "pattern": "\\\/promotion\\\/50-off-scuba-diving-masks", + "required": true, + "patternComparison": "path" + }, + { + "position": 3, + "name": "Item added to cart", + "pattern_type": "eventname_equals", + "pattern": "added - diving mask", + "required": true, + "patternComparison": "eventname" + }, + { + "position": 4, + "name": "View cart", + "pattern_type": "path_equals", + "pattern": "\\\/cart", + "required": false, + "patternComparison": "path" + }, + { + "position": 5, + "name": "Order page", + "pattern_type": "path_equals", + "pattern": "\\\/checkout", + "required": true, + "patternComparison": "path" + }, + { + "position": 6, + "name": "Thank you page", + "pattern_type": "path_startswith", + "pattern": "\\\/checkout\\\/order-received", + "required": true, + "patternComparison": "path" + } + ], + "isSalesFunnel": true, + "final_step_position": 7 + } + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.getAllActivatedFunnelsForSite": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Get activated funnels for the current site.", + "operationId": "Funnels.getAllActivatedFunnelsForSite", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getAllActivatedFunnelsForSite&idSite=1&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getAllActivatedFunnelsForSite&idSite=1&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "properties": { + "steps": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "idfunnel": "2", + "idsite": "1", + "idgoal": "6", + "revision": "0", + "name": "New Resume", + "created_date": "2016-11-17 01:10:20", + "activated": "1", + "steps": { + "row": { + "position": "1", + "name": "Job board", + "pattern_type": "path_contains", + "pattern": "\\\/jobs\\\/", + "required": "1", + "patternComparison": "path" + } + }, + "isSalesFunnel": "0", + "final_step_position": "2" + }, + { + "idfunnel": "3", + "idsite": "1", + "idgoal": "5", + "revision": "0", + "name": "View Submit Job", + "created_date": "2016-11-17 01:12:46", + "activated": "1", + "steps": { + "row": { + "position": "1", + "name": "Job board", + "pattern_type": "path_equals", + "pattern": "\\\/jobs", + "required": "0", + "patternComparison": "path" + } + }, + "isSalesFunnel": "0", + "final_step_position": "2" + }, + { + "idfunnel": "7", + "idsite": "1", + "idgoal": "4", + "revision": "0", + "name": "New Job Application", + "created_date": "2016-11-18 00:40:28", + "activated": "1", + "steps": { + "row": [ + { + "position": "1", + "name": "Job board", + "pattern_type": "path_equals", + "pattern": "\\\/jobs", + "required": "1", + "patternComparison": "path" + }, + { + "position": "2", + "name": "Job view", + "pattern_type": "path_startswith", + "pattern": "\\\/jobs\\\/view\\\/", + "required": "1", + "patternComparison": "path" + } + ] + }, + "isSalesFunnel": "0", + "final_step_position": "3" + }, + { + "idfunnel": "8", + "idsite": "1", + "idgoal": "7", + "revision": "0", + "name": "Liveaboard.com click", + "created_date": "2016-12-02 02:52:40", + "activated": "1", + "steps": { + "row": [ + { + "position": "1", + "name": "Any divezone page", + "pattern_type": "url_contains", + "pattern": "divezone.net", + "required": "0", + "patternComparison": "url" + }, + { + "position": "2", + "name": "Diving page", + "pattern_type": "url_contains", + "pattern": "\\\/diving", + "required": "0", + "patternComparison": "url" + } + ] + }, + "isSalesFunnel": "0", + "final_step_position": "3" + }, + { + "idfunnel": "99", + "idsite": "1", + "idgoal": "0", + "revision": "0", + "name": "Sales", + "created_date": "2018-05-09 00:33:10", + "activated": "1", + "steps": { + "row": [ + { + "position": "1", + "name": "Homepage", + "pattern_type": "path_equals", + "pattern": "\\\/", + "required": "0", + "patternComparison": "path" + }, + { + "position": "2", + "name": "50% off scuba diving masks promotion", + "pattern_type": "path_equals", + "pattern": "\\\/promotion\\\/50-off-scuba-diving-masks", + "required": "1", + "patternComparison": "path" + }, + { + "position": "3", + "name": "Item added to cart", + "pattern_type": "eventname_equals", + "pattern": "added - diving mask", + "required": "1", + "patternComparison": "eventname" + }, + { + "position": "4", + "name": "View cart", + "pattern_type": "path_equals", + "pattern": "\\\/cart", + "required": "0", + "patternComparison": "path" + }, + { + "position": "5", + "name": "Order page", + "pattern_type": "path_equals", + "pattern": "\\\/checkout", + "required": "1", + "patternComparison": "path" + }, + { + "position": "6", + "name": "Thank you page", + "pattern_type": "path_startswith", + "pattern": "\\\/checkout\\\/order-received", + "required": "1", + "patternComparison": "path" + } + ] + }, + "isSalesFunnel": "1", + "final_step_position": "7" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "idfunnel": { + "type": "integer" + }, + "idsite": { + "type": "integer" + }, + "idgoal": { + "type": "integer" + }, + "revision": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "created_date": { + "type": "string" + }, + "activated": { + "type": "boolean" + }, + "steps": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "position": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "pattern_type": { + "type": "string" + }, + "pattern": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "patternComparison": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "isSalesFunnel": { + "type": "boolean" + }, + "final_step_position": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "idfunnel": 2, + "idsite": 1, + "idgoal": 6, + "revision": 0, + "name": "New Resume", + "created_date": "2016-11-17 01:10:20", + "activated": true, + "steps": [ + { + "position": 1, + "name": "Job board", + "pattern_type": "path_contains", + "pattern": "\\\/jobs\\\/", + "required": true, + "patternComparison": "path" + } + ], + "isSalesFunnel": false, + "final_step_position": 2 + }, + { + "idfunnel": 3, + "idsite": 1, + "idgoal": 5, + "revision": 0, + "name": "View Submit Job", + "created_date": "2016-11-17 01:12:46", + "activated": true, + "steps": [ + { + "position": 1, + "name": "Job board", + "pattern_type": "path_equals", + "pattern": "\\\/jobs", + "required": false, + "patternComparison": "path" + } + ], + "isSalesFunnel": false, + "final_step_position": 2 + }, + { + "idfunnel": 7, + "idsite": 1, + "idgoal": 4, + "revision": 0, + "name": "New Job Application", + "created_date": "2016-11-18 00:40:28", + "activated": true, + "steps": [ + { + "position": 1, + "name": "Job board", + "pattern_type": "path_equals", + "pattern": "\\\/jobs", + "required": true, + "patternComparison": "path" + }, + { + "position": 2, + "name": "Job view", + "pattern_type": "path_startswith", + "pattern": "\\\/jobs\\\/view\\\/", + "required": true, + "patternComparison": "path" + } + ], + "isSalesFunnel": false, + "final_step_position": 3 + }, + { + "idfunnel": 8, + "idsite": 1, + "idgoal": 7, + "revision": 0, + "name": "Liveaboard.com click", + "created_date": "2016-12-02 02:52:40", + "activated": true, + "steps": [ + { + "position": 1, + "name": "Any divezone page", + "pattern_type": "url_contains", + "pattern": "divezone.net", + "required": false, + "patternComparison": "url" + }, + { + "position": 2, + "name": "Diving page", + "pattern_type": "url_contains", + "pattern": "\\\/diving", + "required": false, + "patternComparison": "url" + } + ], + "isSalesFunnel": false, + "final_step_position": 3 + }, + { + "idfunnel": 99, + "idsite": 1, + "idgoal": 0, + "revision": 0, + "name": "Sales", + "created_date": "2018-05-09 00:33:10", + "activated": true, + "steps": [ + { + "position": 1, + "name": "Homepage", + "pattern_type": "path_equals", + "pattern": "\\\/", + "required": false, + "patternComparison": "path" + }, + { + "position": 2, + "name": "50% off scuba diving masks promotion", + "pattern_type": "path_equals", + "pattern": "\\\/promotion\\\/50-off-scuba-diving-masks", + "required": true, + "patternComparison": "path" + }, + { + "position": 3, + "name": "Item added to cart", + "pattern_type": "eventname_equals", + "pattern": "added - diving mask", + "required": true, + "patternComparison": "eventname" + }, + { + "position": 4, + "name": "View cart", + "pattern_type": "path_equals", + "pattern": "\\\/cart", + "required": false, + "patternComparison": "path" + }, + { + "position": 5, + "name": "Order page", + "pattern_type": "path_equals", + "pattern": "\\\/checkout", + "required": true, + "patternComparison": "path" + }, + { + "position": 6, + "name": "Thank you page", + "pattern_type": "path_startswith", + "pattern": "\\\/checkout\\\/order-received", + "required": true, + "patternComparison": "path" + } + ], + "isSalesFunnel": true, + "final_step_position": 7 + } + ] + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.hasAnyActivatedFunnelForSite": { + "get": { + "tags": [ + "Funnels" + ], + "operationId": "Funnels.hasAnyActivatedFunnelForSite", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.hasAnyActivatedFunnelForSite&idSite=1&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.hasAnyActivatedFunnelForSite&idSite=1&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.hasAnyActivatedFunnelForSite&idSite=1&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "type": "object", + "xml": { + "name": "result" + } + }, + "example": [ + "1" + ] + }, + "application\/json": { + "schema": { + "properties": { + "value": { + "type": "boolean" + } + }, + "type": "object" + }, + "example": { + "value": true + } + }, + "application\/vnd.ms-excel": { + "example": "value\n * 1" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.deleteGoalFunnel": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Deletes the given goal funnel.", + "operationId": "Funnels.deleteGoalFunnel", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "idGoal", + "in": "query", + "description": "The ID of the goal to which the funnel is tied.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.deleteNonGoalFunnel": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Deletes the given goal funnel.", + "operationId": "Funnels.deleteNonGoalFunnel", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "idFunnel", + "in": "query", + "description": "The ID of the funnel to delete.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.setGoalFunnel": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Sets (overwrites) a funnel for this goal.", + "operationId": "Funnels.setGoalFunnel", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "idGoal", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "isActivated", + "in": "query", + "description": "Whether the funnel is activated. E.g. 0 or 1. As soon as a funnel is activated, a report will be generated for this funnel.", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "steps", + "in": "query", + "description": "Definitions of each funnel step. If isActivated = true, there has to be at least one step. E.g. [{'position': 1, 'name': 'Step1', 'pattern_type': 'path_contains', 'pattern': 'path\/dir', 'required': 0}]", + "required": false, + "schema": { + "type": "string", + "default": "[]" + } + } + ], + "responses": { + "200": { + "description": "The id of the created or updated funnel" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.saveNonGoalFunnel": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Saves a funnel not tied to a goal.", + "operationId": "Funnels.saveNonGoalFunnel", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "idFunnel", + "in": "query", + "description": "ID of the funnel since we can't use the idSite and idGoal to identify it", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "funnelName", + "in": "query", + "description": "The name used to identify the funnel since it's not tied to a goal", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "steps", + "in": "query", + "description": "Definitions of each funnel step.Definitions of each funnel step. E.g. [{'position': 1, 'name': 'Step1', 'pattern_type': 'path_contains', 'pattern': 'path\/dir', 'required': 0}]", + "required": true, + "schema": { + "type": "array", + "items": [] + } + } + ], + "responses": { + "200": { + "description": "The id of the created or updated funnel" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.getAvailablePatternMatches": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Get a list of available pattern types that can be used to configure a funnel step.", + "operationId": "Funnels.getAvailablePatternMatches", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getAvailablePatternMatches&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.getAvailablePatternMatches&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "goal": { + "properties": { + "conditions": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + } + }, + "type": "object" + }, + "url": { + "properties": { + "conditions": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object" + }, + "path": { + "properties": { + "conditions": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object" + }, + "query": { + "properties": { + "conditions": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + } + }, + "type": "object" + }, + "pagetitle": { + "properties": { + "conditions": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object" + }, + "eventcategory": { + "properties": { + "conditions": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object" + }, + "eventname": { + "properties": { + "conditions": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object" + }, + "eventaction": { + "properties": { + "conditions": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "goal": { + "comparisonName": "Goal", + "conditions": { + "row": { + "key": "goal_equals", + "value": "equals", + "example": "4" + } + } + }, + "url": { + "comparisonName": "URL", + "conditions": { + "row": [ + { + "key": "url_equals", + "value": "equals", + "example": "example.com\\\/cart\\\/web\\\/" + }, + { + "key": "url_contains", + "value": "contains", + "example": "example.com\\\/cart" + }, + { + "key": "url_startswith", + "value": "starts with", + "example": "example.co.\\\/cart\\\/" + }, + { + "key": "url_endswith", + "value": "ends with", + "example": "\\\/web\\\/" + }, + { + "key": "url_regexp", + "value": "matches the expression", + "example": "^example.*cart.*" + } + ] + } + }, + "path": { + "comparisonName": "Path", + "conditions": { + "row": [ + { + "key": "path_equals", + "value": "equals", + "example": "\\\/cart\\\/web\\\/" + }, + { + "key": "path_contains", + "value": "contains", + "example": "cart" + }, + { + "key": "path_startswith", + "value": "starts with", + "example": "\\\/cart\\\/web\\\/" + }, + { + "key": "path_endswith", + "value": "ends with", + "example": "\\\/web\\\/page.html" + } + ] + } + }, + "query": { + "comparisonName": "Search query", + "conditions": { + "row": { + "key": "query_contains", + "value": "contains", + "example": "page=cart" + } + } + }, + "pagetitle": { + "comparisonName": "Page Title", + "conditions": { + "row": [ + { + "key": "pagetitle_equals", + "value": "equals", + "example": "title" + }, + { + "key": "pagetitle_contains", + "value": "contains", + "example": "title" + }, + { + "key": "pagetitle_startswith", + "value": "starts with", + "example": "title" + }, + { + "key": "pagetitle_endswith", + "value": "ends with", + "example": "title" + } + ] + } + }, + "eventcategory": { + "comparisonName": "Event Category", + "conditions": { + "row": [ + { + "key": "eventcategory_equals", + "value": "equals", + "example": "category" + }, + { + "key": "eventcategory_contains", + "value": "contains", + "example": "category" + }, + { + "key": "eventcategory_startswith", + "value": "starts with", + "example": "category" + }, + { + "key": "eventcategory_endswith", + "value": "ends with", + "example": "category" + } + ] + } + }, + "eventname": { + "comparisonName": "Event Name", + "conditions": { + "row": [ + { + "key": "eventname_equals", + "value": "equals", + "example": "name" + }, + { + "key": "eventname_contains", + "value": "contains", + "example": "name" + }, + { + "key": "eventname_startswith", + "value": "starts with", + "example": "name" + }, + { + "key": "eventname_endswith", + "value": "ends with", + "example": "name" + } + ] + } + }, + "eventaction": { + "comparisonName": "Event Action", + "conditions": { + "row": [ + { + "key": "eventaction_equals", + "value": "equals", + "example": "action" + }, + { + "key": "eventaction_contains", + "value": "contains", + "example": "action" + }, + { + "key": "eventaction_startswith", + "value": "starts with", + "example": "action" + }, + { + "key": "eventaction_endswith", + "value": "ends with", + "example": "action" + } + ] + } + } + } + }, + "application\/json": { + "schema": { + "properties": { + "eventaction": { + "properties": { + "comparisonName": { + "type": "string" + }, + "conditions": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + }, + "example": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object" + }, + "example": { + "goal": { + "comparisonName": "Goal", + "conditions": [ + { + "key": "goal_equals", + "value": "equals", + "example": "4" + } + ] + }, + "url": { + "comparisonName": "URL", + "conditions": [ + { + "key": "url_equals", + "value": "equals", + "example": "example.com\\\/cart\\\/web\\\/" + }, + { + "key": "url_contains", + "value": "contains", + "example": "example.com\\\/cart" + }, + { + "key": "url_startswith", + "value": "starts with", + "example": "example.co.\\\/cart\\\/" + }, + { + "key": "url_endswith", + "value": "ends with", + "example": "\\\/web\\\/" + }, + { + "key": "url_regexp", + "value": "matches the expression", + "example": "^example.*cart.*" + } + ] + }, + "path": { + "comparisonName": "Path", + "conditions": [ + { + "key": "path_equals", + "value": "equals", + "example": "\\\/cart\\\/web\\\/" + }, + { + "key": "path_contains", + "value": "contains", + "example": "cart" + }, + { + "key": "path_startswith", + "value": "starts with", + "example": "\\\/cart\\\/web\\\/" + }, + { + "key": "path_endswith", + "value": "ends with", + "example": "\\\/web\\\/page.html" + } + ] + }, + "query": { + "comparisonName": "Search query", + "conditions": [ + { + "key": "query_contains", + "value": "contains", + "example": "page=cart" + } + ] + }, + "pagetitle": { + "comparisonName": "Page Title", + "conditions": [ + { + "key": "pagetitle_equals", + "value": "equals", + "example": "title" + }, + { + "key": "pagetitle_contains", + "value": "contains", + "example": "title" + }, + { + "key": "pagetitle_startswith", + "value": "starts with", + "example": "title" + }, + { + "key": "pagetitle_endswith", + "value": "ends with", + "example": "title" + } + ] + }, + "eventcategory": { + "comparisonName": "Event Category", + "conditions": [ + { + "key": "eventcategory_equals", + "value": "equals", + "example": "category" + }, + { + "key": "eventcategory_contains", + "value": "contains", + "example": "category" + }, + { + "key": "eventcategory_startswith", + "value": "starts with", + "example": "category" + }, + { + "key": "eventcategory_endswith", + "value": "ends with", + "example": "category" + } + ] + }, + "eventname": { + "comparisonName": "Event Name", + "conditions": [ + { + "key": "eventname_equals", + "value": "equals", + "example": "name" + }, + { + "key": "eventname_contains", + "value": "contains", + "example": "name" + }, + { + "key": "eventname_startswith", + "value": "starts with", + "example": "name" + }, + { + "key": "eventname_endswith", + "value": "ends with", + "example": "name" + } + ] + }, + "eventaction": { + "comparisonName": "Event Action", + "conditions": [ + { + "key": "eventaction_equals", + "value": "equals", + "example": "action" + }, + { + "key": "eventaction_contains", + "value": "contains", + "example": "action" + }, + { + "key": "eventaction_startswith", + "value": "starts with", + "example": "action" + }, + { + "key": "eventaction_endswith", + "value": "ends with", + "example": "action" + } + ] + } + } + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=Funnels.testUrlMatchesSteps": { + "get": { + "tags": [ + "Funnels" + ], + "summary": "Tests whether a URL matches any of the step patterns.", + "operationId": "Funnels.testUrlMatchesSteps", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "url", + "in": "query", + "description": "A value used to filter funnel flow by. E.g. URL, path, event category, event name, page title, goal ID, ...", + "required": true, + "schema": { + "type": "string", + "example": "https:\/\/www.example.com\/path\/dir" + } + }, + { + "name": "steps", + "in": "query", + "description": "Definitions of funnel steps.", + "required": true, + "schema": { + "type": "array", + "items": [], + "example": [ + { + "position": 1, + "name": "Step1", + "pattern_type": "path_contains", + "pattern": "path\/dir", + "required": 0 + } + ] + } + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.testUrlMatchesSteps&url=https%3A%2F%2Fwww.example.com%2Fpath%2Fdir&steps%5B0%5D%5Bposition%5D=1&steps%5B0%5D%5Bname%5D=Step1&steps%5B0%5D%5Bpattern_type%5D=path_contains&steps%5B0%5D%5Bpattern%5D=path%2Fdir&steps%5B0%5D%5Brequired%5D=0&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=Funnels.testUrlMatchesSteps&url=https%3A%2F%2Fwww.example.com%2Fpath%2Fdir&steps%5B0%5D%5Bposition%5D=1&steps%5B0%5D%5Bname%5D=Step1&steps%5B0%5D%5Bpattern_type%5D=path_contains&steps%5B0%5D%5Bpattern%5D=path%2Fdir&steps%5B0%5D%5Brequired%5D=0&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "tests": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "url": "https:\\\/\\\/www.example.com\\\/path\\\/dir", + "tests": { + "row": { + "matches": "1", + "pattern_type": "path_contains", + "pattern": "path\\\/dir" + } + } + } + }, + "application\/json": { + "schema": { + "properties": { + "url": { + "type": "string" + }, + "tests": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "matches": { + "type": "boolean" + }, + "pattern_type": { + "type": "string" + }, + "pattern": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + } + }, + "type": "object" + }, + "example": { + "url": "https:\\\/\\\/www.example.com\\\/path\\\/dir", + "tests": [ + { + "matches": true, + "pattern_type": "path_contains", + "pattern": "path\\\/dir" + } + ] + } + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.addHeatmap": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Adds a new heatmap.", + "description": "Once added, the system will start recording activities for this heatmap.", + "operationId": "HeatmapSessionRecording.addHeatmap", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "description": "ID of the site to which the heatmap configuration should be assigned.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "name", + "in": "query", + "description": "The name of heatmap which will be visible in the reporting UI.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "matchPageRules", + "in": "query", + "description": "Eg. array(array('attribute' => 'url', 'type' => 'equals_simple', 'inverted' => 0, 'value' => 'http:\/\/example.com\/directory')) For a list of available attribute and type values call {@link getAvailableTargetPageRules()}. \"inverted\" should be \"0\" or \"1\".", + "required": true, + "schema": { + "type": "array", + "items": [] + } + }, + { + "name": "sampleLimit", + "in": "query", + "description": "The number of page views you want to record. Once the sample limit has been reached, the heatmap will be ended automatically.", + "required": false, + "schema": { + "type": "integer", + "default": 1000 + } + }, + { + "name": "sampleRate", + "in": "query", + "description": "Needs to be between 0 and 100 where 100 means => 100%, 10 => 10%, 0.1 => 0.1%. Defines how often a visitor will be actually recorded when they match the page rules, also known as \"traffic\". Currently max one decimal is supported.", + "required": false, + "schema": { + "type": "number", + "default": "5" + } + }, + { + "name": "excludedElements", + "in": "query", + "description": "Optional, a comma separated list of CSS selectors to exclude elements from being shown in the heatmap. For example to disable popups etc.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "screenshotUrl", + "in": "query", + "description": "Optional, a URL to define on which page a screenshot should be taken.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "breakpointMobile", + "in": "query", + "description": "If the device type cannot be detected, we will put any device having a lower width than this value into the mobile category. Useful if your website is responsive.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "breakpointTablet", + "in": "query", + "description": "If the device type cannot be detected, we will put any device having a lower width than this value into the tablet category. Useful if your website is responsive.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "captureDomManually", + "in": "query", + "description": "Optional, indicate whether the DOM should be configured to be captured manually instead of the usual automatic capture.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "ID of the newly created heatmap configuration." + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.duplicateHeatmap": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Copies a specified heatmap to one or more sites. If a heatmap with the same name already exists, the new heatmap\nwill have an automatically adjusted name to make it unique to the assigned site.", + "operationId": "HeatmapSessionRecording.duplicateHeatmap", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "idSite", + "in": "query", + "description": "ID of the site to which the source heatmap configuration is assigned.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "ID of the heatmap to duplicate.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "idDestinationSites", + "in": "query", + "description": "Optional array of IDs identifying which site(s) the new heatmap is to be assigned to. The default is [idSite] when nothing is provided.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer" + }, + "default": [] + } + } + ], + "responses": { + "200": { + "description": "The result of the duplication request, such as whether it was successful and the IDs of the newly\n * created heatmaps." + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.updateHeatmap": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Updates an existing heatmap.", + "description": "All fields need to be set in order to update a heatmap. Easiest way is to get all values for a heatmap via\n\"HeatmapSessionRecording.getHeatmap\", make the needed changes on the heatmap, and send all values back to\n\"HeatmapSessionRecording.updateHeatmap\".", + "operationId": "HeatmapSessionRecording.updateHeatmap", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the heatmap you want to update.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "name", + "in": "query", + "description": "The name of heatmap which will be visible in the reporting UI.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "matchPageRules", + "in": "query", + "description": "Eg. array(array('attribute' => 'url', 'type' => 'equals_simple', 'inverted' => 0, 'value' => 'http:\/\/example.com\/directory')) For a list of available attribute and type values call {@link getAvailableTargetPageRules()}. \"inverted\" should be \"0\" or \"1\".", + "required": true, + "schema": { + "type": "array", + "items": [] + } + }, + { + "name": "sampleLimit", + "in": "query", + "description": "The number of page views you want to record. Once the sample limit has been reached, the heatmap will be ended automatically.", + "required": false, + "schema": { + "type": "integer", + "default": 1000 + } + }, + { + "name": "sampleRate", + "in": "query", + "description": "Needs to be between 0 and 100 where 100 means => 100%, 10 => 10%, 0.1 => 0.1%. Defines how often a visitor will be actually recorded when they match the page rules, also known as \"traffic\". Currently max one decimal is supported.", + "required": false, + "schema": { + "type": "number", + "default": "5" + } + }, + { + "name": "excludedElements", + "in": "query", + "description": "Optional, a comma separated list of CSS selectors to exclude elements from being shown in the heatmap. For example to disable popups etc.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "screenshotUrl", + "in": "query", + "description": "Optional, a URL to define on which page a screenshot should be taken.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "breakpointMobile", + "in": "query", + "description": "If the device type cannot be detected, we will put any device having a lower width than this value into the mobile category. Useful if your website is responsive.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "breakpointTablet", + "in": "query", + "description": "If the device type cannot be detected, we will put any device having a lower width than this value into the tablet category. Useful if your website is responsive.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "captureDomManually", + "in": "query", + "description": "Optional, indicate whether the DOM should be configured to be captured manually instead of the usual automatic capture.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.deleteHeatmapScreenshot": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Deletes \/ removes the screenshot from a heatmap", + "operationId": "HeatmapSessionRecording.deleteHeatmapScreenshot", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the heatmap you want to delete.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Indication of whether the deletion was successful." + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.addSessionRecording": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Adds a new session recording.", + "description": "Once added, the system will start recording sessions.", + "operationId": "HeatmapSessionRecording.addSessionRecording", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "name", + "in": "query", + "description": "The name of session recording which will be visible in the reporting UI.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "matchPageRules", + "in": "query", + "description": "Eg. array(array('attribute' => 'url', 'type' => 'equals_simple', 'inverted' => 0, 'value' => 'http:\/\/example.com\/directory')) For a list of available attribute and type values call {@link getAvailableTargetPageRules()}. \"inverted\" should be \"0\" or \"1\". Leave it empty to record any page. If page rules are set, a session will be only recorded as soon as a visitor has reached a page that matches these rules.", + "required": false, + "schema": { + "type": "array", + "items": [], + "default": [] + } + }, + { + "name": "sampleLimit", + "in": "query", + "description": "The number of sessions you want to record. Once the sample limit has been reached, the session recording will be ended automatically.", + "required": false, + "schema": { + "type": "integer", + "default": 1000 + } + }, + { + "name": "sampleRate", + "in": "query", + "description": "Needs to be between 0 and 100 where 100 means => 100%, 10 => 10%, 0.1 => 0.1%. Defines how often a visitor will be actually recorded when they match the page rules, also known as \"traffic\". Currently max one decimal is supported.", + "required": false, + "schema": { + "type": "number", + "default": "10" + } + }, + { + "name": "minSessionTime", + "in": "query", + "description": "If defined, will only record sessions when the visitor has spent more than this many seconds on the current page.", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "requiresActivity", + "in": "query", + "description": "If enabled (default), the session will be only recorded if the visitor has at least scrolled and clicked once.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "captureKeystrokes", + "in": "query", + "description": "If enabled (default), any text that a user enters into text form elements will be recorded. Password fields will be automatically masked and you can mask other elements with sensitive data using a data-matomo-mask attribute.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "ID of the newly created session recording configuration." + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.updateSessionRecording": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Updates an existing session recording.", + "description": "All fields need to be set in order to update a session recording. Easiest way is to get all values for a\nsession recording via \"HeatmapSessionRecording.getSessionRecording\", make the needed changes on the recording,\nand send all values back to \"HeatmapSessionRecording.updateSessionRecording\".", + "operationId": "HeatmapSessionRecording.updateSessionRecording", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the session recording you want to update.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "name", + "in": "query", + "description": "The name of session recording which will be visible in the reporting UI.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "matchPageRules", + "in": "query", + "description": "Eg. array(array('attribute' => 'url', 'type' => 'equals_simple', 'inverted' => 0, 'value' => 'http:\/\/example.com\/directory')) For a list of available attribute and type values call {@link getAvailableTargetPageRules()}. \"inverted\" should be \"0\" or \"1\". Leave it empty to record any page. If page rules are set, a session will be only recorded as soon as a visitor has reached a page that matches these rules.", + "required": false, + "schema": { + "type": "array", + "items": [], + "default": [] + } + }, + { + "name": "sampleLimit", + "in": "query", + "description": "The number of sessions you want to record. Once the sample limit has been reached, the session recording will be ended automatically.", + "required": false, + "schema": { + "type": "integer", + "default": 1000 + } + }, + { + "name": "sampleRate", + "in": "query", + "description": "Needs to be between 0 and 100 where 100 means => 100%, 10 => 10%, 0.1 => 0.1%. Defines how often a visitor will be actually recorded when they match the page rules, also known as \"traffic\". Currently max one decimal is supported.", + "required": false, + "schema": { + "type": "number", + "default": "10" + } + }, + { + "name": "minSessionTime", + "in": "query", + "description": "If defined, will only record sessions when the visitor has spent more than this many seconds on the current page.", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "requiresActivity", + "in": "query", + "description": "If enabled (default), the session will be only recorded if the visitor has at least scrolled and clicked once.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "captureKeystrokes", + "in": "query", + "description": "If enabled (default), any text that a user enters into text form elements will be recorded. Password fields will be automatically masked and you can mask other elements with sensitive data using a data-matomo-mask attribute.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.getHeatmap": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Get a specific heatmap by its ID.", + "operationId": "HeatmapSessionRecording.getHeatmap", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the heatmap.", + "required": true, + "schema": { + "type": "integer", + "example": 11 + } + } + ], + "responses": { + "200": { + "description": "An indexed array containing the heatmap values. If the heatmap cannot be found, an error response.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getHeatmap&idSite=1&idSiteHsr=11&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getHeatmap&idSite=1&idSiteHsr=11&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "match_page_rules": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "idsitehsr": "11", + "idsite": "1", + "name": "Homepage", + "sample_rate": "100.0", + "sample_limit": "2000", + "match_page_rules": { + "row": [ + { + "attribute": "url", + "type": "equals_exactly", + "value": "https:\\\/\\\/divezone.net", + "inverted": "0" + } + ] + }, + "excluded_elements": "", + "screenshot_url": "https:\\\/\\\/divezone.net\\\/", + "breakpoint_mobile": "600", + "breakpoint_tablet": "960", + "created_date": "2018-04-08 08:24:27", + "updated_date": "2018-04-08 09:50:54", + "status": "active", + "capture_manually": "0", + "created_date_pretty": "Apr 8, 2018", + "heatmapViewUrl": "index.php?module=Widgetize&action=iframe&moduleToWidgetize=HeatmapSessionRecording&actionToWidgetize=showHeatmap&idSiteHsr=11&useDateUrl=0&idSite=1&period=day&date=yesterday&token_auth=anonymous" + } + }, + "application\/json": { + "schema": { + "properties": { + "idsitehsr": { + "type": "integer" + }, + "idsite": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "sample_rate": { + "type": "string" + }, + "sample_limit": { + "type": "integer" + }, + "match_page_rules": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "attribute": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + }, + "inverted": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "excluded_elements": { + "type": "string" + }, + "screenshot_url": { + "type": "string" + }, + "breakpoint_mobile": { + "type": "integer" + }, + "breakpoint_tablet": { + "type": "integer" + }, + "created_date": { + "type": "string" + }, + "updated_date": { + "type": "string" + }, + "status": { + "type": "string" + }, + "capture_manually": { + "type": "integer" + }, + "created_date_pretty": { + "type": "string" + }, + "heatmapViewUrl": { + "type": "string" + } + }, + "type": "object" + }, + "example": { + "idsitehsr": 11, + "idsite": 1, + "name": "Homepage", + "sample_rate": "100.0", + "sample_limit": 2000, + "match_page_rules": [ + { + "attribute": "url", + "type": "equals_exactly", + "value": "https:\\\/\\\/divezone.net", + "inverted": "0" + } + ], + "excluded_elements": "", + "screenshot_url": "https:\\\/\\\/divezone.net\\\/", + "breakpoint_mobile": 600, + "breakpoint_tablet": 960, + "created_date": "2018-04-08 08:24:27", + "updated_date": "2018-04-08 09:50:54", + "status": "active", + "capture_manually": 0, + "created_date_pretty": "Apr 8, 2018", + "heatmapViewUrl": "index.php?module=Widgetize&action=iframe&moduleToWidgetize=HeatmapSessionRecording&actionToWidgetize=showHeatmap&idSiteHsr=11&useDateUrl=0&idSite=1&period=day&date=yesterday&token_auth=anonymous" + } + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.getSessionRecording": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Get a specific session recording by its ID.", + "operationId": "HeatmapSessionRecording.getSessionRecording", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the recording.", + "required": true, + "schema": { + "type": "integer", + "example": 13 + } + } + ], + "responses": { + "200": { + "description": "An indexed array containing the session recording values. If the recording cannot be found, an error response.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getSessionRecording&idSite=1&idSiteHsr=13&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getSessionRecording&idSite=1&idSiteHsr=13&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "match_page_rules": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "idsitehsr": "13", + "idsite": "1", + "name": "Homepage", + "sample_rate": "100.0", + "sample_limit": "250", + "match_page_rules": { + "row": [ + { + "attribute": "url", + "type": "equals_exactly", + "value": "https:\\\/\\\/divezone.net", + "inverted": "0" + } + ] + }, + "min_session_time": "10", + "requires_activity": "1", + "capture_keystrokes": "1", + "created_date": "2018-05-10 16:34:54", + "updated_date": "2018-06-01 07:37:01", + "status": "active", + "capture_manually": "0", + "created_date_pretty": "May 10, 2018" + } + }, + "application\/json": { + "schema": { + "properties": { + "idsitehsr": { + "type": "integer" + }, + "idsite": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "sample_rate": { + "type": "string" + }, + "sample_limit": { + "type": "integer" + }, + "match_page_rules": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "attribute": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + }, + "inverted": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "min_session_time": { + "type": "integer" + }, + "requires_activity": { + "type": "boolean" + }, + "capture_keystrokes": { + "type": "boolean" + }, + "created_date": { + "type": "string" + }, + "updated_date": { + "type": "string" + }, + "status": { + "type": "string" + }, + "capture_manually": { + "type": "integer" + }, + "created_date_pretty": { + "type": "string" + } + }, + "type": "object" + }, + "example": { + "idsitehsr": 13, + "idsite": 1, + "name": "Homepage", + "sample_rate": "100.0", + "sample_limit": 250, + "match_page_rules": [ + { + "attribute": "url", + "type": "equals_exactly", + "value": "https:\\\/\\\/divezone.net", + "inverted": "0" + } + ], + "min_session_time": 10, + "requires_activity": true, + "capture_keystrokes": true, + "created_date": "2018-05-10 16:34:54", + "updated_date": "2018-06-01 07:37:01", + "status": "active", + "capture_manually": 0, + "created_date_pretty": "May 10, 2018" + } + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.pauseHeatmap": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Pauses the given heatmap.", + "description": "When a heatmap is paused, all the tracking will be paused until its resumed again.", + "operationId": "HeatmapSessionRecording.pauseHeatmap", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the heatmap", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.resumeHeatmap": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Resumes the given heatmap.", + "description": "When a heatmap is resumed, all the tracking will be enabled.", + "operationId": "HeatmapSessionRecording.resumeHeatmap", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the heatmap", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.deleteHeatmap": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Deletes the given heatmap.", + "description": "When a heatmap is deleted, the report will be no longer available in the API and tracked data for this\nheatmap might be removed.", + "operationId": "HeatmapSessionRecording.deleteHeatmap", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the heatmap", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.endHeatmap": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Ends \/ finishes the given heatmap.", + "description": "When you end a heatmap, the heatmap reports will be still available via API and UI but no new heatmap activity\nwill be recorded for this heatmap.", + "operationId": "HeatmapSessionRecording.endHeatmap", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the heatmap.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.pauseSessionRecording": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Pauses the given session recording.", + "description": "When a session recording is paused, all the tracking will be paused until its resumed again.", + "operationId": "HeatmapSessionRecording.pauseSessionRecording", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the heatmap", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.resumeSessionRecording": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Resumes the given session recording.", + "description": "When a session recording is resumed, all the tracking will be enabled.", + "operationId": "HeatmapSessionRecording.resumeSessionRecording", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the heatmap", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.deleteSessionRecording": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Deletes the given session recording.", + "description": "When a session recording is deleted, any related recordings be no longer available in the API and tracked data\nfor this session recording might be removed.", + "operationId": "HeatmapSessionRecording.deleteSessionRecording", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the session recording.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.endSessionRecording": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Ends \/ finishes the given session recording.", + "description": "When you end a session recording, the session recording reports will be still available via API and UI but no new\nsession will be recorded anymore.", + "operationId": "HeatmapSessionRecording.endSessionRecording", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the session recording.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.getHeatmaps": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Get all available heatmaps for a specific website or app.", + "description": "It will return active as well as ended heatmaps but not any deleted heatmaps.", + "operationId": "HeatmapSessionRecording.getHeatmaps", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "includePageTreeMirror", + "in": "query", + "description": "set to 0 if you don't need the page tree mirror for heatmaps (improves performance)", + "required": false, + "schema": { + "type": "integer", + "default": 1, + "enum": [ + 0, + 1 + ], + "example": 0 + } + } + ], + "responses": { + "200": { + "description": "List of indexed arrays containing the data for each heatmap configuration.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getHeatmaps&idSite=1&includePageTreeMirror=0&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getHeatmaps&idSite=1&includePageTreeMirror=0&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "properties": { + "match_page_rules": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": { + "idsitehsr": "11", + "idsite": "1", + "name": "Homepage", + "sample_rate": "100.0", + "sample_limit": "2000", + "match_page_rules": { + "row": { + "attribute": "url", + "type": "equals_exactly", + "value": "https:\\\/\\\/divezone.net", + "inverted": "0" + } + }, + "excluded_elements": "", + "page_treemirror": "", + "screenshot_url": "https:\\\/\\\/divezone.net\\\/", + "breakpoint_mobile": "600", + "breakpoint_tablet": "960", + "created_date": "2018-04-08 08:24:27", + "updated_date": "2018-04-08 09:50:54", + "status": "active", + "capture_manually": "0", + "created_date_pretty": "Apr 8, 2018", + "heatmapViewUrl": "index.php?module=Widgetize&action=iframe&moduleToWidgetize=HeatmapSessionRecording&actionToWidgetize=showHeatmap&idSiteHsr=11&useDateUrl=0&idSite=1&period=day&date=yesterday&token_auth=anonymous" + } + } + }, + "application\/json": { + "schema": { + "properties": { + "": { + "properties": { + "idsitehsr": { + "type": "integer" + }, + "idsite": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "sample_rate": { + "type": "string" + }, + "sample_limit": { + "type": "integer" + }, + "match_page_rules": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "attribute": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + }, + "inverted": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "min_session_time": { + "type": "integer" + }, + "requires_activity": { + "type": "boolean" + }, + "capture_keystrokes": { + "type": "boolean" + }, + "created_date": { + "type": "string" + }, + "updated_date": { + "type": "string" + }, + "status": { + "type": "string" + }, + "capture_manually": { + "type": "integer" + }, + "created_date_pretty": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + }, + "example": [ + { + "idsitehsr": 11, + "idsite": 1, + "name": "Homepage", + "sample_rate": "100.0", + "sample_limit": 2000, + "match_page_rules": [ + { + "attribute": "url", + "type": "equals_exactly", + "value": "https:\\\/\\\/divezone.net", + "inverted": "0" + } + ], + "excluded_elements": "", + "page_treemirror": "", + "screenshot_url": "https:\\\/\\\/divezone.net\\\/", + "breakpoint_mobile": "600", + "breakpoint_tablet": "960", + "created_date": "2018-05-10 16:34:54", + "updated_date": "2018-06-01 07:37:01", + "status": "active", + "capture_manually": 0, + "created_date_pretty": "May 10, 2018", + "heatmapViewUrl": "index.php?module=Widgetize&action=iframe&moduleToWidgetize=HeatmapSessionRecording&actionToWidgetize=showHeatmap&idSiteHsr=11&useDateUrl=0&idSite=1&period=day&date=yesterday&token_auth=anonymous" + } + ] + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.getSessionRecordings": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Get all available session recordings for a specific website or app.", + "description": "It will return active as well as ended session recordings but not any deleted session recordings.", + "operationId": "HeatmapSessionRecording.getSessionRecordings", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + } + ], + "responses": { + "200": { + "description": "List of indexed arrays containing the data for each session recording configuration.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getSessionRecordings&idSite=1&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getSessionRecordings&idSite=1&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "properties": { + "match_page_rules": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": { + "idsitehsr": "13", + "idsite": "1", + "name": "Homepage", + "sample_rate": "100.0", + "sample_limit": "250", + "match_page_rules": { + "row": [ + { + "attribute": "url", + "type": "equals_exactly", + "value": "https:\\\/\\\/divezone.net", + "inverted": "0" + } + ] + }, + "min_session_time": "10", + "requires_activity": "1", + "capture_keystrokes": "1", + "created_date": "2018-05-10 16:34:54", + "updated_date": "2018-06-01 07:37:01", + "status": "active", + "capture_manually": "0", + "created_date_pretty": "May 10, 2018" + } + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "idsitehsr": { + "type": "integer" + }, + "idsite": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "sample_rate": { + "type": "string" + }, + "sample_limit": { + "type": "integer" + }, + "match_page_rules": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "attribute": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + }, + "inverted": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "min_session_time": { + "type": "integer" + }, + "requires_activity": { + "type": "boolean" + }, + "capture_keystrokes": { + "type": "boolean" + }, + "created_date": { + "type": "string" + }, + "updated_date": { + "type": "string" + }, + "status": { + "type": "string" + }, + "capture_manually": { + "type": "integer" + }, + "created_date_pretty": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "idsitehsr": 13, + "idsite": 1, + "name": "Homepage", + "sample_rate": "100.0", + "sample_limit": 250, + "match_page_rules": [ + { + "attribute": "url", + "type": "equals_exactly", + "value": "https:\\\/\\\/divezone.net", + "inverted": "0" + } + ], + "min_session_time": 10, + "requires_activity": true, + "capture_keystrokes": true, + "created_date": "2018-05-10 16:34:54", + "updated_date": "2018-06-01 07:37:01", + "status": "active", + "capture_manually": 0, + "created_date_pretty": "May 10, 2018" + } + ] + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.getRecordedSessions": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Returns all recorded sessions for a specific session recording.", + "description": "To get the actual recorded data for any of the recorded sessions, call {@link getRecordedSession()}.", + "operationId": "HeatmapSessionRecording.getRecordedSessions", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "$ref": "#\/components\/parameters\/periodRequired" + }, + { + "$ref": "#\/components\/parameters\/dateRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the session recording you want to retrieve all the recorded sessions for.", + "required": true, + "schema": { + "type": "integer", + "example": 13 + } + }, + { + "$ref": "#\/components\/parameters\/segmentOptional" + }, + { + "name": "idSubtable", + "in": "query", + "description": "Optional visit id if you want to get all recorded pageviews of a specific visitor", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "A list of recorded sessions from a specific period of time.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getRecordedSessions&idSite=1&period=day&date=today&idSiteHsr=13&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getRecordedSessions&idSite=1&period=day&date=today&idSiteHsr=13&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getRecordedSessions&idSite=1&period=day&date=today&idSiteHsr=13&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "label": "17207151", + "nb_pageviews": "2", + "idvisit": "17207151", + "first_url": "divezone.net\\\/", + "last_url": "divezone.net\\\/diving\\\/red-sea", + "time_on_site": "314793", + "total_events": "211", + "idloghsr": "154216", + "idvisitor": "0", + "location_country": "us", + "location_region": "FL", + "location_city": "Jacksonville", + "config_os": "WIN", + "config_device_type": "0", + "config_device_model": "generic desktop", + "config_browser_name": "FF", + "server_time": "2025-09-21 23:46:58", + "sessionReplayUrl": "index.php?module=Widgetize&action=iframe&moduleToWidgetize=HeatmapSessionRecording&actionToWidgetize=replayRecording&idSiteHsr=13&idLogHsr=154216&idSite=1&period=day&date=today&token_auth=anonymous" + }, + { + "label": "17209023", + "nb_pageviews": "3", + "idvisit": "17209023", + "first_url": "divezone.net\\\/", + "last_url": "divezone.net\\\/best-similan-islands-liveaboard-reviews-2013", + "time_on_site": "406131", + "total_events": "202", + "idloghsr": "154223", + "idvisitor": "0", + "location_country": "my", + "location_region": "14", + "location_city": "Kuala Lumpur", + "config_os": "WIN", + "config_device_type": "0", + "config_device_model": "generic desktop", + "config_browser_name": "IE", + "server_time": "2025-09-22 03:40:06", + "sessionReplayUrl": "index.php?module=Widgetize&action=iframe&moduleToWidgetize=HeatmapSessionRecording&actionToWidgetize=replayRecording&idSiteHsr=13&idLogHsr=154223&idSite=1&period=day&date=today&token_auth=anonymous" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "label": { + "type": "string" + }, + "nb_pageviews": { + "type": "integer" + }, + "idvisit": { + "type": "integer" + }, + "first_url": { + "type": "string" + }, + "last_url": { + "type": "string" + }, + "time_on_site": { + "type": "string" + }, + "total_events": { + "type": "integer" + }, + "idloghsr": { + "type": "integer" + }, + "idvisitor": { + "type": "string" + }, + "location_country": { + "type": "string" + }, + "location_region": { + "type": "string" + }, + "location_city": { + "type": "string" + }, + "config_os": { + "type": "string" + }, + "config_device_type": { + "type": "integer" + }, + "config_device_model": { + "type": "string" + }, + "config_browser_name": { + "type": "string" + }, + "server_time": { + "type": "string" + }, + "sessionReplayUrl": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "label": "17207151", + "nb_pageviews": 2, + "idvisit": 17207151, + "first_url": "divezone.net\\\/", + "last_url": "divezone.net\\\/diving\\\/red-sea", + "time_on_site": "314793", + "total_events": 211, + "idloghsr": 154216, + "idvisitor": false, + "location_country": "us", + "location_region": "FL", + "location_city": "Jacksonville", + "config_os": "WIN", + "config_device_type": 0, + "config_device_model": "generic desktop", + "config_browser_name": "FF", + "server_time": "2025-09-21 23:46:58", + "sessionReplayUrl": "index.php?module=Widgetize&action=iframe&moduleToWidgetize=HeatmapSessionRecording&actionToWidgetize=replayRecording&idSiteHsr=13&idLogHsr=154216&idSite=1&period=day&date=today&token_auth=anonymous" + }, + { + "label": "17209023", + "nb_pageviews": 3, + "idvisit": 17209023, + "first_url": "divezone.net\\\/", + "last_url": "divezone.net\\\/best-similan-islands-liveaboard-reviews-2013", + "time_on_site": "406131", + "total_events": 202, + "idloghsr": 154223, + "idvisitor": false, + "location_country": "my", + "location_region": "14", + "location_city": "Kuala Lumpur", + "config_os": "WIN", + "config_device_type": 0, + "config_device_model": "generic desktop", + "config_browser_name": "IE", + "server_time": "2025-09-22 03:40:06", + "sessionReplayUrl": "index.php?module=Widgetize&action=iframe&moduleToWidgetize=HeatmapSessionRecording&actionToWidgetize=replayRecording&idSiteHsr=13&idLogHsr=154223&idSite=1&period=day&date=today&token_auth=anonymous" + } + ] + }, + "application\/vnd.ms-excel": { + "example": "label nb_pageviews idvisit first_url last_url time_on_site total_events idloghsr idvisitor location_country location_region location_city config_os config_device_type config_device_model config_browser_name server_time metadata_sessionReplayUrl\n17207151 2 17207151 divezone.net\/ divezone.net\/diving\/red-sea 314793 211 154216 0 us FL Jacksonville WIN 0 generic desktop FF 2025-09-21 23:46:58 index.php?module=Widgetize&action=iframe&moduleToWidgetize=HeatmapSessionRecording&actionToWidgetize=replayRecording&idSiteHsr=13&idLogHsr=154216&idSite=1&period=day&date=today&token_auth=anonymous\n17209023 3 17209023 divezone.net\/ divezone.net\/best-similan-islands-liveaboard-reviews-2013 408824 202 154223 0 my 14 Kuala Lumpur WIN 0 generic desktop IE 2025-09-22 03:40:06 index.php?module=Widgetize&action=iframe&moduleToWidgetize=HeatmapSessionRecording&actionToWidgetize=replayRecording&idSiteHsr=13&idLogHsr=154223&idSite=1&period=day&date=today&token_auth=anonymous" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.getRecordedSession": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Get all activities of a specific recorded session.", + "description": "This includes events such as clicks, mouse moves, scrolls, resizes, page \/ HTML DOM changes, form changed.\nIt is recommended to call this API method with filter_limit = -1 to retrieve all results. It also returns\nmetadata like the viewport size the user had when it was recorded, the browser, operating system, and more.\n\nTo see what each event type in the events property means, call {@link getEventTypes()}.", + "operationId": "HeatmapSessionRecording.getRecordedSession", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the session recording you want to retrieve the data for.", + "required": true, + "schema": { + "type": "integer", + "example": 13 + } + }, + { + "name": "idLogHsr", + "in": "query", + "description": "The id of the recorded session you want to retrieve the data for.", + "required": true, + "schema": { + "type": "integer", + "example": 153241 + } + } + ], + "responses": { + "200": { + "description": "A list of actions related to a specific session recording.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getRecordedSession&idSite=1&idSiteHsr=13&idLogHsr=154216&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getRecordedSession&idSite=1&idSiteHsr=13&idLogHsr=154216&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "pageviews": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "url": "divezone.net\\\/", + "idvisit": "", + "idvisitor": "", + "idsite": "1", + "location_country": "", + "location_region": "", + "location_city": "", + "config_os": "", + "config_device_type": "", + "config_device_model": "", + "config_browser_name": "", + "time_on_page": "74771", + "server_time": "2025-09-11 19:25:03", + "viewport_w_px": "1440", + "viewport_h_px": "769", + "scroll_y_max_relative": "1000", + "fold_y_relative": "85", + "browser_name": "Unknown", + "browser_logo": "plugins\\\/Morpheus\\\/icons\\\/dist\\\/browsers\\\/UNK.png", + "os_name": "Unknown", + "os_logo": "plugins\\\/Morpheus\\\/icons\\\/dist\\\/os\\\/UNK.png", + "device_name": "Unknown", + "device_logo": "plugins\\\/Morpheus\\\/icons\\\/dist\\\/devices\\\/unknown.png", + "location_name": "", + "location_logo": "", + "server_time_pretty": "Sep 11, 2025 21:25:03", + "time_on_page_pretty": "1 min 14s", + "pageviews": "", + "numPageviews": "0" + } + }, + "application\/json": { + "schema": { + "properties": { + "url": { + "type": "string" + }, + "idvisit": { + "type": "integer" + }, + "idvisitor": { + "type": "string" + }, + "idsite": { + "type": "integer" + }, + "location_country": { + "type": "string" + }, + "location_region": { + "type": "string" + }, + "location_city": { + "type": "string" + }, + "config_os": { + "type": "string" + }, + "config_device_type": { + "type": "integer" + }, + "config_device_model": { + "type": "string" + }, + "config_browser_name": { + "type": "string" + }, + "time_on_page": { + "type": "integer" + }, + "server_time": { + "type": "string" + }, + "viewport_w_px": { + "type": "integer" + }, + "viewport_h_px": { + "type": "integer" + }, + "scroll_y_max_relative": { + "type": "integer" + }, + "fold_y_relative": { + "type": "integer" + }, + "browser_name": { + "type": "string" + }, + "browser_logo": { + "type": "string" + }, + "os_name": { + "type": "string" + }, + "os_logo": { + "type": "string" + }, + "device_name": { + "type": "string" + }, + "device_logo": { + "type": "string" + }, + "location_name": { + "type": "string" + }, + "location_logo": { + "type": "string" + }, + "server_time_pretty": { + "type": "string" + }, + "time_on_page_pretty": { + "type": "string" + }, + "pageviews": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "label": { + "type": "string" + }, + "idloghsr": { + "type": "integer" + }, + "time_on_page": { + "type": "integer" + }, + "resolution": { + "type": "string" + }, + "server_time": { + "type": "string" + }, + "scroll_y_max_relative": { + "type": "integer" + }, + "fold_y_relative": { + "type": "integer" + }, + "server_time_pretty": { + "type": "string" + }, + "time_on_page_pretty": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "numPageviews": { + "type": "integer" + } + }, + "type": "object" + }, + "example": { + "url": "divezone.net\\\/", + "idvisit": null, + "idvisitor": null, + "idsite": 1, + "location_country": null, + "location_region": null, + "location_city": null, + "config_os": null, + "config_device_type": null, + "config_device_model": null, + "config_browser_name": null, + "time_on_page": 74771, + "server_time": "2025-09-11 19:25:03", + "viewport_w_px": 1440, + "viewport_h_px": 769, + "scroll_y_max_relative": 1000, + "fold_y_relative": 85, + "browser_name": "Unknown", + "browser_logo": "plugins\\\/Morpheus\\\/icons\\\/dist\\\/browsers\\\/UNK.png", + "os_name": "Unknown", + "os_logo": "plugins\\\/Morpheus\\\/icons\\\/dist\\\/os\\\/UNK.png", + "device_name": "Unknown", + "device_logo": "plugins\\\/Morpheus\\\/icons\\\/dist\\\/devices\\\/unknown.png", + "location_name": "", + "location_logo": "", + "server_time_pretty": "Sep 11, 2025 21:25:03", + "time_on_page_pretty": "1 min 14s", + "pageviews": [], + "numPageviews": 0 + } + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.deleteRecordedSession": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Deletes all recorded page views within a recorded session.", + "description": "Once a recorded session has been deleted, the replay video will no longer be available in the UI and no data\ncan be retrieved anymore via the API.", + "operationId": "HeatmapSessionRecording.deleteRecordedSession", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the session recording you want to delete the data.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "idVisit", + "in": "query", + "description": "The visitId of the recorded session you want to delete.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.deleteRecordedPageview": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Deletes an individual page view within a recorded session.", + "description": "It only deletes one recorded session of one page view, not all recorded sessions.\nOnce a recorded page view has been deleted, the replay video will no longer be available in the UI and no data\ncan be retrieved anymore via the API for this page view.", + "operationId": "HeatmapSessionRecording.deleteRecordedPageview", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the session recording you want to delete the data.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "idLogHsr", + "in": "query", + "description": "The id of the recorded session you want to delete.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#\/components\/responses\/GenericSuccessNoBody" + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.getRecordedHeatmapMetadata": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Get metadata for a specific heatmap like the number of samples \/ pageviews that were recorded or the\naverage above the fold per device type.", + "operationId": "HeatmapSessionRecording.getRecordedHeatmapMetadata", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "$ref": "#\/components\/parameters\/periodRequired" + }, + { + "$ref": "#\/components\/parameters\/dateRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the heatmap you want to retrieve the meta data for.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "$ref": "#\/components\/parameters\/segmentOptional" + } + ], + "responses": { + "200": { + "description": "The collection of metadata from a specific heatmap configuration during a period of time." + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.getRecordedHeatmap": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Get all activities of a heatmap.", + "description": "For example retrieve all mouse movements made by desktop visitors, or all clicks made my tablet visitors, or\nall scrolls by mobile users. It is recommended to call this method with filter_limit = -1 to retrieve all\nresults. As there can be many results, you may want to call this method several times using filter_limit and\nfilter_offset.", + "operationId": "HeatmapSessionRecording.getRecordedHeatmap", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "$ref": "#\/components\/parameters\/periodRequired" + }, + { + "$ref": "#\/components\/parameters\/dateRequired" + }, + { + "name": "idSiteHsr", + "in": "query", + "description": "The id of the heatmap you want to retrieve the data for.", + "required": true, + "schema": { + "type": "integer", + "example": 11 + } + }, + { + "name": "heatmapType", + "in": "query", + "description": "To see which heatmap types can be used, call {@link getAvailableHeatmapTypes()}", + "required": true, + "schema": { + "type": "integer", + "example": 2 + } + }, + { + "name": "deviceType", + "in": "query", + "description": "To see which device types can be used, call {@link getAvailableDeviceTypes()}", + "required": true, + "schema": { + "type": "integer", + "example": 1 + } + }, + { + "$ref": "#\/components\/parameters\/segmentOptional" + } + ], + "responses": { + "200": { + "description": "The list of activities associated with a specific heatmap recording within a period of time.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getRecordedHeatmap&idSite=1&period=day&date=today&idSiteHsr=11&heatmapType=2&deviceType=1&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getRecordedHeatmap&idSite=1&period=day&date=today&idSiteHsr=11&heatmapType=2&deviceType=1&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getRecordedHeatmap&idSite=1&period=day&date=today&idSiteHsr=11&heatmapType=2&deviceType=1&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "selector": "article#post-10 > div > p:nth-child(20) > img", + "offset_x": "1378", + "offset_y": "1608", + "value": "1" + }, + { + "selector": "html", + "offset_x": "2006", + "offset_y": "18", + "value": "1" + }, + { + "selector": "li#menu-item-2643 > a", + "offset_x": "1020", + "offset_y": "758", + "value": "2" + }, + { + "selector": "li#menu-item-2687 > a", + "offset_x": "286", + "offset_y": "854", + "value": "1" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "selector": { + "type": "string" + }, + "offset_x": { + "type": "integer" + }, + "offset_y": { + "type": "integer" + }, + "value": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "selector": "article#post-10 > div > p:nth-child(20) > img", + "offset_x": 1378, + "offset_y": 1608, + "value": 1 + }, + { + "selector": "html", + "offset_x": 2006, + "offset_y": 18, + "value": 1 + }, + { + "selector": "li#menu-item-2643 > a", + "offset_x": 1020, + "offset_y": 758, + "value": 2 + }, + { + "selector": "li#menu-item-2687 > a", + "offset_x": 286, + "offset_y": 854, + "value": 1 + } + ] + }, + "application\/vnd.ms-excel": { + "example": "selector offset_x offset_y value\narticle#post-10 > div > p:nth-child(20) > img 1378 1608 1\nhtml 2006 18 1\nli#menu-item-2643 > a 1020 758 2\nli#menu-item-2687 > a 286 854 1" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.testUrlMatchPages": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Tests, checks whether the given URL matches the given page rules.", + "description": "This can be used before configuring a heatmap or session recording to make sure the configured target page(s)\nwill match a specific URL.", + "operationId": "HeatmapSessionRecording.testUrlMatchPages", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "name": "url", + "in": "query", + "description": "The URL to test the matching rules against.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "matchPageRules", + "in": "query", + "description": "Collection of rules determining whether a visit to a URL should be recorded.", + "required": false, + "schema": { + "type": "array", + "items": [], + "default": [] + } + } + ], + "responses": { + "200": { + "description": "The result of the test, including the URL and whether it matches all rules.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.testUrlMatchPages&url=https:\/\/divezone.net\/&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.testUrlMatchPages&url=https:\/\/divezone.net\/&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.testUrlMatchPages&url=https:\/\/divezone.net\/&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": { + "url": "https:\\\/\\\/divezone.net\\\/", + "matches": "1" + } + } + }, + "application\/json": { + "schema": { + "properties": { + "url": { + "type": "string" + }, + "matches": { + "type": "boolean" + } + }, + "type": "object" + }, + "example": { + "url": "https:\\\/\\\/divezone.net\\\/", + "matches": true + } + }, + "application\/vnd.ms-excel": { + "example": "url matches\nhttps:\/\/divezone.net\/ 1" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.getAvailableStatuses": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Get a list of valid heatmap and session recording statuses (eg \"active\", \"ended\")", + "operationId": "HeatmapSessionRecording.getAvailableStatuses", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + } + ], + "responses": { + "200": { + "description": "The list of potential statuses and their human-friendly names.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getAvailableStatuses&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getAvailableStatuses&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getAvailableStatuses&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "value": "active", + "name": "Active" + }, + { + "value": "ended", + "name": "Ended" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "value": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "value": "active", + "name": "Active" + }, + { + "value": "ended", + "name": "Ended" + } + ] + }, + "application\/vnd.ms-excel": { + "example": "value name\nactive Active\nended Ended" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.getAvailableTargetPageRules": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Get a list of all available target attributes and target types for \"pageTargets\" \/ \"page rules\".", + "description": "For example URL, URL Parameter, Path, simple comparison, contains, starts with, and more.", + "operationId": "HeatmapSessionRecording.getAvailableTargetPageRules", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + } + ], + "responses": { + "200": { + "description": "The list of the available components for building matching rules.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getAvailableTargetPageRules&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getAvailableTargetPageRules&format=JSON&token_auth=anonymous), TSV (N\/A)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "properties": { + "types": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object" + } + }, + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "value": "url", + "name": "URL", + "types": { + "row": [ + { + "value": "equals_exactly", + "name": "equals exactly" + }, + { + "value": "equals_simple", + "name": "equals simple" + }, + { + "value": "contains", + "name": "contains" + }, + { + "value": "starts_with", + "name": "starts with" + }, + { + "value": "regexp", + "name": "matches the regular expression" + } + ] + }, + "example": "http:\\\/\\\/www.example.com\\\/directory" + }, + { + "value": "path", + "name": "Path", + "types": { + "row": [ + { + "value": "equals_exactly", + "name": "equals exactly" + }, + { + "value": "equals_simple", + "name": "equals simple" + }, + { + "value": "contains", + "name": "contains" + }, + { + "value": "starts_with", + "name": "starts with" + }, + { + "value": "regexp", + "name": "matches the regular expression" + } + ] + }, + "example": "\\\/directory" + }, + { + "value": "urlparam", + "name": "URL Parameter", + "types": { + "row": [ + { + "value": "exists", + "name": "exists" + }, + { + "value": "equals_exactly", + "name": "equals exactly" + }, + { + "value": "contains", + "name": "contains" + }, + { + "value": "regexp", + "name": "matches the regular expression" + } + ] + }, + "example": "nameOfUrlParameter" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "value": { + "type": "string" + }, + "name": { + "type": "string" + }, + "types": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "value": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "value": "url", + "name": "URL", + "types": [ + { + "value": "equals_exactly", + "name": "equals exactly" + }, + { + "value": "equals_simple", + "name": "equals simple" + }, + { + "value": "contains", + "name": "contains" + }, + { + "value": "starts_with", + "name": "starts with" + }, + { + "value": "regexp", + "name": "matches the regular expression" + } + ], + "example": "http:\\\/\\\/www.example.com\\\/directory" + }, + { + "value": "path", + "name": "Path", + "types": [ + { + "value": "equals_exactly", + "name": "equals exactly" + }, + { + "value": "equals_simple", + "name": "equals simple" + }, + { + "value": "contains", + "name": "contains" + }, + { + "value": "starts_with", + "name": "starts with" + }, + { + "value": "regexp", + "name": "matches the regular expression" + } + ], + "example": "\\\/directory" + }, + { + "value": "urlparam", + "name": "URL Parameter", + "types": [ + { + "value": "exists", + "name": "exists" + }, + { + "value": "equals_exactly", + "name": "equals exactly" + }, + { + "value": "contains", + "name": "contains" + }, + { + "value": "regexp", + "name": "matches the regular expression" + } + ], + "example": "nameOfUrlParameter" + } + ] + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.getAvailableDeviceTypes": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Get a list of available device types that can be used when fetching a heatmap report.", + "description": "For example desktop, tablet, mobile.", + "operationId": "HeatmapSessionRecording.getAvailableDeviceTypes", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + } + ], + "responses": { + "200": { + "description": "The list of available device types and their human-friendly names.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getAvailableDeviceTypes&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getAvailableDeviceTypes&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getAvailableDeviceTypes&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "name": "Desktop", + "key": "1", + "logo": "plugins\\\/Morpheus\\\/icons\\\/dist\\\/devices\\\/desktop.png" + }, + { + "name": "Tablet", + "key": "2", + "logo": "plugins\\\/Morpheus\\\/icons\\\/dist\\\/devices\\\/tablet.png" + }, + { + "name": "Mobile", + "key": "3", + "logo": "plugins\\\/Morpheus\\\/icons\\\/dist\\\/devices\\\/smartphone.png" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "name": { + "type": "string" + }, + "key": { + "type": "integer" + }, + "logo": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "name": "Desktop", + "key": 1, + "logo": "plugins\\\/Morpheus\\\/icons\\\/dist\\\/devices\\\/desktop.png" + }, + { + "name": "Tablet", + "key": 2, + "logo": "plugins\\\/Morpheus\\\/icons\\\/dist\\\/devices\\\/tablet.png" + }, + { + "name": "Mobile", + "key": 3, + "logo": "plugins\\\/Morpheus\\\/icons\\\/dist\\\/devices\\\/smartphone.png" + } + ] + }, + "application\/vnd.ms-excel": { + "example": "name key logo\nDesktop 1 plugins\/Morpheus\/icons\/dist\/devices\/desktop.png\nTablet 2 plugins\/Morpheus\/icons\/dist\/devices\/tablet.png\nMobile 3 plugins\/Morpheus\/icons\/dist\/devices\/smartphone.png" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.getAvailableHeatmapTypes": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Get a list of available heatmap types that can be used when fetching a heatmap report.", + "description": "For example click, mouse move, scroll.", + "operationId": "HeatmapSessionRecording.getAvailableHeatmapTypes", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + } + ], + "responses": { + "200": { + "description": "The list of available categories of heatmaps and their human-friendly names.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getAvailableHeatmapTypes&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getAvailableHeatmapTypes&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getAvailableHeatmapTypes&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "name": "Click", + "key": "2" + }, + { + "name": "Move", + "key": "1" + }, + { + "name": "Scroll", + "key": "3" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "name": { + "type": "string" + }, + "key": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "name": "Click", + "key": 2 + }, + { + "name": "Move", + "key": 1 + }, + { + "name": "Scroll", + "key": 3 + } + ] + }, + "application\/vnd.ms-excel": { + "example": "name key\nClick 2\nMove 1\nScroll 3" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.getAvailableSessionRecordingSampleLimits": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Get a list of available session recording sample limits.", + "description": "Note: This is only a suggested list of sample limits that should be shown in the UI when creating or editing a\nsession recording. When you configure a session recording via the API directly, any limit can be used.\n\nFor example 50, 100, 200, 500", + "operationId": "HeatmapSessionRecording.getAvailableSessionRecordingSampleLimits", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + } + ], + "responses": { + "200": { + "description": "The list of available integer values that can be used as the session recording sample limit.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getAvailableSessionRecordingSampleLimits&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getAvailableSessionRecordingSampleLimits&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getAvailableSessionRecordingSampleLimits&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + "50", + "100", + "250", + "500", + "1000", + "2000", + "5000" + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": [] + }, + "example": [ + 50, + 100, + 250, + 500, + 1000, + 2000, + 5000 + ] + }, + "application\/vnd.ms-excel": { + "example": "50\n100\n250\n500\n1000\n2000\n5000" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=HeatmapSessionRecording.getEventTypes": { + "get": { + "tags": [ + "HeatmapSessionRecording" + ], + "summary": "Get a list of available event types that may be returned. E.g. when fetching a recorded session.", + "operationId": "HeatmapSessionRecording.getEventTypes", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + } + ], + "responses": { + "200": { + "description": "The list of the types of events and their human-friendly names which can be tracked as part of a recording.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getEventTypes&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getEventTypes&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=HeatmapSessionRecording.getEventTypes&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "name": "Move", + "key": "1" + }, + { + "name": "Click", + "key": "2" + }, + { + "name": "Scroll", + "key": "3" + }, + { + "name": "Resize", + "key": "4" + }, + { + "name": "Initial Page", + "key": "5" + }, + { + "name": "Change Within Page", + "key": "6" + }, + { + "name": "Form Text Change", + "key": "9" + }, + { + "name": "Form Value Change", + "key": "10" + }, + { + "name": "Scroll Element", + "key": "12" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "name": { + "type": "string" + }, + "key": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "name": "Move", + "key": 1 + }, + { + "name": "Click", + "key": 2 + }, + { + "name": "Scroll", + "key": 3 + }, + { + "name": "Resize", + "key": 4 + }, + { + "name": "Initial Page", + "key": 5 + }, + { + "name": "Change Within Page", + "key": 6 + }, + { + "name": "Form Text Change", + "key": 9 + }, + { + "name": "Form Value Change", + "key": 10 + }, + { + "name": "Scroll Element", + "key": 12 + } + ] + }, + "application\/vnd.ms-excel": { + "example": "name key\nMove 1\nClick 2\nScroll 3\nResize 4\nInitial Page 5\nChange Within Page 6\nForm Text Change 9\nForm Value Change 10\nScroll Element 12" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=UsersFlow.getUsersFlowPretty": { + "get": { + "tags": [ + "UsersFlow" + ], + "summary": "Get flow details for each available interaction step.", + "description": "The first table level will list all available interaction steps,\nTheir subtables list all pages and actions they viewed or performed within that interaction steps,\nTheir subtables list where they proceeded to afterwards as the next interaction.\n\nThis report is polished to be more human readable and adds some processed metrics like the proceeded rate and exit rate.\nIf you are interested in integrating the data into a different system you may be interested in the \"UsersFlow.getUsersFlow\" API method.", + "operationId": "UsersFlow.getUsersFlowPretty", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "$ref": "#\/components\/parameters\/periodRequired" + }, + { + "$ref": "#\/components\/parameters\/dateRequired" + }, + { + "$ref": "#\/components\/parameters\/segmentOptional" + }, + { + "$ref": "#\/components\/parameters\/expandedOptional" + }, + { + "$ref": "#\/components\/parameters\/flatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSubtableOptional" + }, + { + "name": "dataSource", + "in": "query", + "description": "Either 'page_url' or 'page_title'. For a list of all available data sources call the API method UsersFlow.getAvailableDataSources", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A collection of flow details.<\/br>Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=UsersFlow.getUsersFlowPretty&idSite=1&period=day&date=today&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=UsersFlow.getUsersFlowPretty&idSite=1&period=day&date=today&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=UsersFlow.getUsersFlowPretty&idSite=1&period=day&date=today&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "label": "Interaction 1", + "nb_visits": "2781", + "nb_exits": "1926", + "nb_proceeded": "855", + "proceeded_rate": "0.31", + "exit_rate": "69%" + }, + { + "label": "Interaction 2", + "nb_visits": "855", + "nb_exits": "320", + "nb_proceeded": "535", + "proceeded_rate": "0.63", + "exit_rate": "37%" + }, + { + "label": "Interaction 3", + "nb_visits": "535", + "nb_exits": "165", + "nb_proceeded": "370", + "proceeded_rate": "0.69", + "exit_rate": "31%" + }, + { + "label": "Interaction 4", + "nb_visits": "370", + "nb_exits": "85", + "nb_proceeded": "285", + "proceeded_rate": "0.77", + "exit_rate": "23%" + }, + { + "label": "Interaction 5", + "nb_visits": "285", + "nb_exits": "66", + "nb_proceeded": "219", + "proceeded_rate": "0.77", + "exit_rate": "23%" + }, + { + "label": "Interaction 6", + "nb_visits": "219", + "nb_exits": "56", + "nb_proceeded": "163", + "proceeded_rate": "0.74", + "exit_rate": "26%" + }, + { + "label": "Interaction 7", + "nb_visits": "163", + "nb_exits": "28", + "nb_proceeded": "135", + "proceeded_rate": "0.83", + "exit_rate": "17%" + }, + { + "label": "Interaction 8", + "nb_visits": "135", + "nb_exits": "23", + "nb_proceeded": "112", + "proceeded_rate": "0.83", + "exit_rate": "17%" + }, + { + "label": "Interaction 9", + "nb_visits": "112", + "nb_exits": "23", + "nb_proceeded": "89", + "proceeded_rate": "0.79", + "exit_rate": "21%" + }, + { + "label": "Interaction 10", + "nb_visits": "89", + "nb_exits": "14", + "nb_proceeded": "75", + "proceeded_rate": "0.84", + "exit_rate": "16%" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "label": { + "type": "string" + }, + "nb_visits": { + "type": "integer" + }, + "nb_exits": { + "type": "integer" + }, + "nb_proceeded": { + "type": "integer" + }, + "proceeded_rate": { + "type": [ + "string", + "number", + "integer", + "boolean", + "array", + "object", + "null" + ] + }, + "exit_rate": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "label": "Interaction 1", + "nb_visits": 2781, + "nb_exits": 1926, + "nb_proceeded": 855, + "proceeded_rate": 0.31, + "exit_rate": "69%" + }, + { + "label": "Interaction 2", + "nb_visits": 855, + "nb_exits": 320, + "nb_proceeded": 535, + "proceeded_rate": 0.63, + "exit_rate": "37%" + }, + { + "label": "Interaction 3", + "nb_visits": 535, + "nb_exits": 165, + "nb_proceeded": 370, + "proceeded_rate": 0.69, + "exit_rate": "31%" + }, + { + "label": "Interaction 4", + "nb_visits": 370, + "nb_exits": 85, + "nb_proceeded": 285, + "proceeded_rate": 0.77, + "exit_rate": "23%" + }, + { + "label": "Interaction 5", + "nb_visits": 285, + "nb_exits": 66, + "nb_proceeded": 219, + "proceeded_rate": 0.77, + "exit_rate": "23%" + }, + { + "label": "Interaction 6", + "nb_visits": 219, + "nb_exits": 56, + "nb_proceeded": 163, + "proceeded_rate": 0.74, + "exit_rate": "26%" + }, + { + "label": "Interaction 7", + "nb_visits": 163, + "nb_exits": 28, + "nb_proceeded": 135, + "proceeded_rate": 0.83, + "exit_rate": "17%" + }, + { + "label": "Interaction 8", + "nb_visits": 135, + "nb_exits": 23, + "nb_proceeded": 112, + "proceeded_rate": 0.83, + "exit_rate": "17%" + }, + { + "label": "Interaction 9", + "nb_visits": 112, + "nb_exits": 23, + "nb_proceeded": 89, + "proceeded_rate": 0.79, + "exit_rate": "21%" + }, + { + "label": "Interaction 10", + "nb_visits": 89, + "nb_exits": 14, + "nb_proceeded": 75, + "proceeded_rate": 0.84, + "exit_rate": "16%" + } + ] + }, + "application\/vnd.ms-excel": { + "example": "label nb_visits nb_exits nb_proceeded proceeded_rate exit_rate\nInteraction 1 2781 1926 855 0.31 69%\nInteraction 2 855 320 535 0.63 37%\nInteraction 3 535 165 370 0.69 31%\nInteraction 4 370 85 285 0.77 23%\nInteraction 5 285 66 219 0.77 23%\nInteraction 6 219 56 163 0.74 26%\nInteraction 7 163 28 135 0.83 17%\nInteraction 8 135 23 112 0.83 17%\nInteraction 9 112 23 89 0.79 21%\nInteraction 10 89 14 75 0.84 16%" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=UsersFlow.getUsersFlow": { + "get": { + "tags": [ + "UsersFlow" + ], + "summary": "Get flow details for each available interaction step.", + "description": "The first table level will list all available interaction steps,\nTheir subtables list all pages and actions they viewed or performed within that interaction steps,\nTheir subtables list where they proceeded to afterwards as the next interaction.\n\nThis report is \"unformatted\" and useful if you want to develop your own visualization on top of this API or if\nyou want to use the data for integrating it into another tool. If you are interested in requesting the report data\nin a more human readable way you may want to have a look at \"UsersFlow.getUsersFlowPretty\".", + "operationId": "UsersFlow.getUsersFlow", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "$ref": "#\/components\/parameters\/periodRequired" + }, + { + "$ref": "#\/components\/parameters\/dateRequired" + }, + { + "name": "limitActionsPerStep", + "in": "query", + "description": "By default, only 5 rows per interaction step are returned and all other rows are merged into \"Others\".", + "required": false, + "schema": { + "type": "integer", + "default": 5 + } + }, + { + "name": "exploreStep", + "in": "query", + "description": "Optional filter on visit step tied to the pageview_position column.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "exploreUrl", + "in": "query", + "description": "Optional URL filter by.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "$ref": "#\/components\/parameters\/segmentOptional" + }, + { + "$ref": "#\/components\/parameters\/expandedOptional" + }, + { + "name": "dataSource", + "in": "query", + "description": "Either 'page_url' or 'page_title'. For a list of all available data sources call the API method UsersFlow.getAvailableDataSources", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=UsersFlow.getUsersFlow&idSite=1&period=day&date=today&limitActionsPerStep=5&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=UsersFlow.getUsersFlow&idSite=1&period=day&date=today&limitActionsPerStep=5&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=UsersFlow.getUsersFlow&idSite=1&period=day&date=today&limitActionsPerStep=5&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "label": "1", + "nb_visits": "2781", + "nb_exits": "1926", + "nb_proceeded": "855" + }, + { + "label": "2", + "nb_visits": "855", + "nb_exits": "320", + "nb_proceeded": "535" + }, + { + "label": "3", + "nb_visits": "535", + "nb_exits": "165", + "nb_proceeded": "370" + }, + { + "label": "4", + "nb_visits": "370", + "nb_exits": "85", + "nb_proceeded": "285" + }, + { + "label": "5", + "nb_visits": "285", + "nb_exits": "66", + "nb_proceeded": "219" + }, + { + "label": "6", + "nb_visits": "219", + "nb_exits": "56", + "nb_proceeded": "163" + }, + { + "label": "7", + "nb_visits": "163", + "nb_exits": "28", + "nb_proceeded": "135" + }, + { + "label": "8", + "nb_visits": "135", + "nb_exits": "23", + "nb_proceeded": "112" + }, + { + "label": "9", + "nb_visits": "112", + "nb_exits": "23", + "nb_proceeded": "89" + }, + { + "label": "10", + "nb_visits": "89", + "nb_exits": "14", + "nb_proceeded": "75" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "label": { + "type": "string" + }, + "nb_visits": { + "type": "integer" + }, + "nb_exits": { + "type": "integer" + }, + "nb_proceeded": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "label": "1", + "nb_visits": 2781, + "nb_exits": 1926, + "nb_proceeded": 855 + }, + { + "label": "2", + "nb_visits": 855, + "nb_exits": 320, + "nb_proceeded": 535 + }, + { + "label": "3", + "nb_visits": 535, + "nb_exits": 165, + "nb_proceeded": 370 + }, + { + "label": "4", + "nb_visits": 370, + "nb_exits": 85, + "nb_proceeded": 285 + }, + { + "label": "5", + "nb_visits": 285, + "nb_exits": 66, + "nb_proceeded": 219 + }, + { + "label": "6", + "nb_visits": 219, + "nb_exits": 56, + "nb_proceeded": 163 + }, + { + "label": "7", + "nb_visits": 163, + "nb_exits": 28, + "nb_proceeded": 135 + }, + { + "label": "8", + "nb_visits": 135, + "nb_exits": 23, + "nb_proceeded": 112 + }, + { + "label": "9", + "nb_visits": 112, + "nb_exits": 23, + "nb_proceeded": 89 + }, + { + "label": "10", + "nb_visits": 89, + "nb_exits": 14, + "nb_proceeded": 75 + } + ] + }, + "application\/vnd.ms-excel": { + "example": "label nb_visits nb_exits nb_proceeded\n1 2781 1926 855\n2 855 320 535\n3 535 165 370\n4 370 85 285\n5 285 66 219\n6 219 56 163\n7 163 28 135\n8 135 23 112\n9 112 23 89\n10 89 14 75" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=UsersFlow.getInteractionActions": { + "get": { + "tags": [ + "UsersFlow" + ], + "summary": "Get all actions that were performed as part of a specific interaction step. For example \"Give me all pages that\nwere viewed in the first step\". Their subtables hold rows to where the users proceeded to next.", + "operationId": "UsersFlow.getInteractionActions", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + }, + { + "$ref": "#\/components\/parameters\/idSiteRequired" + }, + { + "$ref": "#\/components\/parameters\/periodRequired" + }, + { + "$ref": "#\/components\/parameters\/dateRequired" + }, + { + "name": "interactionPosition", + "in": "query", + "description": "The label identifying the row to load as a subtable. E.g. '1' for the first row.", + "required": true, + "schema": { + "type": "string", + "example": "2" + } + }, + { + "name": "offsetActionsPerStep", + "in": "query", + "description": "Optional number to offset the results by.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "$ref": "#\/components\/parameters\/segmentOptional" + }, + { + "$ref": "#\/components\/parameters\/idSubtableOptional" + }, + { + "name": "dataSource", + "in": "query", + "description": "Either 'page_url' or 'page_title'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=UsersFlow.getInteractionActions&idSite=1&period=day&date=today&interactionPosition=2&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=UsersFlow.getInteractionActions&idSite=1&period=day&date=today&interactionPosition=2&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=UsersFlow.getInteractionActions&idSite=1&period=day&date=today&interactionPosition=2&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "label": "dive-shop.net\\\/cart", + "nb_visits": "53", + "nb_exits": "7", + "nb_proceeded": "46" + }, + { + "label": "divezone.net\\\/jobs", + "nb_visits": "37", + "nb_exits": "16", + "nb_proceeded": "21" + }, + { + "label": "dive-shop.net\\\/products\\\/diving-tank", + "nb_visits": "22", + "nb_exits": "6", + "nb_proceeded": "16" + }, + { + "label": "divezone.net\\\/diving\\\/bali", + "nb_visits": "19", + "nb_exits": "8", + "nb_proceeded": "11" + }, + { + "label": "divezone.net\\\/best-dive-sites", + "nb_visits": "16", + "nb_exits": "4", + "nb_proceeded": "12" + }, + { + "label": "dive-shop.net\\\/best-of-the-best", + "nb_visits": "14", + "nb_exits": "1", + "nb_proceeded": "13" + }, + { + "label": "dive-shop.net\\\/products\\\/basic-wetsuit", + "nb_visits": "14", + "nb_exits": "1", + "nb_proceeded": "13" + }, + { + "label": "divezone.net\\\/diving\\\/red-sea", + "nb_visits": "12", + "nb_exits": "5", + "nb_proceeded": "7" + }, + { + "label": "dive-shop.net", + "nb_visits": "11", + "nb_exits": "2", + "nb_proceeded": "9" + }, + { + "label": "divezone.net", + "nb_visits": "11", + "nb_exits": "6", + "nb_proceeded": "5" + }, + { + "label": "dive-shop.net\\\/products\\\/diving-knife", + "nb_visits": "10", + "nb_exits": "3", + "nb_proceeded": "7" + }, + { + "label": "divezone.net\\\/diving\\\/komodo-island", + "nb_visits": "10", + "nb_exits": "5", + "nb_proceeded": "5" + }, + { + "label": "divezone.net\\\/diving\\\/nusa-penida-nusa-lembongan", + "nb_visits": "10", + "nb_exits": "4", + "nb_proceeded": "6" + }, + { + "label": "Search", + "nb_visits": "10", + "nb_exits": "2", + "nb_proceeded": "8" + }, + { + "label": "dive-shop.net\\\/checkout", + "nb_visits": "9", + "nb_exits": "3", + "nb_proceeded": "6" + }, + { + "label": "divezone.net\\\/divesite\\\/uss-liberty-wreck", + "nb_visits": "9", + "nb_exits": "3", + "nb_proceeded": "6" + }, + { + "label": "divezone.net\\\/diving\\\/great-barrier-reef", + "nb_visits": "9", + "nb_exits": "7", + "nb_proceeded": "2" + }, + { + "label": "divezone.net\\\/diving\\\/indonesia", + "nb_visits": "9", + "nb_exits": "6", + "nb_proceeded": "3" + }, + { + "label": "divezone.net\\\/diving\\\/australia", + "nb_visits": "8", + "nb_exits": "4", + "nb_proceeded": "4" + }, + { + "label": "divezone.net\\\/diving\\\/florida", + "nb_visits": "8", + "nb_exits": "5", + "nb_proceeded": "3" + }, + { + "label": "divezone.net\\\/diving\\\/maldives", + "nb_visits": "8", + "nb_exits": "4", + "nb_proceeded": "4" + }, + { + "label": "divezone.net\\\/diving\\\/thailand", + "nb_visits": "8", + "nb_exits": "3", + "nb_proceeded": "5" + }, + { + "label": "divezone.net\\\/jobs\\\/view\\\/divemaster-21", + "nb_visits": "8", + "nb_exits": "2", + "nb_proceeded": "6" + }, + { + "label": "dive-shop.net\\\/products\\\/scuba-fins", + "nb_visits": "7", + "nb_exits": "1", + "nb_proceeded": "6" + }, + { + "label": "divezone.net\\\/diving\\\/hawaii", + "nb_visits": "7", + "nb_exits": "5", + "nb_proceeded": "2" + }, + { + "label": "divezone.net\\\/diving\\\/malaysia", + "nb_visits": "7", + "nb_exits": "2", + "nb_proceeded": "5" + }, + { + "label": "divezone.net\\\/diving\\\/philippines", + "nb_visits": "7", + "nb_exits": "3", + "nb_proceeded": "4" + }, + { + "label": "divezone.net\\\/jobs\\\/page\\\/2", + "nb_visits": "7", + "nb_exits": "3", + "nb_proceeded": "4" + }, + { + "label": "dive-shop.net\\\/products\\\/diving-accessory-starter-kit", + "nb_visits": "6", + "nb_exits": "0", + "nb_proceeded": "6" + }, + { + "label": "dive-shop.net\\\/products\\\/octopus", + "nb_visits": "6", + "nb_exits": "2", + "nb_proceeded": "4" + }, + { + "label": "divezone.net\\\/diving\\\/coron-palawan", + "nb_visits": "6", + "nb_exits": "4", + "nb_proceeded": "2" + }, + { + "label": "Others", + "nb_visits": "257", + "nb_exits": "112", + "nb_proceeded": "145" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "label": { + "type": "string" + }, + "nb_visits": { + "type": "integer" + }, + "nb_exits": { + "type": "integer" + }, + "nb_proceeded": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "label": "dive-shop.net\\\/cart", + "nb_visits": 53, + "nb_exits": 7, + "nb_proceeded": 46 + }, + { + "label": "divezone.net\\\/jobs", + "nb_visits": 37, + "nb_exits": 16, + "nb_proceeded": 21 + }, + { + "label": "dive-shop.net\\\/products\\\/diving-tank", + "nb_visits": 22, + "nb_exits": 6, + "nb_proceeded": 16 + }, + { + "label": "divezone.net\\\/diving\\\/bali", + "nb_visits": 19, + "nb_exits": 8, + "nb_proceeded": 11 + }, + { + "label": "divezone.net\\\/best-dive-sites", + "nb_visits": 16, + "nb_exits": 4, + "nb_proceeded": 12 + }, + { + "label": "dive-shop.net\\\/best-of-the-best", + "nb_visits": 14, + "nb_exits": 1, + "nb_proceeded": 13 + }, + { + "label": "dive-shop.net\\\/products\\\/basic-wetsuit", + "nb_visits": 14, + "nb_exits": 1, + "nb_proceeded": 13 + }, + { + "label": "divezone.net\\\/diving\\\/red-sea", + "nb_visits": 12, + "nb_exits": 5, + "nb_proceeded": 7 + }, + { + "label": "dive-shop.net", + "nb_visits": 11, + "nb_exits": 2, + "nb_proceeded": 9 + }, + { + "label": "divezone.net", + "nb_visits": 11, + "nb_exits": 6, + "nb_proceeded": 5 + }, + { + "label": "dive-shop.net\\\/products\\\/diving-knife", + "nb_visits": 10, + "nb_exits": 3, + "nb_proceeded": 7 + }, + { + "label": "divezone.net\\\/diving\\\/komodo-island", + "nb_visits": 10, + "nb_exits": 5, + "nb_proceeded": 5 + }, + { + "label": "divezone.net\\\/diving\\\/nusa-penida-nusa-lembongan", + "nb_visits": 10, + "nb_exits": 4, + "nb_proceeded": 6 + }, + { + "label": "Search", + "nb_visits": 10, + "nb_exits": 2, + "nb_proceeded": 8 + }, + { + "label": "dive-shop.net\\\/checkout", + "nb_visits": 9, + "nb_exits": 3, + "nb_proceeded": 6 + }, + { + "label": "divezone.net\\\/divesite\\\/uss-liberty-wreck", + "nb_visits": 9, + "nb_exits": 3, + "nb_proceeded": 6 + }, + { + "label": "divezone.net\\\/diving\\\/great-barrier-reef", + "nb_visits": 9, + "nb_exits": 7, + "nb_proceeded": 2 + }, + { + "label": "divezone.net\\\/diving\\\/indonesia", + "nb_visits": 9, + "nb_exits": 6, + "nb_proceeded": 3 + }, + { + "label": "divezone.net\\\/diving\\\/australia", + "nb_visits": 8, + "nb_exits": 4, + "nb_proceeded": 4 + }, + { + "label": "divezone.net\\\/diving\\\/florida", + "nb_visits": 8, + "nb_exits": 5, + "nb_proceeded": 3 + }, + { + "label": "divezone.net\\\/diving\\\/maldives", + "nb_visits": 8, + "nb_exits": 4, + "nb_proceeded": 4 + }, + { + "label": "divezone.net\\\/diving\\\/thailand", + "nb_visits": 8, + "nb_exits": 3, + "nb_proceeded": 5 + }, + { + "label": "divezone.net\\\/jobs\\\/view\\\/divemaster-21", + "nb_visits": 8, + "nb_exits": 2, + "nb_proceeded": 6 + }, + { + "label": "dive-shop.net\\\/products\\\/scuba-fins", + "nb_visits": 7, + "nb_exits": 1, + "nb_proceeded": 6 + }, + { + "label": "divezone.net\\\/diving\\\/hawaii", + "nb_visits": 7, + "nb_exits": 5, + "nb_proceeded": 2 + }, + { + "label": "divezone.net\\\/diving\\\/malaysia", + "nb_visits": 7, + "nb_exits": 2, + "nb_proceeded": 5 + }, + { + "label": "divezone.net\\\/diving\\\/philippines", + "nb_visits": 7, + "nb_exits": 3, + "nb_proceeded": 4 + }, + { + "label": "divezone.net\\\/jobs\\\/page\\\/2", + "nb_visits": 7, + "nb_exits": 3, + "nb_proceeded": 4 + }, + { + "label": "dive-shop.net\\\/products\\\/diving-accessory-starter-kit", + "nb_visits": 6, + "nb_exits": 0, + "nb_proceeded": 6 + }, + { + "label": "dive-shop.net\\\/products\\\/octopus", + "nb_visits": 6, + "nb_exits": 2, + "nb_proceeded": 4 + }, + { + "label": "divezone.net\\\/diving\\\/coron-palawan", + "nb_visits": 6, + "nb_exits": 4, + "nb_proceeded": 2 + }, + { + "label": "divezone.net\\\/diving\\\/sipadan", + "nb_visits": 6, + "nb_exits": 4, + "nb_proceeded": 2 + }, + { + "label": "divezone.net\\\/diving\\\/tulamben", + "nb_visits": 6, + "nb_exits": 2, + "nb_proceeded": 4 + }, + { + "label": "dive-shop.net\\\/my-account", + "nb_visits": 5, + "nb_exits": 0, + "nb_proceeded": 5 + } + ] + }, + "application\/vnd.ms-excel": { + "example": "label nb_visits nb_exits nb_proceeded\ndive-shop.net\/cart 53 7 46\ndivezone.net\/jobs 37 16 21\ndive-shop.net\/products\/diving-tank 22 6 16\ndivezone.net\/diving\/bali 19 8 11\ndivezone.net\/best-dive-sites 16 4 12\ndive-shop.net\/best-of-the-best 14 1 13\ndive-shop.net\/products\/basic-wetsuit 14 1 13\ndivezone.net\/diving\/red-sea 12 5 7\ndive-shop.net 11 2 9\ndivezone.net 11 6 5\ndive-shop.net\/products\/diving-knife 10 3 7\ndivezone.net\/diving\/komodo-island 10 5 5\ndivezone.net\/diving\/nusa-penida-nusa-lembongan 10 4 6\nSearch 10 2 8\ndive-shop.net\/checkout 9 3 6\ndivezone.net\/divesite\/uss-liberty-wreck 9 3 6\ndivezone.net\/diving\/great-barrier-reef 9 7 2\ndivezone.net\/diving\/indonesia 9 6 3\ndivezone.net\/diving\/australia 8 4 4\ndivezone.net\/diving\/florida 8 5 3\ndivezone.net\/diving\/maldives 8 4 4\ndivezone.net\/diving\/thailand 8 3 5\ndivezone.net\/jobs\/view\/divemaster-21 8 2 6\ndive-shop.net\/products\/scuba-fins 7 1 6\ndivezone.net\/diving\/hawaii 7 5 2\ndivezone.net\/diving\/malaysia 7 2 5\ndivezone.net\/diving\/philippines 7 3 4\ndivezone.net\/jobs\/page\/2 7 3 4\ndive-shop.net\/products\/diving-accessory-starter-kit 6 0 6\ndive-shop.net\/products\/octopus 6 2 4\ndivezone.net\/diving\/coron-palawan 6 4 2\ndivezone.net\/diving\/sipadan 6 4 2\ndivezone.net\/diving\/tulamben 6 2 4\ndive-shop.net\/my-account 5 0 5\ndive-shop.net\/products\/silicone-grease 5 0 5\ndivezone.net\/caribbean-sea-liveaboard-diving 5 3 2\ndivezone.net\/divesite\/richelieu-rock 5 1 4\ndivezone.net\/diving\/galapagos 5 3 2\ndivezone.net\/diving\/gili-islands-lombok 5 1 4\ndivezone.net\/diving\/koh-phi-phi 5 1 4\ndivezone.net\/jobs\/view\/a-couple-of-instructors-needed-to-run-a-brand-new-dive-center-in-little-corn-island 5 2 3\ndivezone.net\/jobs\/view\/divemaster-2 5 1 4\ndive-shop.net\/guides\/low-visibility-dives 4 0 4\ndive-shop.net\/products\/diving-boots 4 1 3\ndivezone.net\/divesite\/manta-point 4 1 3\ndivezone.net\/divesite\/ss-yongala-wreck 4 2 2\ndivezone.net\/jobs\/view\/dive-instructor-27 4 0 4\ndivezone.net\/jobs\/view\/open-water-scuba-instructor-2 4 0 4\ndivezone.net\/jobs\/view\/red-sea-fresh-owsi-is-needed-in-aqaba-jordan-asap 4 0 4\ndivezone.net\/ko-tao.htm 4 1 3\ndivezone.net\/liveaboard\/mv-belize-aggressor-iv 4 3 1\ndive-shop.net\/products\/diving-snorkel 3 0 3\ndive-shop.net\/products\/regulator 3 3 0\ndive-shop.net\/promotion\/50-off-scuba-diving-masks 3 0 3\ndivezone.net\/divesite\/blue-hole 3 3 0\ndivezone.net\/divesite\/deep-turbo 3 1 2\ndivezone.net\/divesite\/hmas-brisbane 3 1 2\ndivezone.net\/divesite\/ss-thistlegorm-wreck 3 0 3\ndivezone.net\/diving\/amed 3 1 2\ndivezone.net\/diving\/bunaken-manado 3 2 1\ndivezone.net\/diving\/cayman-islands 3 1 2\ndivezone.net\/diving\/costa-rica 3 2 1\ndivezone.net\/diving\/dahab 3 0 3\ndivezone.net\/diving\/koh-tao 3 0 3\ndivezone.net\/diving\/marsa-alam 3 3 0\ndivezone.net\/diving\/padang-bai 3 2 1\ndivezone.net\/diving\/perenthians-islands 3 2 1\ndivezone.net\/diving\/port-douglas 3 2 1\ndivezone.net\/diving\/pulau-menjangan 3 0 3\ndivezone.net\/diving\/seychelles 3 2 1\ndivezone.net\/diving\/similan-islands 3 2 1\ndivezone.net\/diving\/wakatobi 3 2 1\ndivezone.net\/liveaboard 3 0 3" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + }, + "\/index.php?module=API&method=UsersFlow.getAvailableDataSources": { + "get": { + "tags": [ + "UsersFlow" + ], + "summary": "Get a list of all available data sources", + "operationId": "UsersFlow.getAvailableDataSources", + "parameters": [ + { + "$ref": "#\/components\/parameters\/formatOptional" + } + ], + "responses": { + "200": { + "description": "Example links: [XML](https:\/\/demo.matomo.cloud\/?module=API&method=UsersFlow.getAvailableDataSources&format=xml&token_auth=anonymous), [JSON](https:\/\/demo.matomo.cloud\/?module=API&method=UsersFlow.getAvailableDataSources&format=JSON&token_auth=anonymous), [TSV (Excel)](https:\/\/demo.matomo.cloud\/?module=API&method=UsersFlow.getAvailableDataSources&format=Tsv&token_auth=anonymous)", + "content": { + "text\/xml": { + "schema": { + "properties": { + "row": { + "type": "array", + "items": { + "type": "object", + "xml": { + "name": "row" + }, + "additionalProperties": true + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + }, + "example": { + "row": [ + { + "value": "page_url", + "name": "Page URLs" + }, + { + "value": "page_title", + "name": "Page Titles" + } + ] + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "": { + "properties": { + "value": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object", + "additionalProperties": true + } + }, + "example": [ + { + "value": "page_url", + "name": "Page URLs" + }, + { + "value": "page_title", + "name": "Page Titles" + } + ] + }, + "application\/vnd.ms-excel": { + "example": "value name\npage_url Page URLs\npage_title Page Titles" + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "401": { + "$ref": "#\/components\/responses\/Unauthorized" + }, + "403": { + "$ref": "#\/components\/responses\/Forbidden" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + }, + "500": { + "$ref": "#\/components\/responses\/ServerError" + }, + "default": { + "$ref": "#\/components\/responses\/DefaultError" + } + } + } + } + }, + "components": { + "schemas": { + "GenericSuccess": { + "description": "Generic Matomo success payload.", + "required": [ + "result", + "message" + ], + "properties": { + "result": { + "type": "string", + "enum": [ + "success" + ], + "example": "success" + }, + "message": { + "type": "string", + "example": "ok" + }, + "code": { + "type": "integer", + "example": "200" + } + }, + "type": "object", + "additionalProperties": true + }, + "Error": { + "description": "Generic Matomo error payload.", + "required": [ + "result", + "message" + ], + "properties": { + "result": { + "type": "string", + "enum": [ + "error" + ], + "example": "error" + }, + "message": { + "type": "string", + "example": "There was an error" + }, + "code": { + "type": "integer" + } + }, + "type": "object", + "additionalProperties": true + }, + "ErrorXml": { + "description": "Generic Matomo error payload in XML.", + "properties": { + "error": { + "properties": { + "message": { + "type": "string", + "xml": { + "attribute": true + }, + "example": "There was an error" + } + }, + "type": "object", + "xml": { + "name": "error" + } + } + }, + "type": "object", + "xml": { + "name": "result" + } + } + }, + "responses": { + "BadRequest": { + "description": "Bad request (validation or missing parameters).", + "content": { + "text\/plain": { + "schema": { + "type": "string" + }, + "example": "Error: There was an error." + }, + "text\/html": { + "schema": { + "type": "string" + }, + "example": "There was an error." + }, + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/Error" + } + }, + "application\/xml": { + "schema": { + "$ref": "#\/components\/schemas\/ErrorXml" + } + } + } + }, + "Unauthorized": { + "description": "Authentication failed or missing token.", + "content": { + "text\/plain": { + "schema": { + "type": "string" + }, + "example": "Error: You must be logged in to access this functionality." + }, + "text\/html": { + "schema": { + "type": "string" + }, + "example": "You must be logged in to access this functionality." + }, + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/Error" + } + }, + "application\/xml": { + "schema": { + "$ref": "#\/components\/schemas\/ErrorXml" + } + } + } + }, + "Forbidden": { + "description": "Authenticated but not allowed to access the resource.", + "content": { + "text\/plain": { + "schema": { + "type": "string" + }, + "example": "Error: Not authorised." + }, + "text\/html": { + "schema": { + "type": "string" + }, + "example": "Not authorised." + }, + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/Error" + } + }, + "application\/xml": { + "schema": { + "$ref": "#\/components\/schemas\/ErrorXml" + } + } + } + }, + "NotFound": { + "description": "Resource not found.", + "content": { + "text\/plain": { + "schema": { + "type": "string" + }, + "example": "Error: The method is not available." + }, + "text\/html": { + "schema": { + "type": "string" + }, + "example": "The method is not available." + }, + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/Error" + } + }, + "application\/xml": { + "schema": { + "$ref": "#\/components\/schemas\/ErrorXml" + } + } + } + }, + "ServerError": { + "description": "Unexpected server error.", + "content": { + "text\/plain": { + "schema": { + "type": "string" + }, + "example": "Error: There was an error." + }, + "text\/html": { + "schema": { + "type": "string" + }, + "example": "There was an error." + }, + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/Error" + } + }, + "application\/xml": { + "schema": { + "$ref": "#\/components\/schemas\/ErrorXml" + } + } + } + }, + "DefaultError": { + "description": "Default error response (any non-2xx).", + "content": { + "text\/plain": { + "schema": { + "type": "string" + }, + "example": "Error: There was an error." + }, + "text\/html": { + "schema": { + "type": "string" + }, + "example": "There was an error." + }, + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/Error" + } + }, + "application\/xml": { + "schema": { + "$ref": "#\/components\/schemas\/ErrorXml" + } + } + } + }, + "GenericSuccessNoBody": { + "description": "Generic 200 response with no body" + }, + "GenericSuccess": { + "description": "Generic 200 response", + "content": { + "text\/plain": { + "schema": { + "type": "string" + }, + "example": "Result: success" + }, + "text\/html": { + "schema": { + "type": "string" + }, + "example": "success" + }, + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/GenericSuccess" + } + }, + "application\/xml": { + "schema": { + "$ref": "#\/components\/schemas\/GenericSuccess" + } + } + } + }, + "GenericString": { + "description": "Generic 200 response with only a string body", + "content": { + "text\/plain": { + "schema": { + "type": "string" + }, + "example": "Result: success" + }, + "text\/html": { + "schema": { + "type": "string" + }, + "example": "success" + }, + "application\/json": { + "schema": { + "type": "string" + } + }, + "application\/xml": { + "schema": { + "type": "string" + } + } + } + }, + "GenericBoolean": { + "description": "Generic 200 response with only true or false as the body", + "content": { + "text\/plain": { + "schema": { + "type": "boolean" + } + }, + "text\/html": { + "schema": { + "type": "boolean" + } + }, + "application\/json": { + "schema": { + "type": "boolean" + } + }, + "application\/xml": { + "schema": { + "type": "boolean" + } + } + } + }, + "GenericInteger": { + "description": "Generic 200 response with only an integer as the body", + "content": { + "text\/plain": { + "schema": { + "type": "integer" + } + }, + "text\/html": { + "schema": { + "type": "integer" + } + }, + "application\/json": { + "schema": { + "type": "integer" + } + }, + "application\/xml": { + "schema": { + "type": "integer" + } + } + } + }, + "GenericArray": { + "description": "Generic 200 response with array body", + "content": { + "text\/plain": { + "schema": { + "type": "string" + } + }, + "text\/html": { + "schema": { + "type": "string" + } + }, + "application\/json": { + "schema": { + "type": "array", + "items": [] + } + }, + "application\/xml": { + "schema": { + "type": "array", + "items": [] + } + } + } + } + }, + "parameters": { + "moduleRequired": { + "name": "module", + "in": "query", + "description": "Always `API` for Reporting API requests.", + "required": true, + "schema": { + "type": "string", + "default": "API" + } + }, + "methodRequired": { + "name": "method", + "in": "query", + "description": "API method, e.g. `VisitsSummary.get` or `CustomAlerts.getAlert`.", + "required": true, + "schema": { + "type": "string", + "example": "CustomAlerts.getAlert" + } + }, + "formatRequired": { + "name": "format", + "in": "query", + "description": "Response format such as `xml` or `json`. Use `original` to get the original PHP data structure.", + "required": true, + "schema": { + "type": "string", + "default": "xml", + "enum": [ + "xml", + "json", + "csv", + "tsv", + "html", + "rss", + "original" + ] + } + }, + "formatOptional": { + "name": "format", + "in": "query", + "description": "Response format. Defaults to `xml`. Use `original` to get the original PHP data structure.", + "required": false, + "schema": { + "type": "string", + "default": "xml", + "enum": [ + "xml", + "json", + "csv", + "tsv", + "html", + "rss", + "original" + ] + } + }, + "idSiteRequired": { + "name": "idSite", + "in": "query", + "description": "Matomo site ID.", + "required": true, + "schema": { + "type": "integer", + "example": 1 + } + }, + "idSiteOptional": { + "name": "idSite", + "in": "query", + "description": "Matomo site ID.", + "required": false, + "schema": { + "type": "integer", + "example": 1 + } + }, + "periodRequired": { + "name": "period", + "in": "query", + "description": "Reporting period.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "day", + "week", + "month", + "year", + "range" + ], + "example": "day" + } + }, + "periodOptional": { + "name": "period", + "in": "query", + "description": "Reporting period.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "day", + "week", + "month", + "year", + "range" + ], + "example": "day" + } + }, + "dateRequired": { + "name": "date", + "in": "query", + "description": "Date or range (e.g. `2025-08-01`, `yesterday`, `last30`, or `2025-08-01,2025-08-11`).", + "required": true, + "schema": { + "type": "string", + "example": "today" + } + }, + "dateOptional": { + "name": "date", + "in": "query", + "description": "Date or range (e.g. `2025-08-01`, `yesterday`, `last30`, or `2025-08-01,2025-08-11`).", + "required": false, + "schema": { + "type": "string", + "example": "today" + } + }, + "segmentRequired": { + "name": "segment", + "in": "query", + "description": "Segment expression; see `API.getSegmentDimensionMetadata`.", + "required": true, + "schema": { + "type": "string" + } + }, + "segmentOptional": { + "name": "segment", + "in": "query", + "description": "Segment expression; see `API.getSegmentDimensionMetadata`.", + "required": false, + "schema": { + "type": "string" + } + }, + "expandedOptional": { + "name": "expanded", + "in": "query", + "description": "If true, loads all subtables.", + "required": false, + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ], + "example": 0 + } + }, + "idSubtableOptional": { + "name": "idSubtable", + "in": "query", + "description": "An in-database subtable ID.", + "required": false, + "schema": { + "type": "integer" + } + }, + "flatOptional": { + "name": "flat", + "in": "query", + "description": "Flatten subtables into the parent table.", + "required": false, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ], + "example": 0 + } + }, + "filter_patternOptional": { + "name": "filter_pattern", + "in": "query", + "description": "Regex to keep matching rows.", + "required": false, + "schema": { + "type": "string" + } + }, + "filter_columnOptional": { + "name": "filter_column", + "in": "query", + "description": "Column to apply the regex to (e.g., `label`).", + "required": false, + "schema": { + "type": "string", + "example": "label" + } + }, + "filter_pattern_recursiveOptional": { + "name": "filter_pattern_recursive", + "in": "query", + "description": "Recursive regex filter.", + "required": false, + "schema": { + "type": "string" + } + }, + "filter_column_recursiveOptional": { + "name": "filter_column_recursive", + "in": "query", + "description": "Column for the recursive regex filter.", + "required": false, + "schema": { + "type": "string" + } + }, + "filter_excludelowpopOptional": { + "name": "filter_excludelowpop", + "in": "query", + "description": "Column to threshold and exclude low values.", + "required": false, + "schema": { + "type": "string" + } + }, + "filter_excludelowpop_valueOptional": { + "name": "filter_excludelowpop_value", + "in": "query", + "description": "Minimum value threshold for `filter_excludelowpop`.", + "required": false, + "schema": { + "type": "number", + "example": 0 + } + }, + "filter_sort_columnOptional": { + "name": "filter_sort_column", + "in": "query", + "description": "Column to sort by.", + "required": false, + "schema": { + "type": "string" + } + }, + "filter_sort_orderOptional": { + "name": "filter_sort_order", + "in": "query", + "description": "Sort direction.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "example": "desc" + } + }, + "filter_truncateOptional": { + "name": "filter_truncate", + "in": "query", + "description": "Row index after which rows are removed.", + "required": false, + "schema": { + "type": "integer" + } + }, + "filter_limitOptional": { + "name": "filter_limit", + "in": "query", + "description": "Maximum number of rows to return.", + "required": false, + "schema": { + "type": "integer" + } + }, + "filter_offsetOptional": { + "name": "filter_offset", + "in": "query", + "description": "Row offset.", + "required": false, + "schema": { + "type": "integer" + } + }, + "keep_summary_rowOptional": { + "name": "keep_summary_row", + "in": "query", + "description": "Keep the summary row.", + "required": false, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ], + "example": 1 + } + }, + "disable_generic_filtersOptional": { + "name": "disable_generic_filters", + "in": "query", + "description": "Disable generic filters (those above).", + "required": false, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ], + "example": 0 + } + }, + "disable_queued_filtersOptional": { + "name": "disable_queued_filters", + "in": "query", + "description": "Skip queued filters.", + "required": false, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ], + "example": 0 + } + }, + "hideColumnsOptional": { + "name": "hideColumns", + "in": "query", + "description": "Comma-separated list of columns to hide.", + "required": false, + "schema": { + "type": "string" + } + }, + "showColumnsOptional": { + "name": "showColumns", + "in": "query", + "description": "Comma-separated list of columns to include.", + "required": false, + "schema": { + "type": "string" + } + }, + "labelOptional": { + "name": "label", + "in": "query", + "description": "Keep only rows with these label(s). Supports path via '>' and arrays.", + "required": false, + "schema": { + "type": "string" + } + }, + "idGoalRequired": { + "name": "idGoal", + "in": "query", + "description": "The ID of a configured goal.", + "required": true, + "schema": { + "type": "integer" + } + }, + "idGoalOptional": { + "name": "idGoal", + "in": "query", + "description": "The ID of a configured goal.", + "required": false, + "schema": { + "type": "integer" + } + } + }, + "securitySchemes": { + "MatomoToken": { + "type": "apiKey", + "description": "Matomo API token passed as the 'token_auth' query parameter.", + "name": "token_auth", + "in": "query" + } + } + }, + "security": [ + { + "MatomoToken": [] + } + ], + "tags": [ + { + "name": "CustomReports", + "description": "The Custom Reports<\/a> API lets you 1) create custom\nreports within Matomo and 2) view the created reports in the Matomo Reporting UI or consume them via the API.\n\nYou can choose between different visualizations (eg table or evolution graph) and combine hundreds of dimensions\nand metrics to get the data you need." + }, + { + "name": "Funnels", + "description": "API for plugin Funnels" + }, + { + "name": "HeatmapSessionRecording", + "description": "API for plugin Heatmap & Session Recording.\n\nWhen you request activity data for a heatmap or a recorded session, please note that any X or Y coordinate,\nscroll reach position, and above the fold is relative and not absolute. X and Y coordinate are between 0 and 2000\nand are relative to the selector where 2000 means the position is at 100% of the element, 1000 means the position\nis at 50% and 0 means the position is actually 0 pixel from the element.\n\nScroll and above the fold positions are between 0 and 1000. If for example a web page is 3000 pixel high, and scroll\nreach is 100, it means the user has seen the content up to 300 pixels (10%, or 100 of 1000).\n\nWe differentiate between two different IDs here:\n* idSiteHsr represents the ID of a heatmap or session recording configuration\n* idLogHsr represents the ID of an actually recorded \/ tracked session or heatmap activity" + }, + { + "name": "UsersFlow", + "description": "API for Users Flow. The API lets you explore details about how your users or visitors navigate through your\nwebsite." + } + ], + "externalDocs": { + "description": "Matomo Reporting API developer page", + "url": "https:\/\/developer.matomo.org\/api-reference\/reporting-api\/" + } +} \ No newline at end of file diff --git a/app/public/css/swagger-ui-overrides.css b/app/public/css/swagger-ui-overrides.css new file mode 100644 index 000000000..59cf18420 --- /dev/null +++ b/app/public/css/swagger-ui-overrides.css @@ -0,0 +1,9 @@ +#swagger-ui { + pre { + background: unset; /* wipe inherited bootstrap style */ + } + + h2, a { + border-bottom: unset; /* wipe inherited bootstrap style */ + } +} diff --git a/app/public/js/swagger-ui-init.js b/app/public/js/swagger-ui-init.js new file mode 100644 index 000000000..d7b3aaca8 --- /dev/null +++ b/app/public/js/swagger-ui-init.js @@ -0,0 +1,103 @@ +(function () { + // JS plugin that extends SwaggerUI filtering to include path and operationId, not just tags + function PathSearchPlugin(system) { + const Im = system && system.Im; + return { + fn: { + opsFilter: function (taggedOps, filter) { + if (!filter || filter === true) return taggedOps; + const queryString = String(filter).toLowerCase(); + return taggedOps + .map(function (tagGroup) { + const tagOperations = tagGroup.get('operations') || Im.List(); + const kept = tagOperations.filter(function (tagOperation) { + const path = String(tagOperation.get('path') || '').toLowerCase(); + const operation = tagOperation.get('operation') || Im.Map(); + const summary = String(operation.get('summary') || '').toLowerCase(); + const description = String(operation.get('description') || '').toLowerCase(); + const operationId = String(operation.get('operationId') || '').toLowerCase(); + const tagsList = operation.get('tags') || Im.List(); + const tags = String(tagsList.join(' ')).toLowerCase(); + return path.indexOf(queryString) > -1 || operationId.indexOf(queryString) > -1 || + summary.indexOf(queryString) > -1 || description.indexOf(queryString) > -1 || + tags.indexOf(queryString) > -1; + }); + return tagGroup.set('operations', kept); + }) + .filter(function (tagGroup) { + const ops = tagGroup.get('operations'); + return ops && ops.size > 0; // remove empty tags entirely + }); + } + } + }; + } + + // Some UX enhancements to the SwaggerUI filter functionality + function setupSwaggerFilterUX() { + // Try a couple selectors to be resilient across minor UI changes + const input = document.querySelector('.filter input[placeholder], input.operation-filter-input'); + if (input) { + // Replace placeholder text with our more accurate text + input.setAttribute('placeholder', 'Search by plugin, path, or description'); + } + + // Auto-expand/collapse tags based on filter value + function setTagsOpen(open) { + // Find all tag headers; clicking toggles open/closed + const headers = document.querySelectorAll('.opblock-tag'); + var i, header, parent, isOpen; + for (i = 0; i < headers.length; i++) { + header = headers[i]; + // parent is usually a .opblock-tag-section; open state marked by .is-open + parent = header && header.parentNode ? header.parentNode : null; + isOpen = parent && parent.className && parent.className.indexOf('is-open') > -1; + + if (open && !isOpen) { + header.click(); + } else if (!open && isOpen) { + header.click(); + } + } + } + + // Debounce helper + function debounce(fn, wait) { + var t; + return function () { + const ctx = this, args = arguments; + clearTimeout(t); + t = setTimeout(function () { + fn.apply(ctx, args); + }, wait); + }; + } + + // Hook filter input + if (input) { + const onChange = debounce(function () { + const val = input.value || ''; + // Expand when there is a query, collapse when cleared + setTagsOpen(val.replace(/\s+/g, '').length > 0); + }, 100); + + // Attach to both 'input' and 'keyup' for older browsers + input.addEventListener ? input.addEventListener('input', onChange, false) : input.attachEvent('onkeyup', onChange); + input.addEventListener ? input.addEventListener('keyup', onChange, false) : input.attachEvent('onkeyup', onChange); + } + } + + // Initialise the SwaggerUI class + SwaggerUIBundle({ + url: "/openapi/spec", + dom_id: "#swagger-ui", + layout: "BaseLayout", + deepLinking: false, + docExpansion: "none", + filter: true, + plugins: [PathSearchPlugin], + onComplete: function () { + setupSwaggerFilterUX(); + } + }); +})(); \ No newline at end of file diff --git a/app/routes/page.php b/app/routes/page.php index ee92ac573..68cd93f5c 100644 --- a/app/routes/page.php +++ b/app/routes/page.php @@ -136,6 +136,49 @@ function renderGuide(Slim\Views\Twig $view, Response $response, Psr\Http\Message return renderGuide($this->get("view"), $response, $request->getUri(), new PhpDoc($matomoTracker, 'PHP-Matomo-Tracker'), new ApiReferenceCategory()); }); +$app->group('/openapi', function (\Slim\Routing\RouteCollectorProxy $group) { + $group->get('/docs', function (Request $request, Response $response, array $args) { + $isEmbedded = $request->getQueryParams()['embedded'] ?? false; + return $this->get('view')->render($response, 'swagger-ui.twig', [ + 'embedded' => !in_array($isEmbedded, ['false', '0']), + ]); + }); + + $group->get('/spec', function (Request $request, Response $response, array $args) { + $format = strtolower($request->getQueryParams()['format'] ?? 'json'); + if ($format !== 'json') { + throw new \Slim\Exception\HttpBadRequestException($request, 'Unsupported response format: ' . $format); + } + + // Load the JSON OpenAPI spec file + $response->getBody()->write(file_get_contents(__DIR__ . '/../openapi/demo_matomo_spec_v1.0.0.json')); + return $response->withHeader('Content-Type', 'application/json') + ->withStatus(200); + }); + + $group->get('/source/{file}', function (Request $request, Response $response, array $args) { + $fileName = $args['file']; + + // Allow only whitelisted source files from the swagger-ui dist/ directory + if (!in_array($fileName, ['swagger-ui.css', 'swagger-ui-bundle.js', 'swagger-ui-standalone-preset.js'])) { + throw new HttpNotFoundException($request); + } + + $fileContent = file_get_contents(__DIR__ . '/../vendor/swagger-api/swagger-ui/dist/' . $fileName); + $response->getBody()->write($fileContent); + $contentType = pathinfo($fileName, PATHINFO_EXTENSION) === 'js' ? 'text/javascript' : 'text/css'; + return $response->withHeader('Content-Type', $contentType) + ->withStatus(200); + }); +})->add(function (Request $request, \Psr\Http\Server\RequestHandlerInterface $handler) { + // Only allow OpenAPI endpoints for Matomo 5 or greater + if (Environment::getPiwikVersion() < 5) { + throw new HttpNotFoundException($request, 'This is only supported in Matomo version 5 or higher.'); + } + + return $handler->handle($request); +}); + $app->get('/api-reference/{reference1}/{reference2}', function (Request $request, Response $response, $args) { try { $guide = new ApiReferenceGuide($args["reference1"] . '/' . $args["reference2"]); diff --git a/app/templates/empty-base.twig b/app/templates/empty-base.twig new file mode 100644 index 000000000..89123cc3a --- /dev/null +++ b/app/templates/empty-base.twig @@ -0,0 +1,3 @@ +{% block content %} + {{ content|raw }} +{% endblock %} diff --git a/app/templates/swagger-ui.twig b/app/templates/swagger-ui.twig new file mode 100644 index 000000000..deb4e1098 --- /dev/null +++ b/app/templates/swagger-ui.twig @@ -0,0 +1,18 @@ +{# Don't extend base template when embedding inside another page #} +{% extends embedded == 0 ? 'base.twig' : 'empty-base.twig' %} + +{% block content %} + +{# Load the stock SwaggerUI CSS #} + +{# Load our custom CSS, mainly to unset some conflicting Boostrap styles inside #swagger-ui div #} + + +
+ +{# Load the stock SwaggerUI JS #} + +{# Load our custom JS to override some behaviour and initialise SwaggerUI #} + + +{% endblock %} \ No newline at end of file diff --git a/docs/5.x/reporting-api.md b/docs/5.x/reporting-api.md index a07a0083d..b2e23a052 100644 --- a/docs/5.x/reporting-api.md +++ b/docs/5.x/reporting-api.md @@ -235,5 +235,9 @@ Here is a list of metrics returned by the API and their definition. All the commonly used terms in Piwik Analytics are documented in the [Glossary](https://glossary.matomo.org) including all metrics and reports. ## API Method List +For a quick reference, see the [list of API methods](https://demo.matomo.cloud/?module=API&action=listAllMethods&prefixUrl=https://demo.matomo.cloud/&idSite=1&date=yesterday). For more detail, see the [OpenAPI documentation](#openapi-documentation). -{@include https://demo.matomo.cloud/?module=API&action=listAllMethods&prefixUrl=https://demo.matomo.cloud/&idSite=1&date=yesterday} +
+# OpenAPI Documentation + +{@include [HTTPS][DOCS_DOMAIN]/openapi/docs?embedded=1}