{"openapi":"3.1.0","info":{"title":"Matomo Reporting API for API plugin","version":"1.0.0"},"servers":[{"url":"https:\/\/demo-proxy.innocraft.cloud\/","description":"Current Matomo instance"}],"paths":{"\/index.php?module=API&method=API.getMatomoVersion":{"get":{"tags":["API"],"description":"Returns the current Matomo version.","operationId":"API.getMatomoVersion","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"}],"responses":{"200":{"description":"Matomo's version string.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"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=API.getPhpVersion":{"get":{"tags":["API"],"description":"Returns information about the PHP runtime version.","operationId":"API.getPhpVersion","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"}],"responses":{"200":{"$ref":"#\/components\/responses\/GenericArray"},"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=API.getIpFromHeader":{"get":{"tags":["API"],"description":"Returns the most accurate IP address available for the current user, in IPv4 format. This could be the proxy client's IP address.","operationId":"API.getIpFromHeader","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"}],"responses":{"200":{"description":"IP address in presentation format.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"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=API.getSegmentsMetadata":{"get":{"tags":["API"],"description":"Returns metadata for all available segments.","operationId":"API.getSegmentsMetadata","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSites","in":"query","description":"One or more site IDs. If empty, returns metadata visible to the current user.","required":false,"schema":{"oneOf":[{"type":"array","items":{"type":"integer"},"default":[]},{"type":"integer"},{"type":"string","default":"[]"}]}},{"name":"_hideImplementationData","in":"query","description":"Whether internal implementation details should be omitted.","required":false,"schema":{"type":"boolean","default":true}},{"name":"_showAllSegments","in":"query","description":"Whether to include segments that are normally hidden.","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[]}},"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=API.getMetadata":{"get":{"tags":["API"],"description":"Returns metadata for a specific API method.","operationId":"API.getMetadata","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Site ID to use when loading metadata.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}},{"name":"apiModule","in":"query","description":"API module name.","required":true,"schema":{"type":"string","example":"VisitsSummary"}},{"name":"apiAction","in":"query","description":"API method name without the module prefix.","required":true,"schema":{"type":"string","example":"get"}},{"name":"apiParameters","in":"query","description":"Additional API parameters used to resolve metadata variants.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]}},{"name":"language","in":"query","description":"Optional language code used to localize the response.","required":false,"schema":{"type":"string"}},{"name":"period","in":"query","description":"Optional period used to resolve period-dependent metadata.","required":false,"schema":{"type":"string"}},{"name":"date","in":"query","description":"Optional date or date range used to resolve metadata.","required":false,"schema":{"type":"string"}},{"name":"hideMetricsDoc","in":"query","description":"Whether metric documentation should be omitted.","required":false,"schema":{"type":"boolean","default":false}},{"name":"showSubtableReports","in":"query","description":"Whether subtable reports should be included.","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[]}},"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=API.getReportMetadata":{"get":{"tags":["API"],"description":"Returns metadata for all available reports.","operationId":"API.getReportMetadata","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSites","in":"query","description":"Deprecated fallback for specifying one or more site IDs.","required":false,"schema":{"oneOf":[{"type":"array","items":{"type":"integer"}},{"type":"integer"},{"type":"string","default":""}]}},{"name":"period","in":"query","description":"Optional period used to resolve report metadata.","required":false,"schema":{"type":"string"}},{"name":"date","in":"query","description":"Optional date or date range used to resolve report metadata.","required":false,"schema":{"type":"string"}},{"name":"hideMetricsDoc","in":"query","description":"Whether metric documentation should be omitted.","required":false,"schema":{"type":"boolean","default":false}},{"name":"showSubtableReports","in":"query","description":"Whether subtable reports should be included.","required":false,"schema":{"type":"boolean","default":false}},{"name":"idSite","in":"query","description":"Preferred site ID parameter.","required":false,"schema":{"oneOf":[{"type":"integer"},{"type":"string"}]}}],"responses":{"200":{"description":"OK\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[]}},"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=API.getProcessedReport":{"get":{"tags":["API"],"description":"Returns a processed report with metadata, formatting, and processed metrics applied.","operationId":"API.getProcessedReport","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Site ID to query.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}},{"name":"period","in":"query","description":"Report period.","required":true,"schema":{"type":"string","example":"day"}},{"name":"date","in":"query","description":"Date or date range to query.","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"apiModule","in":"query","description":"API module name.","required":true,"schema":{"type":"string","example":"VisitsSummary"}},{"name":"apiAction","in":"query","description":"API method name without the module prefix.","required":true,"schema":{"type":"string","example":"get"}},{"name":"segment","in":"query","description":"Optional segment expression.","required":false,"schema":{"type":"string"}},{"name":"apiParameters","in":"query","description":"Additional API parameters forwarded to the target report.","required":false,"schema":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]}},{"name":"idGoal","in":"query","description":"Optional goal ID.","required":false,"schema":{"oneOf":[{"type":"integer"},{"type":"string"}]}},{"name":"language","in":"query","description":"Optional language code for the response.","required":false,"schema":{"type":"string"}},{"name":"showTimer","in":"query","description":"Whether processing time information should be included.","required":false,"schema":{"type":"boolean","default":true}},{"name":"hideMetricsDoc","in":"query","description":"Whether metric documentation should be omitted.","required":false,"schema":{"type":"boolean","default":false}},{"name":"idSubtable","in":"query","description":"Optional subtable ID to load.","required":false,"schema":{"oneOf":[{"type":"integer"},{"type":"string"}]}},{"name":"showRawMetrics","in":"query","description":"Whether raw metrics should be included alongside formatted metrics.","required":false,"schema":{"type":"boolean","default":false}},{"name":"format_metrics","in":"query","description":"Optional metrics formatting mode.","required":false,"schema":{"type":"string"}},{"name":"idDimension","in":"query","description":"Optional dimension ID.","required":false,"schema":{"oneOf":[{"type":"integer"},{"type":"string"}]}}],"responses":{"200":{"description":"OK\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[]}},"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=API.getReportPagesMetadata":{"get":{"tags":["API"],"description":"Returns page metadata for the Matomo UI, including the widgets shown on each page.","operationId":"API.getReportPagesMetadata","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Site ID used for the access check.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}}],"responses":{"200":{"description":"OK\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[]}},"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=API.getWidgetMetadata":{"get":{"tags":["API"],"description":"Returns metadata for all widgets that can be displayed in the UI.","operationId":"API.getWidgetMetadata","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Site ID used for the access check.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}}],"responses":{"200":{"description":"OK\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[]}},"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=API.get":{"get":{"tags":["API"],"description":"Returns a combined report built from the `*.get` API methods of other plugins.","operationId":"API.get","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Site ID to query.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}},{"name":"period","in":"query","description":"Report period.","required":true,"schema":{"type":"string","example":"day"}},{"name":"date","in":"query","description":"Date or date range to query.","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Optional segment expression.","required":false,"schema":{"type":"string"}},{"name":"columns","in":"query","description":"Optional metric names to keep in the combined result.","required":false,"schema":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]}}],"responses":{"200":{"description":"OK\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"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=API.getRowEvolution":{"get":{"tags":["API"],"description":"Returns an evolution series for a specific report row or metric label.","operationId":"API.getRowEvolution","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Site ID to query.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}},{"name":"period","in":"query","description":"Period to calculate the evolution for.","required":true,"schema":{"type":"string","example":"day"}},{"name":"date","in":"query","description":"Date or date range to query.","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"apiModule","in":"query","description":"API module name.","required":true,"schema":{"type":"string","example":"VisitsSummary"}},{"name":"apiAction","in":"query","description":"API method name without the module prefix.","required":true,"schema":{"type":"string","example":"get"}},{"name":"label","in":"query","description":"Optional row label to track.","required":false,"schema":{"type":"string"}},{"name":"segment","in":"query","description":"Optional segment expression.","required":false,"schema":{"type":"string"}},{"name":"column","in":"query","description":"Optional metric column to use.","required":false,"schema":{"type":"string"}},{"name":"language","in":"query","description":"Optional language code for the response.","required":false,"schema":{"type":"string"}},{"name":"idGoal","in":"query","description":"Optional goal ID.","required":false,"schema":{"oneOf":[{"type":"integer"},{"type":"string"}]}},{"name":"legendAppendMetric","in":"query","description":"Whether to append the metric name to the legend.","required":false,"schema":{"type":"string"}},{"name":"labelUseAbsoluteUrl","in":"query","description":"Whether labels that are URLs should be normalized to absolute URLs.","required":false,"schema":{"type":"string"}},{"name":"idDimension","in":"query","description":"Optional dimension ID.","required":false,"schema":{"oneOf":[{"type":"integer"},{"type":"string"}]}},{"name":"labelSeries","in":"query","description":"Optional custom series label.","required":false,"schema":{"type":"string"}},{"name":"showGoalMetricsForGoal","in":"query","description":"Optional goal ID whose goal metrics should be included.","required":false,"schema":{"oneOf":[{"type":"integer"},{"type":"string"}]}}],"responses":{"200":{"description":"OK\n\nExample responses require Super User access. Use Try it out to see a live response."},"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=API.getBulkRequest":{"get":{"tags":["API"],"description":"Performs multiple API requests at once and returns every result.","operationId":"API.getBulkRequest","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"urls","in":"query","description":"API query strings to execute.","required":true,"schema":{"type":"array","items":{"type":"string"},"example":["https:\\\/\\\/example.org","https:\\\/\\\/example.org\\\/pricing"]}}],"responses":{"200":{"description":"OK\n\nExample responses require Super User access. Use Try it out to see a live response."},"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=API.isPluginActivated":{"get":{"tags":["API"],"description":"Returns whether a plugin is currently activated.","operationId":"API.isPluginActivated","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"pluginName","in":"query","description":"Plugin name to check.","required":true,"schema":{"type":"string","example":"Goals"}}],"responses":{"200":{"description":"OK\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"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=API.getSuggestedValuesForSegment":{"get":{"tags":["API"],"description":"Returns suggested values for a segment based on recent data or a segment-specific callback.","operationId":"API.getSuggestedValuesForSegment","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"segmentName","in":"query","description":"Segment name to suggest values for.","required":true,"schema":{"type":"string","example":"New Zealand visitors"}},{"name":"idSite","in":"query","description":"Site ID to query, or `'all'` for all sites where supported.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}}],"responses":{"200":{"description":"OK\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"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=API.getPagesComparisonsDisabledFor":{"get":{"tags":["API"],"description":"Returns category\/subcategory pairs as \"CategoryId.SubcategoryId\" for whom comparison features should be disabled.","operationId":"API.getPagesComparisonsDisabledFor","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"}],"responses":{"200":{"description":"OK\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"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=API.getGlossaryReports":{"get":{"tags":["API"],"description":"Returns glossary entries for all reports.","operationId":"API.getGlossaryReports","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Site ID used for the access check.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}}],"responses":{"200":{"description":"OK\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"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=API.getGlossaryMetrics":{"get":{"tags":["API"],"description":"Returns glossary entries for all metrics.","operationId":"API.getGlossaryMetrics","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Site ID used for the access check.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}}],"responses":{"200":{"description":"OK\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"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","example":"success"},"message":{"type":"string","example":"ok"},"code":{"type":"integer","example":"200"}},"type":"object","example":{"result":"success","message":"ok"},"additionalProperties":true},"GenericSuccessXml":{"description":"Generic Matomo success payload in XML.","required":["success"],"properties":{"success":{"properties":{"message":{"type":"string","xml":{"attribute":true},"example":"ok"}},"type":"object","xml":{"name":"success"}}},"type":"object","xml":{"name":"result"},"example":{"success":{"message":"ok"}},"additionalProperties":true},"Error":{"description":"Generic Matomo error payload.","required":["result","message"],"properties":{"result":{"type":"string","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":"Success:ok"},"text\/html":{"schema":{"type":"string"},"example":""},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/GenericSuccess"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/GenericSuccessXml"}}}},"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"}},"idSubtableRequired":{"name":"idSubtable","in":"query","description":"An in-database subtable ID.","required":true,"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":"http","description":"Paste your token generated from Personal > Security. Swagger will send it as a Bearer token.","scheme":"bearer"}}},"security":[{"MatomoToken":[]}],"tags":[{"name":"API","description":"This API is the Metadata API<\/a>: it gives information about all other available APIs methods, as well as providing human readable and more complete outputs than normal API methods. Some of the information that is returned by the Metadata API: