No project description provided
Project description
Readme
This is a very simple and limited cli tool for Matomo API requests.
Very limited support for anything in general. This was created as a need for a Prometheus exporter for Matomo, and we needed a base to do the calls to Matomo. Hopefully it could be used and developed together with the community.
Environment variables
Many options could be replaced with environment variables.
Environment Variable | Description | Default |
---|---|---|
MATOMO_URL | URL to Matomo instance | - |
MATOMO_TOKEN | Access token for Matomo | - |
MATOMO_ID_SITE | Site ID | 1 |
MATOMO_ID_SITES | Comma separated id's | - |
MATOMO_PERIOD | Period (day, week etc) | day |
MATOMO_DATE | today, yesterday, 2024-10-02 etc. | - |
MATOMO_FORMAT | json, xml or tsv. | tsv |
Usage
export MATOMO_URL=https://mymatomo.instance/index.php
export MATOMO_TOKEN=DHJSHGUAGU8383
matomo api --method MultiSites.getAll --period month --date 2024-08-20 --show_columns nb_actions
The method you provide is the API call the tool will do (see your Matomo installation on what API:s you could use)
Installation
pipx install git+https://github.com/Digitalist-Open-Cloud/Matomo-CLI.git
Known supported API methods
The Matomo API has many methods, and could be extended with plugins, here is a list of methods we know this tool is supporting. Please note, that for now, some methods only works well with json and xml output. And for all them, not all possible options is available in the tool yet.
Method |
---|
ActivityLog.getEntries |
API.getMatomoVersion |
API.getPhpVersion |
API.getIpFromHeader |
API.getSettings |
MultiSites.getAll |
PagePerformance.get |
SitesManager.addSite |
SitesManager.deleteSite |
SitesManager.getJavascriptTag |
Etc. |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file matomo_cli-0.1.1.tar.gz
.
File metadata
- Download URL: matomo_cli-0.1.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bf20a9eff544e64acae79df1269b9a811ec1222ec4bfac1fce231c2e6cc78d2 |
|
MD5 | c5602f1cef748a91f9fca98567a77484 |
|
BLAKE2b-256 | 350a3ed4736531c4aaa70b0af1bc29d6e14ec91b9a3b72aa4e02097aa6fd677a |
File details
Details for the file matomo_cli-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: matomo_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd3ca0bbe4b50832a4e6c5e2c71721f4834db8a15bf20cbd1f6f6aa96a360dc1 |
|
MD5 | 72ef22ef05f6e85b9e5c4b2ad9f481ff |
|
BLAKE2b-256 | d811f6b480bf884fc90c25d1265c647293f77b36b457fa2e00a266b581e929e6 |