Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Matomo platform, our public APIs, and maintaining backward compatibility #8125

Closed
mattab opened this issue Jun 17, 2015 · 2 comments
Closed
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. RFC Indicates the issue is a request for comments where the author is looking for feedback.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Jun 17, 2015

In this issue we shall describe what parts of the Piwik platform are publicly available for other developers to use. The goal of this issue ideally is to create a guide or page (likely on developer.piwik.org) to document this knowledge.

Up to date list of API's is now managed on our developer website. Please check there for an up to date list

https://developer.matomo.org/guides/apis

Our public APIs

We call these "Public APIs" but this term can be a bit confusing as it includes more than just APIs.

Everything below is considered a public API:

  • Reporting HTTP API.
    • They are defined in API.php files and APIs are called over HTTP.
    • API endpoint index.php, URL structure ?module=API&method=X.Y&format=..., method names and parameter names are part of the API.
  • Tracking HTTP API
    • API endpoint piwik.php, parameter names are part of the API.
  • HTTP Status code for Reporting and Tracking APIs are API
  • Events
    • Event names, and parameter list are API.
  • Classes and Methods
    • They are tagged with @api in our sourcecode. (these docs are automatically generated on each commit.)
  • A few console commands are API (the command name and parameter names should not change)
    • so far we only consider public APIs these commands: core:archive, core:update, plugin:activate, plugin:deactivate, git:pull, development:enable, development:disable, customvariables:set-max-custom-variables.
    • some of these commands are setup in crontabs and we shouldn't break them.
  • JavaScript variables in global piwik.* object
  • LESS variables used for Theming
  • INI Config settings names in config/global.ini.php are API
    • we should not rename INI config settings as users may have overridden them in config/config.ini.php
  • Widgets embed URLs are API
  • Some tools bundled with Piwik are considered API in the sense that their paths should not change:
    • libs/PiwikTracker/PiwikTracker.php <- tracker API client directly used from this path (as we advise in our doc)
    • misc/log-analytics/import_logs.py <- Log Analytics script
    • piwik.js is the minified JavaScript tracking client referenced in Tracking code in users' websites
    • alternatively /js/ endpoint is sometimes used to serve the minified file ensuring caching of the file in browsers.

Some other parts are sometimes considered public APIs but it is not a hard rule:

  • Translation keys, especially generic ones such as General_* and CoreHome_* keys, are part of the API and should not change.

Deprecations and changes to any of these public APIs will be documented in the developer changelog #8127

@mattab mattab added the RFC Indicates the issue is a request for comments where the author is looking for feedback. label Jun 17, 2015
@mattab mattab added this to the 3.0.0 milestone Jul 15, 2015
@mattab mattab modified the milestones: 3.0.0, 2.16.x Feb 8, 2016
@mattab mattab modified the milestones: 3.0.0, 2.16.x (LTS) Apr 1, 2016
@mattab mattab added the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Apr 1, 2016
@mattab mattab changed the title The Piwik platform, our public APIs, and maintaining backward compatibility The Matomo platform, our public APIs, and maintaining backward compatibility Mar 28, 2019
@tsteur
Copy link
Member

tsteur commented Jan 27, 2020

Closing this as it has not much value being open and rather is confusing looking at it repeatedly.

@tsteur tsteur closed this as completed Jan 27, 2020
@tsteur tsteur added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Jan 27, 2020
@tsteur
Copy link
Member

tsteur commented Mar 17, 2021

this is now documented in https://developer.matomo.org/guides/apis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. RFC Indicates the issue is a request for comments where the author is looking for feedback.
Projects
None yet
Development

No branches or pull requests

2 participants