MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/API

Main module

Κατάσταση: Όλα τα χαρακτηριστικά που εμφανίζονται σε αυτή τη σελίδα πρέπει να λειτουργούν, αλλά το API είναι ακόμα σε ενεργό ανάπτυξη, και μπορεί να αλλάξει ανά πάσα στιγμή. Εγγραφείτε στη the mediawiki-api-announce λίστα αλληλογραφίας για να ειδοποιείστε για ενημερώσεις.

Εσφαλμένα αιτήματα: Όταν στέλνονται εσφαλμένα αιτήματα στο API, επιστρέφεται μία κεφαλίδα HTTP (header) με το κλειδί "MediaWiki-API-Error" κι έπειτα η τιμή της κεφαλίδας και ο κωδικός σφάλματος που επιστρέφονται ορίζονται στην ίδια τιμή. Για περισσότερες πληροφορίες, δείτε API: Σφάλματα και προειδοποιήσεις.

Parameters:
action

Ποια ενέργει να εκτελεστεί.

One of the following values: ask, askargs, block, browsebyproperty, browsebysubject, changeauthenticationdata, checktoken, clearhasmsg, clientlogin, compare, createaccount, cspreport, delete, edit, emailuser, expandtemplates, feedcontributions, feedrecentchanges, feedwatchlist, filerevert, geocode, help, imagerotate, import, linkaccount, login, logout, managetags, mergehistory, move, opensearch, options, paraminfo, parse, patrol, pfautocomplete, pfautoedit, protect, purge, query, removeauthenticationdata, resetpassword, revisiondelete, rollback, rsd, scribunto-console, setnotificationtimestamp, setpagelanguage, smwinfo, stashedit, tag, templatedata, tokens, unblock, undelete, unlinkaccount, upload, userrights, validatepassword, visualeditor, visualeditoredit, watch
Default: help
format

Η μορφή των δεδομένων εξόδου.

One of the following values: json, jsonfm, none, php, phpfm, rawfm, xml, xmlfm
Default: jsonfm
maxlag

Maximum lag can be used when MediaWiki is installed on a database replicated cluster. To save actions causing any more site replication lag, this parameter can make the client wait until the replication lag is less than the specified value. In case of excessive lag, error code maxlag is returned with a message like Waiting for $host: $lag seconds lagged.
See Manual: Maxlag parameter for more information.

Type: integer
smaxage

Set the s-maxage HTTP cache control header to this many seconds. Errors are never cached.

Type: integer
Default: 0
maxage

Set the max-age HTTP cache control header to this many seconds. Errors are never cached.

Type: integer
Default: 0
assert

Verify the user is logged in if set to user, or has the bot user right if bot.

One of the following values: user, bot
assertuser

Verify the current user is the named user.

Τύπος: όνομα χρήστη
requestid

Any value given here will be included in the response. May be used to distinguish requests.

servedby

Include the hostname that served the request in the results.

Τύπος: boolean (λεπτομέρειες)
curtimestamp

Συμπερίληψη της τρέχουσας χρονοσφραγίδας στο αποτέλεσμα.

Τύπος: boolean (λεπτομέρειες)
responselanginfo

Include the languages used for uselang and errorlang in the result.

Τύπος: boolean (λεπτομέρειες)
origin

Κατά την πρόσβαση στο API χρησιμοποιώντας ένα cross-domain αίτημα AJAX (ΕΤΠ), το σύνολο αυτό το τομέα προέλευσης. Αυτό πρέπει να περιλαμβάνεται σε κάθε προ-πτήσης αίτηση, και ως εκ τούτου πρέπει να είναι μέρος του URI αιτήματος (δεν είναι η ΘΈΣΗ του σώματος). Αυτό πρέπει να ταιριάζει με μία από τις ρίζες της Προέλευσης κεφαλίδων ακριβώς, γι ' αυτό θα πρέπει να οριστεί σε κάτι σαν https://en.wikipedia.org ή https://meta.wikimedia.org. Εάν αυτή η παράμετρος δεν ταιριάζει με την Προέλευση κεφαλίδα, 403 απάντηση θα πρέπει να επιστραφεί. Εάν αυτή η παράμετρος ταιριάζει με την Προέλευση κεφαλίδα και η καταγωγή του είναι στη λίστα επιτρεπόμενων, μια Access-Control-Allow-Origin κεφαλίδα θα πρέπει να ρυθμιστεί.

uselang

Γλώσσα για τις μεταφράσεις μηνυμάτων. action=query&meta=siteinfo με siprop=languages επιστρέφει μια λίστα με κωδικούς γλωσσών, ή καθορίστε user για να χρησιμοποιήσετε την προτίμηση γλώσσας του τρέχοντα χρήστη, ή καθορίστε content για να χρησιμοποιήσετε τη γλώσσα περιεχομένου αυτού του wiki.

Default: user
errorformat

Format to use for warning and error text output.

plaintext
Wikitext with HTML tags removed and entities replaced.
wikitext
Unparsed wikitext.
html
HTML.
raw
Message key and parameters.
none
No text output, only the error codes.
bc
Format used prior to MediaWiki 1.29. errorlang and errorsuselocal are ignored.
One of the following values: plaintext, wikitext, html, raw, none, bc
Default: bc
errorlang

Language to use for warnings and errors. action=query&meta=siteinfo with siprop=languages returns a list of language codes, or specify content to use this wiki's content language, or specify uselang to use the same value as the uselang parameter.

Default: uselang
errorsuselocal

If given, error texts will use locally-customized messages from the MediaWiki namespace.

Τύπος: boolean (λεπτομέρειες)
Examples:
Help for the main module.
api.php?action=help [open in sandbox]
Όλη η βοήθεια σε μια σελίδα.
api.php?action=help&recursivesubmodules=1 [open in sandbox]
Permissions:
writeapi
Χρήση του API για επεξεργασία
Granted to: all, user και bot
apihighlimits
Use higher limits in API queries (slow queries: 500; fast queries: 5000). The limits for slow queries also apply to multivalue parameters.
Granted to: bot και sysop

Data types

Input to MediaWiki should be NFC-normalized UTF-8. MediaWiki may attempt to convert other input, but this may cause some operations (such as edits with MD5 checks) to fail.

Some parameter types in API requests need further explanation:

boolean
Boolean parameters work like HTML checkboxes: if the parameter is specified, regardless of value, it is considered true. For a false value, omit the parameter entirely.
timestamp
Timestamps may be specified in several formats. ISO 8601 date and time is recommended. All times are in UTC, any included timezone is ignored.
  • ISO 8601 date and time, 2001-01-15T14:56:00Z (punctuation and Z are optional)
  • ISO 8601 date and time with (ignored) fractional seconds, 2001-01-15T14:56:00.00001Z (dashes, colons, and Z are optional)
  • MediaWiki format, 20010115145600
  • Generic numeric format, 2001-01-15 14:56:00 (optional timezone of GMT, +##, or -## is ignored)
  • EXIF format, 2001:01:15 14:56:00
  • RFC 2822 format (timezone may be omitted), Mon, 15 Jan 2001 14:56:00
  • RFC 850 format (timezone may be omitted), Monday, 15-Jan-2001 14:56:00
  • C ctime format, Mon Jan 15 14:56:00 2001
  • Seconds since 1970-01-01T00:00:00Z as a 1 to 13 digit integer (excluding 0)
  • The string now
alternative multiple-value separator
Parameters that take multiple values are normally submitted with the values separated using the pipe character, e.g. param=value1|value2 or param=value1%7Cvalue2. If a value must contain the pipe character, use U+001F (Unit Separator) as the separator and prefix the value with U+001F, e.g. param=%1Fvalue1%1Fvalue2.

Credits

API developers:

  • Yuri Astrakhan (creator, lead developer Sep 2006–Sep 2007)
  • Roan Kattouw (lead developer Sep 2007–2009)
  • Victor Vasiliev
  • Bryan Tong Minh
  • Sam Reed
  • Brad Jorsch (lead developer 2013–present)

Please send your comments, suggestions and questions to mediawiki-api@lists.wikimedia.org or file a bug report at https://phabricator.wikimedia.org/.

Ανακτήθηκε από «https://el.diadikasies.gr/Ειδικό:ApiHelp»