Download the PHP package hauerheinrich/typo3_monitor_api without Composer

On this page you can find all versions of the php package hauerheinrich/typo3_monitor_api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package typo3_monitor_api

typo3_monitor_api

typo3_monitor_api is a TYPO3 extension. Inspired by zabbix_monitor extension created by (and thanks to) Sven Wappler. typo3_monitor_api extension don't uses zabbix at all and it is not compatible with the zabbix system!

Installation

... like any other TYPO3 extension extensions.typo3.org No TypoScript or PageTs required.

Setup a backend-user (username and password), this user don't need and shouldn't have any rights!!

Usage

domain.tld/typo3-monitor-api/v1/{METHOD} Parameters are sent as JSON object in the request body or as query string.

Request

Basic Auth via the Authorization header (HTTPS only) - UserName and UserPassword are from a backend user. The API never sends a WWW-Authenticate challenge, so browsers don't show a login dialog.

Parameters as JSON object in the body, e.g. for method "GetExtensionVersion":

or as query string (booleans as 1/0/true/false):

The previous format [{"extensionKey": "news"}] is still accepted. Allowed parameters, their types and required parameters per operation: see Configuration/MonitorOperations.php or call GetAllowedOperations.

Response

format: json Every response has at least "status", "value" and "message". Looks like (domain.tld/typo3-monitor-api/v1/GetPHPVersion):

Errors have the same format ("status": false and the reason in "message"):

Status Meaning
200 Operation executed (check status for the operation's own result)
400 Invalid JSON, unknown parameter, wrong type or missing required parameter
401 Wrong credentials (only with debugOutput, otherwise the site's 404 page)
403 Operation not enabled globally or not for this user
404 Unknown operation
405 Wrong HTTP method (see Allow header)
429 Too many failed logins (only with debugOutput)
500 Exception inside the operation, details in the TYPO3 log

Methods

get all available methods: domain.tld/typo3-monitor-api/v1/GetAllowedOperations small list:

Adding an operation

  1. Create a class in Classes/Operation/ implementing IOperation:

    Only inject TYPO3 core services. Classes of optional extensions (install, extensionmanager, scheduler, ...) have to be fetched inside execute() with GeneralUtility::makeInstance() after checking ExtensionManagementUtility::isLoaded(), otherwise the DI container can't be built without that extension.

  2. Add it to Configuration/MonitorOperations.php (HTTP method, parameters, required parameters).
  3. Flush the caches. The operation appears in the extension configuration and in the backend user record.

Permissions per user

  1. Create a backend user without any other rights. Use a long, randomly generated password.
  2. Backend user record, tab "Monitor API":
    • "allowed operations": tick the operations this user may call.
    • "allowed IPs" (optional): restricts this user to these IPs (in addition to the global setting). No backend group is needed.

An operation is only callable if it is enabled globally in the extension configuration and ticked in the user record. Users without any API permission are rejected like a wrong password.

Extension configuration / settings

Upgrade notes (security release)

TODO:

Troubleshooting

.htaccess

SetEnvIf Authorization "(.)" HTTP_AUTHORIZATION=$1 or RewriteEngine On RewriteRule . - [e=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

API Request Error


All versions of typo3_monitor_api with dependencies

PHP Build Version
Package Version
Requires typo3/cms-core Version ^13.4.0 || ^14.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hauerheinrich/typo3_monitor_api contains the following files

Loading the files please wait ...