MediaWiki Action API
Jump to navigation
Jump to search
A MediaWiki Action API is a web service interface that enables programmatic access to MediaWiki features and wiki content.
- Context:
- It can (typically) support API Authentication through login tokens and session management.
- It can (typically) enable content operations like page editing, file uploads, and content parsing.
- It can (typically) handle query operations for retrieving wiki data and meta information.
- It can (typically) provide REST endpoints at `/w/api.php` on MediaWiki instances.
- It can (often) use HTTP GET and HTTP POST for request handling.
- It can (often) return responses in JSON format or XML format.
- It can (often) support client libraries in various programming languages.
- It can range from being a Basic API Implementation to being an Advanced API Implementation, depending on its feature support.
- It can range from being a Read-Only API to being a Full-Access API, depending on its access permissions.
- ...
- Example(s):
- MediaWiki API Modules, such as:
- Query Modules, such as:
- Properties Query for page property access.
- List Query for filtered results.
- Meta Query for wiki information.
- Action Modules, such as:
- Query Modules, such as:
- API Implementations, such as:
- Wikipedia API for Wikipedia content access.
- Wikimedia Commons API for media file access.
- Wikidata API for structured data access.
- ...
- MediaWiki API Modules, such as:
- Counter-Example(s):
- MediaWiki REST API, which uses modern REST architecture.
- Database Direct Access, which bypasses API security.
- File System Interface, which lacks web service capability.
- Manual Edit Interface, which requires human interaction.
- See: API Endpoint, Web API, MediaWiki Software Engine, API Authentication.
References
2024-12-23
- Perplexity.ai
- Question: What is the MediaWiki API, its core features, and common operations? Include details about query types, implementation methods, and authentication.
- Answer: The MediaWiki Action API is a RESTful web service that enables programmatic access to wiki features and content, allowing developers to perform various wiki operations through HTTP requests.
- Core Features:
- Functionality:
- Authentication and user management.
- Page creation and editing.
- Content searching.
- Meta information retrieval about wikis and users.
- Request Structure:
- API endpoint follows format `http://example.org/w/api.php`.
- English Wikipedia uses `https://en.wikipedia.org/w/api.php`.
- Functionality:
- Query Types:
- Query Modules:
- Props: Get page properties.
- List: Get pages matching criteria.
- Meta: Get wiki and user meta information.
- Query Modules:
- Common Operations:
- Authentication Operations:
- Login functionality through interactive flow.
- Account creation and management.
- Session handling.
- Content Management:
- Page creation and editing.
- File uploads and management.
- Content parsing and template expansion.
- Cache purging.
- Authentication Operations:
- Implementation Methods:
- Access Methods:
- HTTP GET and POST requests.
- JavaScript via mw.Api interface.
- Various client libraries in different programming languages.
- Access Methods:
- Core Features:
- Citations:
[1] https://www.mediawiki.org/wiki/API:Tutorial [2] https://www.mediawiki.org/wiki/API:Query [3] https://www.enviro.wiki/api.php?action=help&recursivesubmodules=1 [4] https://www.mediawiki.org/wiki/API:Main_page [5] https://siko1056.github.io/blog/2017/03/10/getting-to-know-the-mediawiki-api.html [6] https://doc.wikimedia.org/mediawiki-core/master/js/ [7] https://www.mediawiki.org/wiki/API [8] https://ws-dl.cs.odu.edu/wiki/api.php [9] https://github.com/wikimedia/mediawiki-api-demos [10] https://wikiteq.com/post/using-mediawiki-api