Extension:External Data

MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
External Data
Release status: stable
Implementation Parser function , Special page
Description Allows for using and displaying values retrieved from various sources: external URLs, local wiki pages and local files (in CSV, JSON, XML and other formats), database tables, and LDAP servers.
Author(s) Yaron Koren, Alex Mashin and others
Latest version 2.4.1 (June 2021)
Compatibility policy Master maintains backward compatibility.
MediaWiki 1.28+
Database changes Yes
License GNU General Public License 2.0 or later
Download See Download and installation
Example A page containing information retrieved from an external CSV file
  • $edgDBTablePrefix
  • $edgExeCommand
  • $edgCacheExpireTime
  • $edgSecrets
  • $edgExeEnvironment
  • $edgExeUrl
  • $edgHTTPOptions
  • $edgAllowSSL
  • $edgExeLimits
  • $edgDBPass
  • $edgDBServer
  • $edgDBServerType
  • $edgDirectoryPath
  • $edgLDAPUser
  • $edgStringReplacements
  • $edgTryEncodings
  • $edgThrottleKey
  • $edgExeUseStaleCache
  • $edgParsers
  • $edgExternalValueVerbose
  • $edgConnectors
  • $edgExeThrottleInterval
  • $edgExeTags
  • $edgExeThrottleKey
  • $edgExeName
  • $edgExeVersionCommand
  • $edgExeCacheSeconds
  • $edgExeTempFile
  • $edgExeVersion
  • $edgDBFlags
  • $edgDBPrepared
  • $edgLDAPPass
  • $edgDBUser
  • $edgExePreprocess
  • $edgDBDirectory
  • $edgExeIgnoreWarnings
  • $edgThrottleInterval
  • $edgDBName
  • $edgAlwaysAllowStaleCache
  • $edgExeInput
  • $edgExeParamFilters
  • $edgExeParams
  • $edgExePostprocess
  • $edgLDAPServer
  • $edgFilePath
  • $edgDBTypes
  • $edgLDAPBaseDN

Check usage and version matrix.

Issues Open tasks · Report a bug

The External Data extension allows MediaWiki pages to retrieve, filter, and format structured data from one or more sources. These sources can include external URLs, regular wiki pages, uploaded files, files on the local server, databases and LDAP directories.

The extension defines the following Parser functions :

  • #get_web_data - retrieves CSV, GFF, JSON, XML, HTML or free-form data from a URL and assigns it to variables that can be accessed on the page.
  • #get_soap_data - retrieves data from a URL via the SOAP protocol.
  • #get_file_data - retrieves data from a file on the local server, in the same formats as #get_web_data.
  • #get_db_data - retrieves data from a database.
  • #get_ldap_data - retrieves data from an LDAP server.
  • #get_program_data - retrieves data returned by a program run server-side.
  • #external_value - displays the value of any such variable.
  • #for_external_table - cycles through all the values retrieved for a set of variables, displaying the same "container" text for each one.
  • #store_external_table - cycles through a table of values, storing them as semantic data via the Semantic MediaWiki extension, by mimicking a call to SMW's #subobject function for each row.
  • #display_external_table - cycles through all the values retrieved for a set of variables, displaying each "row" using a template.
  • #clear_external_data - erases the current set of retrieved data.

It also defines the following Lua functions:

  • mw.ext.externalData.getWebData
  • mw.ext.externalData.getFileData
  • mw.ext.externalData.getDbData
  • mw.ext.externalData.getSoapData
  • mw.ext.externalData.getLdapData
  • mw.ext.externalData.getProgramData

In tag emulation mode, it can define additional parser tags, if configured by the webmaster in the $edgExeTags setting.

This version of the External Data extension requires MediaWiki 1.28+.

Click through the pages in the navigation bar above to learn more about External Data, how it works, how to use it, and how to install it.