API:Filerepoinfo
| This page is part of the MediaWiki action API documentation. |
MediaWiki action API
- Introduction and quick start
- FAQ
- Formats
- Error reporting
- Restricting usage
- Cross-site requests
- Authentication
- Queries
- Searching (by title, content, coordinates...)
- Parsing wikitext and expanding templates
- Purging pages' caches
- Parameter information
- Changing wiki content
- Create and edit pages
- Move pages
- Merge pages
- Rollback
- Delete pages
- Restore deleted revisions
- (Un)protect pages
- (Un)block users
- (Un)watch pages
- Mark revisions of watched pages as visited
- Send email
- Patrol changes
- Import pages
- Change user group membership
- Upload files
- User options
- Tokens
- Page language
- More...
- Watchlist feed
- Wikidata
- Extensions
- Using the API in MediaWiki and extensions
- Miscellaneous
- Implementation
- Client code
- Asserting
| Filerepoinfo | ||
|---|---|---|
| Return meta information about image repositories configured on the wiki. This module cannot be used as a Generator. |
||
| Prefix | fri | |
| Required rights | none | |
| Post only? | No | |
| Generated help | Current | |
| Version added |
|
|
Return meta information about image repositories configured on the wiki.
Parameters[edit]
friprop: Which repository properties to get. Possible values:name,displayname,rootUrl, andlocalwill be present for all repositories.apiurlshould be present for all foreign API repositories. All other values are optional. Repositories can also define their own custom properties, which can be seen via the api help. (Default: All available values.)name: The key of the repository - used in e.g. $wgForeignFileRepos and imageinfo return values.displayname: The human-readable name of the repository wiki.rootUrl: Root URL for image paths.local: Whether that repository is the local one or not.apiurl: URL to the repository API - helpful for getting image info from the host. (missing in MW 1.25)urlthumbUrlinitialCapitaldescBaseUrlscriptDirUrlarticleUrlfetchDescriptiondescriptionCacheExpiryscriptExtensionfavicon
Example[edit]
| Result |
|---|
<?xml version="1.0"?>
<api>
<warnings>
<filerepoinfo xml:space="preserve">Unrecognized value for parameter 'friprop': apiurl</filerepoinfo>
</warnings>
<query>
<repos>
<repo name="shared" displayname="Wikimedia Commons" />
<repo name="local" displayname="" />
</repos>
</query>
</api>
|
Possible errors[edit]
Unknown.
| The following documentation is the output of Special:ApiHelp/query+filerepoinfo, automatically generated by the pre-release version of MediaWiki that is running on this site (MediaWiki.org). |
meta=filerepoinfo (fri)
- This module requires read rights.
- Source: MediaWiki
- License: GPL-2.0+
Return meta information about image repositories configured on the wiki.
Parameter:
- friprop
Which repository properties to get (there may be more available on some wikis):
- apiurl
- URL to the repository API - helpful for getting image info from the host.
- name
- The key of the repository - used in e.g. $wgForeignFileRepos and imageinfo return values.
- displayname
- The human-readable name of the repository wiki.
- rooturl
- Root URL for image paths.
- local
- Whether that repository is the local one or not.
- Values (separate with | or alternative): name, displayname, rootUrl, local, url, thumbUrl, initialCapital, descBaseUrl, scriptDirUrl, fetchDescription, descriptionCacheExpiry, favicon, canUpload
- Default: name|displayname|rootUrl|local|url|thumbUrl|initialCapital|descBaseUrl|scriptDirUrl|fetchDescription|descriptionCacheExpiry|favicon|canUpload
Example:
- Get information about file repositories.
- api.php?action=query&meta=filerepoinfo&friprop=apiurl|name|displayname [open in sandbox]