API:SSS

From mediawiki.org
Jump to navigation Jump to search
This page is a translated version of the page API:FAQ and the translation is 33% complete.
Other languages:
Afrikaans • ‎Bahasa Indonesia • ‎Boarisch • ‎Deutsch • ‎Deutsch (Sie-Form)‎ • ‎English • ‎Ido • ‎Limburgs • ‎Nederlands • ‎Tiếng Việt • ‎Türkçe • ‎bosanski • ‎català • ‎dansk • ‎español • ‎français • ‎hrvatski • ‎italiano • ‎kurdî • ‎occitan • ‎polski • ‎português • ‎português do Brasil • ‎sicilianu • ‎suomi • ‎svenska • ‎čeština • ‎беларуская • ‎беларуская (тарашкевіца)‎ • ‎български • ‎русский • ‎українська • ‎עברית • ‎العربية • ‎فارسی • ‎کوردی • ‎हिन्दी • ‎অসমীয়া • ‎ಕನ್ನಡ • ‎ไทย • ‎မြန်မာဘာသာ • ‎中文 • ‎日本語 • ‎粵語 • ‎ꯃꯤꯇꯩ ꯂꯣꯟ • ‎한국어

Genel bakış

This page provides answers to some frequently asked questions about the MediaWiki Action API.

Ayrıca API:Anasayfa sayfasını okuyunuz. Burada cevaplanamayan bazı soruları cevaplayabilir ve diğer yararlı sayfalara yönlendirebilir.

API'ler hakkında

What is an API?

An API is an acronym for Application Programming Interface. It allows different applications to communicate with each other. In general terms, it refers to web-based APIs, which use HTTP requests-response mechanism and produce JSON/XML structured data.

REST API nedir?

REST is an acronym for REpresentational State Transfer. A set of guiding principles or constraints define a RESTful system. A RESTful API — or just a REST API — adheres to these principles and hence is a faster, more reliable and scalable service.

Bir API ne yapabilir?

API'ler hakkında nereden daha fazla bilgi edinebilirim?

Here are a few resources:

Genel

What is the MediaWiki Action API?

The MediaWiki Action API is a RESTful web service that allows users to perform certain wiki-actions like page creation, authentication, parsing, searching, etc.

MediaWiki Eylem API'si ne için kullanılabilir?

The MediaWiki Action API can be used to:

  • access wiki features.
  • interact with a wiki.
  • obtain meta-information about wikis and public users.

The right sidebar points to many features supported by the API. Also, see some Wikimedia projects that use the MediaWiki Action API.

MediaWiki Eylem API'sini nasıl kullanabilirim (veya çağırabilirim)?

HTTP requests are usually used to call the Action API. For detailed instructions, read the tutorial.

Eylem API ile oynamak için:

  • Special:ApiSandbox kullanın.
  • Enable your browser's developer console and watch net requests to api.php as you interact with the wiki.

Bir modül, bir alt modül ve bir parametre nedir?

The MediaWiki Action API has numerous modules that we use to perform different tasks. In technical terms, a module is a subclass of ApiBase. A module requires parameters. These parameters may (or may not) be submodules.

  • action is a parameter of the main module.
  • action=query is another module. It is called the query module.
  • list is a parameter of the query module.
  • list=search is also a module. It can be called a submodule of action=query.
  • srsearch is a parameter of the search module. It holds the search string 'abc'.
  • format is a parameter of the main module.
  • json is the output format.

Also, see Introduction and guidelines. It describes the submodules of the action=query module.

Hangi modül ve alt modülün çağrılacağını nasıl bilebilirim?

MediaWiki Eylem API'si büyüktür ve uzantılar onu daha da büyütür. API isteğinizi gerçekleştirmenin birkaç yolu:

  • In the sidebar, look for the feature you wish to implement and follow the link for information about which modules to call.
  • The self-documenting API pages contain a list of all modules and submodules with brief descriptions. You can start at the main module and follow the links to different submodules. (Append recursivesubmodules=1 to view the expanded version)

API modüllerini kullanmak için örnek kodları nerede bulabilirim?

The API documentation pages contain an 'Examples' section to demonstrate how different modules and submodules can be used. The auto-generated docs also have examples trailing the module descriptions.

See Mediawiki-API-demos for code snippets in Python and JavaScript.

Çıkış biçimi nasıl kontrol edebilirim?

The default output format is JSON. Other output formats have been deprecated or removed in the latest stable MediaWiki version, and their use is discouraged.

In older versions, to control the output format, you can pass &format=someformat in the query string.

For information, see API:Data formats.

Erişim anahtarına ihtiyacım var mı?

You will require an access token to perform data modifying actions like logging in, editing, moving pages, etc.

To learn more, refer to API:Tokens or the sidebar category 'Authentication'.

API'yi kullanarak siteler arası isteklerde nasıl bulunabilirim?

You must use JSONP or CORS to make cross-site requests in MediaWiki.

For details, see API:Cross-site requests.

Sorgulama sonuçları için bir sınır var mı?

Yes, it depends on the query parameter. For example, the results for list and property queries cannot exceed 500 for regular users. The API pages contain information about these limits in the 'Additional notes' section or the 'Limits' section. Note that some modules impose stricter limits under certain conditions.

If you are unsure about what limit to set and just want as many results as possible, set the limit to max.

API çağrılarının bir sınırı var mı?

There is no concrete limit. Yet, we recommend making a reasonable number of calls to prevent getting blocked. If you want to make many requests, contact the administrators beforehand.

Also, see API:Etiquette.

MediaWiki Eylem API ile ilgili güncellemeleri nereden alabilirim?

You can subscribe to the MediaWiki-API-Announce mailing list for announcements and updates.

Viki dökümleri nedir ve bunlarla nasıl çalışabilirim?

Wikimedia’s data dumps are dumps of wiki collections, content, metadata, search indices, etc. To work with dumps, see using dumps and public dumps.


Nereden daha fazla yardım alabilirim?

If you can't find answers in the MediaWiki API documentation or the auto-generated documentation pages, feel free to reach out in the following ways.

Uzantı geliştiricileri ve viki sahipleri

How can I create an API module in an extension?

API:Extensions will walk you through the complete process of creating an API module in an extension.

API'nin dahili yapısı nedir?

API:Implementation Strategy explains the implementation of the API machinery in MediaWiki Core.

API kullanımını nasıl kısıtlayabilirim?

To restrict the API usage, you can either restrict the use of write API or disable individual modules.

For instructions and examples, see API:Restricting API usage.

Kullanıcıların API'yi kullanarak viki içeriğini değiştirmesine nasıl izin verebilirim / kısıtlayabilirim?

In MediaWiki 1.14, users are allowed to modify the wiki content by default. To restrict, you have to set $wgEnableWriteAPI = false; in LocalSettings.php .

In MediaWiki 1.13 or earlier, you have to enable the write API with $wgEnableWriteAPI = true; to allow content modification.

For more information, see API:Changing wiki content.

Hatalar ve sorun giderme

How do I detect an error?

If you encounter an error, the error response from the API will set the MediaWiki-API-Error HTTP header and return an error structure.

Bu hata ne anlama geliyor?

Find your error in the list of standard error messages to understand what the error means.

Hata/özellik isteklerini nasıl iletebilirim?

You can report bugs and file feature requests on Wikimedia's task tracking tool, Phabricator.

Note:

See How to report a bug for more details.

API sürümüm nedeniyle hatalarla mı karşılaşıyorum?

If a website runs a different version of MediaWiki, it would also run a different version of the API. Some module parameters supported in one version might be deprecated (or removed) in others. Such parameters will throw an exception if used. The API pages document any such deprecations.

See the release notes for information regarding different API versions.