User:Pavithraes/Sandbox/API:FAQ

Overview
This page provides answers to some frequently asked questions about MediaWiki Action API. Use the table of contents to skip to the questions most relevant to you.

Also read the API:Main page. It answers some questions not answered here and points to other useful pages.

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.

What can I do using the API?
The MediaWiki Action API can be used to access various wiki features. The sidebar on the right points to some of these features.

Also, see projects that use the MediaWiki Action API here: API:Tutorial

How can I use(or call) the API?
The most common ways of calling the Action API is using HTTP requests and responses. See API:Tutorial for detailed instructions. To play with the Action API:
 * Use the Special:ApiSandbox.
 * Enable your browser's developer console and watch net requests to  as you interact with the wiki.

How do I know which parameter, module and submodule to call?
The MediaWiki API is big, and extensions further enlarge it.
 * The auto-generated documentation contains a list of all parameters, modules and submodules with brief descriptions. You can view the expanded version by appending
 * The sidebar on the right describes certain features, refer to the corresponding pages for information regarding modules and submodules.
 * Start with API:Main_module and make your way through.
 * If you need extra help, see Help.

Can I control the output format?
Yes! To control the output format, pass  in the query string. The most common formats are JSON and XML. For information on data formats see: API:Data_formats.

Where can I find examples?
The API documentation pages contain an 'Examples' section to demonstrate how different actions can be performed. The auto-generated docs also have a few examples trailing the description.

Do I need an access token?
Access tokens are required to perform actions that modify data, for example logging in and editing pages. Learn more at API:Tokens or refer to the sidebar category 'Authentication'.

What are wiki dumps?
Wikimedia’s data dumps are dumps of wiki collections, content, metadata, search indices, etc. See meta:Data_dumps for more information.

How can I work on dumps?
Refer to meta:Data_dumps and public dumps.

What are,  and other terms in query results?
Every wiki page has a  associated with it which remains unchanged when a page is moved or renamed. refers to the primary key of each revision.

For details regarding such terms refer to Manual:revision table, Manual:page table and other corresponding tables in the 'Manual' namespace.

Is there a limit to query results?
If the result count is high, yes. For example, the limit for list and property query results cannot exceed 500 for regular users. The corresponding API pages contain information regarding limits in the 'Additional notes' section.

Is there a limit to API calls?
Limit your clients to no more than 200 requests/sec to prevent getting blocked. In case you want to make many calls, inform an administrator beforehand. See API:Etiquette.

Where can I find more information?
The MediaWiki Action API documentation and the self documenting API home page. See Help.

How do I detect an error?
An error response from the API will set the  HTTP header and return an error structure.

What does this error mean?
Refer to the list of standard error messages: API:Errors_and_warnings

Am I facing errors due to version change?
If a website runs a different version of MediaWiki, it would also run a diffrent version of the API. Some module parameters supported in one version might be deprecated or removed in others. The documentation pages mention any such deprecations. For example,  is deprecated in API:Random. Also see REST_API and API_versioning.

How do I file a bug/feature requests?
Bug and feature request can be reported on Phabricator with the MediaWiki-API project tag. If the functionality you are requesting or reporting a bug against is offered by an extension (e.g. AbuseFilter, FlaggedRevs), add that extension's project, e.g. "MediaWiki-extensions-AbuseFilter". Note to verify for duplicate tasks and understand the task creation terms on Phabricator before proceeding. See How_to_report_a_bug for more details.

Get more help
If you can't find answers in the MediaWiki API documentation on mediawiki.org and the auto-generated documentation pages, feel free to reach out in the following ways.
 * Create a Wikimedia account (if you don't have one already) and add a new topic on the API discussion page.
 * Ask your question on:
 * IRC in the channel on the Freenode network.
 * MediaWiki-API mailing list.

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-resonse mechanism and produce JSON/XML structured data.

What is a REST API?
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, reliable and scalable service.

What can an API do?
See some uses of API.

Where can I learn more about APIs?

 * Understanding APIs
 * An Introduction to API’s
 * What is REST — A Simple Explanation for Beginners, Part 1: Introduction