API:Duplicatefiles
| Duplicatefiles | ||
|---|---|---|
| List all files that are duplicates of the given file(s) based on hash values. This module can be used as a Generator. |
||
| Prefix | df | |
| Required rights | none | |
| Post only? | No | |
| Generated help | Current | |
| Version added |
|
|
List duplicates of the given files.
Parameters[edit]
dflimit: How many duplicates to list.dfcontinue: When more results are available, use this to continue.dfdir: The direction in which to list. Possible values:ascending,descending. (Default:ascending) 1.20+dflocalonly: Look only for files in the local repository. Type: boolean 1.20+
Example[edit]
List duplicates of two images
api.php? action=query& titles=Image:1995.jpg|Image:Welcome.gif& prop=duplicatefiles [try in ApiSandbox]
| Result |
|---|
<?xml version="1.0"?>
<api>
<query>
<pages>
<page pageid="99" ns="6" title="Image:Bombers.ogg">
<duplicatefiles>
<df name="Bombers2.ogg" user="Catrope" timestamp="2008-09-27T11:12:45Z" />
</duplicatefiles>
</page>
<page pageid="41" ns="6" title="Image:Welcome.gif">
<duplicatefiles>
<df name="Welcome2.gif" user="Catrope" timestamp="2008-09-27T11:30:30Z" />
</duplicatefiles>
</page>
</pages>
</query>
</api>
|
Possible errors[edit]
None
| The following documentation is the output of Special:ApiHelp/query+duplicatefiles, automatically generated by the pre-release version of MediaWiki that is running on this site (MediaWiki.org). |
prop=duplicatefiles (df)
- This module requires read rights.
- This module can be used as a generator.
- Source: MediaWiki
- License: GPL-2.0+
List all files that are duplicates of the given files based on hash values.
Parameters:
- dflimit
How many duplicate files to return.
- No more than 500 (5,000 for bots) allowed.
- Type: integer or max
- Default: 10
- dfcontinue
When more results are available, use this to continue.
- dfdir
The direction in which to list.
- One of the following values: ascending, descending
- Default: ascending
- dflocalonly
Look only for files in the local repository.
- Type: boolean (details)
Examples:
- Look for duplicates of File:Albert Einstein Head.jpg.
- api.php?action=query&titles=File:Albert_Einstein_Head.jpg&prop=duplicatefiles [open in sandbox]
- Look for duplicates of all files.
- api.php?action=query&generator=allimages&prop=duplicatefiles [open in sandbox]