Erweiterung:ApiFeatureUsage

From mediawiki.org
This page is a translated version of the page Extension:ApiFeatureUsage and the translation is 49% complete.
MediaWiki-Erweiterungen
ApiFeatureUsage
Freigabestatus: stabil
Einbindung Spezialseite , API
Beschreibung Access API feature usage log summaries
Autor(en) Brad Jorsch (AnomieDiskussion)
Letzte Version 1.0 (2016-12-07)
Kompatibilitätspolitik Snapshots werden zusammen mit MediaWiki veröffentlicht. Der Master ist nicht abwärtskompatibel.
MediaWiki 1.25+
PHP 5.5.9+
Datenbankänderungen Nein
Lizenz GNU General Public License 2.0 oder neuer
Herunterladen
  • $wgApiFeatureUsageQueryEngineConf
Quarterly downloads 15 (Ranked 129th)
Public wikis using 847 (Ranked 303rd)
Übersetze die ApiFeatureUsage-Erweiterung
Probleme Offene Aufgaben · Einen Fehler melden

The ApiFeatureUsage extension adds a special page and an API module to fetch summaries of data logged by ApiBase::logFeatureUsage(), which is typically an indication of use of deprecated API features.

Abhängigkeiten

Log data must be added to some sort of storage system. Currently Elasticsearch is supported via Erweiterung:Elastica .

Installation

  • Die Erweiterung herunterladen und die Datei(en) in ein Verzeichnis namens ApiFeatureUsage im Ordner extensions/ ablegen.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage
  • Folgenden Code am Ende deiner LocalSettings.php -Datei einfügen:
    wfLoadExtension( 'ApiFeatureUsage' );
    
  • Yes Erledigt – Zu Special:Version in dem Wiki (bei Einstellung auf deutsch nach Spezial:Version) navigieren, um die erfolgreiche Installierung der Erweiterung zu überprüfen.

Konfiguration

Parameter
Name Description
$wgApiFeatureUsageQueryEngineConf Configuration array for accessing the log storage backend.
class
Backend access class to instantiate. Entweder dies oder factory ist notwendig.
factory
PHP callable which must return an instance of a backend access class. Entweder dies oder class ist notwendig.
Elastica backend (ApiFeatureUsageQueryEngineElastica)

Additional configuration values in $wgApiFeatureUsageQueryEngineConf:

serverList
Array of Elasticsearch servers. Notwendig.
maxConnectionAttempts
Maximum connection attempts, default 1.
indexPrefix
Prefix for the indexes to use. Standard ist "apifeatureusage-".
indexFormat
Date formatting for the indexes to use, see the PHP manual. Standard ist "Y.m.d".
type
Elasticsearch type to query. Standard ist "api-feature-usage-sanitized".
featureField
Field name for the logged value of $feature. Standard ist "feature".
timestampField
Field name for the logged timestamp. Standard ist "@timestamp".
agentField
Field name for the logged user agent. Standard ist "agent".

Verwendung

The extension adds a new special page, Special:ApiFeatureUsage, with a simple form to request a summary of feature usage logs for a user agent and date range.

The extension also adds an API query submodule, meta=featureusage. Siehe die automatisch generierte API-Dokumentation für Details.

Siehe auch