openapi: 3.0.1 info: version: 1.0.0 title: Wikimedia REST API description: "This API provides cacheable and straightforward access to Wikimedia content and data, in machine-readable formats.\n### Global Rules\n- Limit your clients to no more than 200 requests/s to this API.\n Each API endpoint's documentation may detail more specific usage limits.\n- Set a unique `User-Agent` or `Api-User-Agent` header that\n allows us to contact you quickly. Email addresses or URLs\n of contact pages work well.\n\nBy using this API, you agree to Wikimedia's [Terms of Use](https://wikimediafoundation.org/wiki/Terms_of_Use) and [Privacy Policy](https://wikimediafoundation.org/wiki/Privacy_policy). Unless otherwise specified in the endpoint documentation below, content accessed via this API is licensed under the [CC-BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/) and [GFDL](https://www.gnu.org/copyleft/fdl.html) licenses, and you irrevocably agree to release modifications or additions made through this API under these licenses. Check the [Wikimedia REST API documentation](https://www.mediawiki.org/wiki/Wikimedia_REST_API) for background and details.\n### Endpoint documentation\nPlease consult each endpoint's documentation for details on:\n- Licensing information for the specific type of content\n and data served via the endpoint.\n- Stability markers to inform you about development status and\n change policy, according to\n [our API version policy](https://www.mediawiki.org/wiki/API_versioning).\n- Endpoint specific usage limits.\n" termsOfService: https://wikimediafoundation.org/wiki/Terms_of_Use contact: name: the Wikimedia Services team url: http://mediawiki.org/wiki/Wikimedia_REST_API license: name: Apache2 url: http://www.apache.org/licenses/LICENSE-2.0 x-generated-from: spec-endpoint x-source-url: https://en.wikipedia.org/api/rest_v1/?spec x-host-basePath: /api/rest_v1 paths: /page/: get: tags: - Page content summary: Wikimedia REST List Page-related API Entry Points. description: 'Stability: [stable](https://www.mediawiki.org/wiki/API_versioning#Stable) ' responses: '200': description: A list of page-related API end points. content: application/json: schema: $ref: '#/components/schemas/listing' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/title/{title}: get: tags: - Page content summary: Wikimedia REST Get Revision Metadata for a Title. description: 'Returns the revision metadata for the given title. If a revision ID is provided, metadata for that revision is returned, otherwise the latest revision ID is assumed. Stability: [stable](https://www.mediawiki.org/wiki/API_versioning#Stable). ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string responses: '200': description: The latest revision metadata for the provided title. content: application/json: schema: $ref: '#/components/schemas/revision' '301': description: 'A permanent redirect is returned if the supplied article title was not in the normalized form. To avoid these redirects, you can use the [mediawiki-title](https://github.com/wikimedia/mediawiki-title) library to perform title normalization client side. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '302': description: 'The page is a [redirect page](https://www.mediawiki.org/wiki/Help:Redirects). The `location` header points to the redirect target. If you would like to avoid automatically following redirect pages, set the `redirect=false` query parameter. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '404': description: Unknown page title or no revisions found. content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: true x-amples: - title: Get rev by title from storage request: params: domain: en.wikipedia.org title: User:BSitzmann_(WMF)/MCS/Test/Frankenstein response: status: 200 headers: etag: /.+/ content-type: application/json body: items: - title: User:BSitzmann_(WMF)/MCS/Test/Frankenstein rev: /\d+/ tid: /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/ comment: /.*/ page_language: en x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/title/{title}/{revision}: get: tags: - Page content summary: Wikimedia REST Get Revision Metadata for a Title. description: 'Returns the revision metadata for the given title. If a revision ID is provided, metadata for that revision is returned, otherwise the latest revision ID is assumed. Stability: [stable](https://www.mediawiki.org/wiki/API_versioning#Stable). ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: revision in: path description: The revision id required: true schema: type: integer responses: '200': description: The latest revision metadata for the provided title. content: application/json: schema: $ref: '#/components/schemas/revision' '301': description: 'A permanent redirect is returned if the supplied article title was not in the normalized form. To avoid these redirects, you can use the [mediawiki-title](https://github.com/wikimedia/mediawiki-title) library to perform title normalization client side. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '302': description: 'The page is a [redirect page](https://www.mediawiki.org/wiki/Help:Redirects). The `location` header points to the redirect target. If you would like to avoid automatically following redirect pages, set the `redirect=false` query parameter. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '404': description: Unknown page title or no revisions found. content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-amples: - title: Get rev by title from storage request: params: domain: en.wikipedia.org title: User:BSitzmann_(WMF)/MCS/Test/Frankenstein response: status: 200 headers: etag: /.+/ content-type: application/json body: items: - title: User:BSitzmann_(WMF)/MCS/Test/Frankenstein rev: /\d+/ tid: /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/ comment: /.*/ page_language: en x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/html/{title}: get: tags: - Page content summary: Wikimedia REST Get Latest HTML for a Title. description: 'Stability: [stable](https://www.mediawiki.org/wiki/API_versioning#Stable) ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: redirect in: query description: 'Requests for [redirect pages](https://www.mediawiki.org/wiki/Help:Redirects) return HTTP 302 with a redirect target in `Location` header and content in the body. To get a 200 response instead, supply `false` to the `redirect` parameter. ' schema: type: boolean required: false - name: stash in: query description: 'Whether to temporary stash data-parsoid metadata in order to support transforming the modified content later. If this parameter is set, requests are rate-limited on a per-client basis (max 5 requests per second per client) ' schema: type: boolean - name: Accept-Language in: header description: 'The desired language variant code for wikis where LanguageConverter is enabled. Example: `sr-el` for Latin transcription of the Serbian language. ' schema: type: string responses: '200': description: 'The latest HTML for the given page title. See [the MediaWiki DOM spec](https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec) for a description of the MediaWiki-specific semantic markup in this HTML. Note that additional metadata is available in the HTML head. ' headers: ETag: description: 'ETag header indicating the revision and render timeuuid separated by a slash: "701384379/154d7bca-c264-11e5-8c2f-1b51b33b59fc" This ETag can be passed to the HTML save end point (as `base_etag` POST parameter), and can also be used to retrieve the exact corresponding data-parsoid metadata, by requesting the specific `revision` and `tid` indicated by the `ETag`. ' schema: type: string content: text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/2.1.0": schema: type: string application/json: schema: type: object '301': description: 'A permanent redirect is returned if the supplied article title was not in the normalized form. To avoid this kind of redirect, you can use the [mediawiki-title](https://github.com/wikimedia/mediawiki-title) library to perform title normalization client-side. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '302': description: 'The page is a [redirect page](https://www.mediawiki.org/wiki/Help:Redirects). The `location` header points to the redirect target, and the body contains the actual page contents as HTML. If you would like to avoid automatically following redirect pages, set the `redirect=false` query parameter. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '404': description: Unknown page title content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: true x-amples: - title: Get html by title from storage request: params: domain: en.wikipedia.org title: User:BSitzmann_(WMF)/MCS/Test/Frankenstein response: status: 200 headers: etag: /.+/ content-type: /^text\/html.+/ body: /^.*/ x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/html/{title}/{revision}: get: tags: - Page content summary: Wikimedia REST Get HTML for a Specific Title/revision & Optionally Timeuuid. description: 'Stability: [stable](https://www.mediawiki.org/wiki/API_versioning#Stable) ' operationId: getFormatRevision parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: revision in: path description: The revision required: true schema: type: integer - name: redirect in: query description: 'Requests for [redirect pages](https://www.mediawiki.org/wiki/Help:Redirects) return HTTP 302 with a redirect target in `Location` header and content in the body. To get a 200 response instead, supply `false` to the `redirect` parameter. ' schema: type: boolean - name: stash in: query description: 'Whether to temporary stash data-parsoid metadata in order to support transforming the modified content later. If this parameter is set, requests are rate-limited on a per-client basis (max 5 requests per second per client) ' schema: type: boolean - name: Accept-Language in: header description: 'The desired language variant code for wikis where LanguageConverter is enabled. Example: `sr-el` for Latin transcription of the Serbian language. ' schema: type: string responses: '200': description: 'The html for the given page, revision and tid. See [the MediaWiki DOM spec](https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec) for a description of the MediaWiki-specific semantic markup in this HTML. Note that additional metadata is available in the HTML head. This HTML can be edited using arbitrary HTML tools. The modified HTML can be converted back to wikitext using the [/transform/html/to/wikitext{/title}{/revision}](#!/Transforms/transform_html_to_wikitext__title___revision__post) entry point. ' headers: ETag: description: 'ETag header indicating the revision and render timeuuid separated by a slash: "701384379/154d7bca-c264-11e5-8c2f-1b51b33b59fc" This ETag can be passed to the HTML save end point (as `base_etag` POST parameter), and can also be used to retrieve the exact corresponding data-parsoid metadata, by requesting the specific `revision` and `tid` indicated by the `ETag`. ' schema: type: string content: text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/2.1.0": schema: type: string application/json: schema: type: object '301': description: 'A permanent redirect is returned if the supplied article title was not in the normalized form. To avoid this kind of redirect, you can use the [mediawiki-title](https://github.com/wikimedia/mediawiki-title) library to perform title normalization client-side. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '302': description: 'The page is a [redirect page](https://www.mediawiki.org/wiki/Help:Redirects). The `location` header points to the redirect target, and the body contains the actual page revision contents as HTML. If you would like to avoid automatically following redirect pages, set the `redirect=false` query parameter. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '400': description: Invalid revision or tid content: application/problem+json: schema: $ref: '#/components/schemas/problem' '403': description: Access to the specific revision is restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '404': description: Unknown page, revision or tid content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/lint/{title}: get: tags: - Page content summary: Wikimedia REST Get the Linter Errors for a Specific Title/revision. description: 'Stability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental) ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string responses: '200': description: 'The lint errors for the given page and optionally revision. See [the Linter extension docs](https://www.mediawiki.org/wiki/Extension:Linter) for more details. ' content: application/json: schema: type: object '301': description: 'A permanent redirect is returned if the supplied article title was not in the normalized form. To avoid this kind of redirect, you can use the [mediawiki-title](https://github.com/wikimedia/mediawiki-title) library to perform title normalization client-side. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '302': description: 'The page is a [redirect page](https://www.mediawiki.org/wiki/Help:Redirects). The `location` header points to the redirect target, and the body contains the actual page revision contents as HTML. If you would like to avoid automatically following redirect pages, set the `redirect=false` query parameter. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '400': description: Invalid revision or tid content: application/problem+json: schema: $ref: '#/components/schemas/problem' '403': description: Access to the specific revision is restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '404': description: Unknown page, revision or tid content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/lint/{title}/{revision}: get: tags: - Page content summary: Wikimedia REST Get the Linter Errors for a Specific Title/revision. description: 'Stability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental) ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: revision in: path description: The revision required: true schema: type: integer responses: '200': description: 'The lint errors for the given page and optionally revision. See [the Linter extension docs](https://www.mediawiki.org/wiki/Extension:Linter) for more details. ' content: application/json: schema: type: object '301': description: 'A permanent redirect is returned if the supplied article title was not in the normalized form. To avoid this kind of redirect, you can use the [mediawiki-title](https://github.com/wikimedia/mediawiki-title) library to perform title normalization client-side. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '302': description: 'The page is a [redirect page](https://www.mediawiki.org/wiki/Help:Redirects). The `location` header points to the redirect target, and the body contains the actual page revision contents as HTML. If you would like to avoid automatically following redirect pages, set the `redirect=false` query parameter. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '400': description: Invalid revision or tid content: application/problem+json: schema: $ref: '#/components/schemas/problem' '403': description: Access to the specific revision is restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '404': description: Unknown page, revision or tid content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/summary/{title}: get: tags: - Page content summary: Wikimedia REST Get Basic Metadata and Simplified Article Introduction. description: 'The summary response includes an extract of the first paragraph of the page in plain text and HTML as well as the type of page. This is useful for page previews (fka. Hovercards, aka. Popups) on the web and link previews in the apps. Stability: [stable](https://www.mediawiki.org/wiki/Wikimedia_Product/Wikimedia_Product_Infrastructure_team/API_endpoint_stability_policy#Stable) Please follow [wikitech-l](https://lists.wikimedia.org/mailman/listinfo/wikitech-l) or [mediawiki-api-announce](https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce) for announcements of breaking changes. ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: redirect in: query description: 'Requests for [redirect pages](https://www.mediawiki.org/wiki/Help:Redirects) return HTTP 302 with a redirect target in `Location` header and content in the body. To get a 200 response instead, supply `false` to the `redirect` parameter. ' schema: type: boolean - name: Accept-Language in: header description: 'The desired language variant code for wikis where LanguageConverter is enabled. Example: `sr-el` for Latin transcription of the Serbian language. ' schema: type: string responses: '200': description: The summary for the given page headers: ETag: description: 'Syntax: "{revision}/{tid}". Example: "701384379/154d7bca-c264-11e5-8c2f-1b51b33b59fc" ' schema: type: string content: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Summary/1.4.2": schema: $ref: '#/components/schemas/summary' '301': description: 'A permanent redirect is returned if the supplied article title was not in the normalized form. To avoid this kind of redirect, you can use the [mediawiki-title](https://github.com/wikimedia/mediawiki-title) library to perform title normalization client-side. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '302': description: 'The page is a [redirect page](https://www.mediawiki.org/wiki/Help:Redirects). The `location` header points to the redirect target. If you would like to avoid automatically following redirect pages, set the `redirect=false` query parameter. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '404': description: Unknown page title content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: true x-amples: - title: Get summary from storage request: params: domain: en.wikipedia.org title: San_Francisco response: status: 200 headers: etag: /.+/ content-type: /^application\/json/ body: extract: /.+/ extract_html: /.+/ thumbnail: source: /^https:/ originalimage: source: /^https:/ lang: en dir: ltr description: /.+/ x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/media-list/{title}: get: tags: - Page content summary: Wikimedia REST Get List of Media Files Used on a Page. description: 'Gets the list of media items (images, audio, and video) in the order in which they appear on a given wiki page. Stability: [unstable](https://www.mediawiki.org/wiki/Wikimedia_Product/Wikimedia_Product_Infrastructure_team/API_endpoint_stability_policy#Unstable) Please follow [wikitech-l](https://lists.wikimedia.org/mailman/listinfo/wikitech-l) or [mediawiki-api-announce](https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce) for announcements of breaking changes. ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: redirect in: query description: 'Requests for [redirect pages](https://www.mediawiki.org/wiki/Help:Redirects) return HTTP 302 with a redirect target in `Location` header and content in the body. To get a 200 response instead, supply `false` to the `redirect` parameter. ' schema: type: boolean responses: '200': description: JSON containing metadata of media items appearing on the given page. headers: ETag: description: 'Syntax: "{revision}/{tid}". Example: "701384379/154d7bca-c264-11e5-8c2f-1b51b33b59fc" ' schema: type: string content: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Media/1.3.1": schema: $ref: '#/components/schemas/media_list' '301': description: 'A permanent redirect is returned if the supplied article title was not in the normalized form. To avoid this kind of redirect, you can use the [mediawiki-title](https://github.com/wikimedia/mediawiki-title) library to perform title normalization client-side. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '302': description: 'The page is a [redirect page](https://www.mediawiki.org/wiki/Help:Redirects). The `location` header points to the redirect target. If you would like to avoid automatically following redirect pages, set the `redirect=false` query parameter. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '404': description: Unknown page title content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' operationId: getContent-media-list x-monitor: true x-amples: - title: Get media-list from storage request: params: domain: en.wikipedia.org title: User:BSitzmann_(WMF)/MCS/Test/Frankenstein response: status: 200 headers: etag: /.+/ content-type: /^application\/json/ body: revision: /\d+/ tid: /.+/ items: - type: /.+/ section_id: /\d+/ showInGallery: /.+/ x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/media-list/{title}/{revision}: get: tags: - Page content summary: Wikimedia REST Get List of Media Files Used on a Page. description: 'Gets the list of media items (images, audio, and video) in the order in which they appear on a given wiki page. Stability: [unstable](https://www.mediawiki.org/wiki/Wikimedia_Product/Wikimedia_Product_Infrastructure_team/API_endpoint_stability_policy#Unstable) Please follow [wikitech-l](https://lists.wikimedia.org/mailman/listinfo/wikitech-l) or [mediawiki-api-announce](https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce) for announcements of breaking changes. ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: revision in: path description: 'Optional page revision. Note that older revisions are not stored, so request latency with the revision would be higher. ' required: true schema: type: integer - name: redirect in: query description: 'Requests for [redirect pages](https://www.mediawiki.org/wiki/Help:Redirects) return HTTP 302 with a redirect target in `Location` header and content in the body. To get a 200 response instead, supply `false` to the `redirect` parameter. ' schema: type: boolean responses: '200': description: JSON containing metadata of media items appearing on the given page. headers: ETag: description: 'Syntax: "{revision}/{tid}". Example: "701384379/154d7bca-c264-11e5-8c2f-1b51b33b59fc" ' schema: type: string content: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Media/1.3.1": schema: $ref: '#/components/schemas/media_list' '301': description: 'A permanent redirect is returned if the supplied article title was not in the normalized form. To avoid this kind of redirect, you can use the [mediawiki-title](https://github.com/wikimedia/mediawiki-title) library to perform title normalization client-side. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '302': description: 'The page is a [redirect page](https://www.mediawiki.org/wiki/Help:Redirects). The `location` header points to the redirect target. If you would like to avoid automatically following redirect pages, set the `redirect=false` query parameter. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '404': description: Unknown page title content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' operationId: getContentWithRevision-media-list x-monitor: false x-amples: - title: Get media-list from storage request: params: domain: en.wikipedia.org title: User:BSitzmann_(WMF)/MCS/Test/Frankenstein response: status: 200 headers: etag: /.+/ content-type: /^application\/json/ body: revision: /\d+/ tid: /.+/ items: - type: /.+/ section_id: /\d+/ showInGallery: /.+/ x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/mobile-html/{title}: get: tags: - Page content summary: Wikimedia REST Get Page Content HTML Optimized for Mobile Consumption. description: "Gets the content HTML optimized for mobile consumption for the given page. This content\nis derived from Parsoid HTML (see `/page/html/{title}` endpoint).\nThe difference to Parsoid HTML is roughly:\n* Some elements and attributes not needed for the reading case are removed.\n* LeadIntroductionTransform: The introductory paragraph is moved before an infobox.\n* RedLinks: Red links are flattened (=turned into span elements).\n* WidenImage: images that should be displayed in gallery are widened.\n* Section headings are slightly changed by wrapping the headings inside a div and adding\n a span element inside the new div for the edit buttons.\n* Additional classes are added to img elements to fix issues with non-white backgrounds.\n See Theme support below for instructions on how to enable that.\n* Pagelib CSS files needed to display the content are referenced.\n* LazyLoadTransform: server-side portion/prep for lazy loading of images.\n* CollapseTable: server-side portion/prep for collapsing tables.\n\nWhat's not included? What parts of the PageLibrary does a client still have to do?\n* Theme support: Themes can be turned on by adding a theme class to the root tag.\n Possible class names are:\n * `pagelib_theme_default`\n * `pagelib_theme_dark`\n * `pagelib_theme_black`\n * `pagelib_theme_sepia`\n\n The pagelib JS has functionality to do that: ThemeTransform.setTheme(document, theme).\n* Dim images: DimImagesTransform.dim(window, enable)\n* PlatformTransform.classify(window) to trigger Android and iOS app specific CSS rules\n\ * LazyLoadTransformer: client side companion of LazyLoadTransform (note the extra *er*\nhere)\n* FooterTransformer: seems to be more UI than content, requires I18N, too\n\nStability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental)\n" parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: redirect in: query description: 'Requests for [redirect pages](https://www.mediawiki.org/wiki/Help:Redirects) return HTTP 302 with a redirect target in `Location` header and content in the body. To get a 200 response instead, supply `false` to the `redirect` parameter. ' schema: type: boolean responses: '200': description: mobile-optimized HTML of the given page. headers: ETag: description: 'Syntax: "{revision}/{tid}". Example: "701384379/154d7bca-c264-11e5-8c2f-1b51b33b59fc" ' schema: type: string content: text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Mobile-HTML/1.2.2": schema: type: string '301': description: 'A permanent redirect is returned if the supplied article title was not in the normalized form. To avoid this kind of redirect, you can use the [mediawiki-title](https://github.com/wikimedia/mediawiki-title) library to perform title normalization client-side. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '302': description: 'The page is a [redirect page](https://www.mediawiki.org/wiki/Help:Redirects). The `location` header points to the redirect target. If you would like to avoid automatically following redirect pages, set the `redirect=false` query parameter. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '404': description: Unknown page title content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' operationId: getContent-mobile-html x-monitor: true x-amples: - title: Get mobile-html from storage request: params: domain: en.wikipedia.org title: User:BSitzmann_(WMF)/MCS/Test/Frankenstein response: status: 200 headers: etag: /.+/ content-type: /^text\/html.+/ body: /^.*/ x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/mobile-html/{title}/{revision}: get: tags: - Page content summary: Wikimedia REST Get Page Content HTML Optimized for Mobile Consumption. description: "Gets the content HTML optimized for mobile consumption for the given page. This content\nis derived from Parsoid HTML (see `/page/html/{title}` endpoint).\nThe difference to Parsoid HTML is roughly:\n* Some elements and attributes not needed for the reading case are removed.\n* LeadIntroductionTransform: The introductory paragraph is moved before an infobox.\n* RedLinks: Red links are flattened (=turned into span elements).\n* WidenImage: images that should be displayed in gallery are widened.\n* Section headings are slightly changed by wrapping the headings inside a div and adding\n a span element inside the new div for the edit buttons.\n* Additional classes are added to img elements to fix issues with non-white backgrounds.\n See Theme support below for instructions on how to enable that.\n* Pagelib CSS files needed to display the content are referenced.\n* LazyLoadTransform: server-side portion/prep for lazy loading of images.\n* CollapseTable: server-side portion/prep for collapsing tables.\n\nWhat's not included? What parts of the PageLibrary does a client still have to do?\n* Theme support: Themes can be turned on by adding a theme class to the root tag.\n Possible class names are:\n * `pagelib_theme_default`\n * `pagelib_theme_dark`\n * `pagelib_theme_black`\n * `pagelib_theme_sepia`\n\n The pagelib JS has functionality to do that: ThemeTransform.setTheme(document, theme).\n* Dim images: DimImagesTransform.dim(window, enable)\n* PlatformTransform.classify(window) to trigger Android and iOS app specific CSS rules\n\ * LazyLoadTransformer: client side companion of LazyLoadTransform (note the extra *er*\nhere)\n* FooterTransformer: seems to be more UI than content, requires I18N, too\n\nStability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental)\n" parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: revision in: path description: 'Optional page revision. Note that older revisions are not stored, so request latency with the revision would be higher. ' required: true schema: type: integer - name: redirect in: query description: 'Requests for [redirect pages](https://www.mediawiki.org/wiki/Help:Redirects) return HTTP 302 with a redirect target in `Location` header and content in the body. To get a 200 response instead, supply `false` to the `redirect` parameter. ' schema: type: boolean responses: '200': description: mobile-optimized HTML of the given page. headers: ETag: description: 'Syntax: "{revision}/{tid}". Example: "701384379/154d7bca-c264-11e5-8c2f-1b51b33b59fc" ' schema: type: string content: text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Mobile-HTML/1.2.2": schema: type: string '301': description: 'A permanent redirect is returned if the supplied article title was not in the normalized form. To avoid this kind of redirect, you can use the [mediawiki-title](https://github.com/wikimedia/mediawiki-title) library to perform title normalization client-side. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '302': description: 'The page is a [redirect page](https://www.mediawiki.org/wiki/Help:Redirects). The `location` header points to the redirect target. If you would like to avoid automatically following redirect pages, set the `redirect=false` query parameter. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '404': description: Unknown page title content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' operationId: getContentWithRevision-mobile-html x-monitor: false x-amples: - title: Get mobile-html from storage request: params: domain: en.wikipedia.org title: User:BSitzmann_(WMF)/MCS/Test/Frankenstein response: status: 200 headers: etag: /.+/ content-type: /^text\/html.+/ body: /^.*/ x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/mobile-html-offline-resources/{title}: get: tags: - Page content - offline summary: Wikimedia REST Get Styles and Scripts for Offline Consumption of Mobile-html-formatted Pages description: 'Provides links to scripts and styles needed for viewing mobile-html-formatted pages offline. Stability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental) ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string responses: '200': description: links to scripts and styles to accompany the mobile-html of the page for offline consumption content: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Mobile-HTML-Offline-Resources/1.2.1": schema: type: string default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: true x-amples: - title: Get offline resource links to accompany page content HTML for test page request: params: title: User:BSitzmann_(WMF)/MCS/Test/Frankenstein response: status: 200 headers: content-type: /^application\/json.+/ x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/mobile-html-offline-resources/{title}/{revision}: get: tags: - Page content - offline summary: Wikimedia REST Get Styles and Scripts for Offline Consumption of Mobile-html-formatted Pages description: 'Provides links to scripts and styles needed for viewing mobile-html-formatted pages offline. Stability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental) ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: revision in: path description: 'Optional page revision. Note that older revisions are not stored, so request latency with the revision would be higher. ' required: true schema: type: integer responses: '200': description: links to scripts and styles to accompany the mobile-html of the page for offline consumption content: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Mobile-HTML-Offline-Resources/1.2.1": schema: type: string default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-amples: - title: Get offline resource links to accompany page content HTML for test page request: params: title: User:BSitzmann_(WMF)/MCS/Test/Frankenstein response: status: 200 headers: content-type: /^application\/json.+/ x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/talk/{title}: get: tags: - Talk pages summary: Wikimedia REST Get Structured Talk Page Contents description: 'Gets structured talk page contents for the provided title. Stability: [experimental](https://www.mediawiki.org/wiki/Wikimedia_Product/Wikimedia_Product_Infrastructure_team/API_endpoint_stability_policy#Experimental) ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: redirect in: query description: 'Requests for [redirect pages](https://www.mediawiki.org/wiki/Help:Redirects) return HTTP 302 with a redirect target in `Location` header and content in the body. To get a 200 response instead, supply `false` to the `redirect` parameter. ' schema: type: boolean responses: '200': description: structured talk page JSON. headers: ETag: description: 'Syntax: "{revision}/{tid}". Example: "701384379/154d7bca-c264-11e5-8c2f-1b51b33b59fc" ' schema: type: string content: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Talk/0.1.0": schema: type: string '301': description: 'A permanent redirect is returned if the supplied article title was not in the normalized form. To avoid this kind of redirect, you can use the [mediawiki-title](https://github.com/wikimedia/mediawiki-title) library to perform title normalization client-side. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '302': description: 'The page is a [redirect page](https://www.mediawiki.org/wiki/Help:Redirects). The `location` header points to the redirect target. If you would like to avoid automatically following redirect pages, set the `redirect=false` query parameter. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '404': description: Unknown page title content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: true x-amples: - title: Get structured talk page for enwiki Salt article request: params: domain: en.wikipedia.org title: Salt response: status: 200 headers: content-type: /application\/json; charset=utf-8; profile=".+Talk.+"/ etag: /.+/ body: topics: - id: /.+/ replies: - sha: /.+/ depth: /.+/ html: /.*/ depth: /.+/ html: /.*/ shas: html: /.+/ indicator: /.+/ x-microcks-operation: delay: 0 dispatcher: FALLBACK /page/talk/{title}/{revision}: get: tags: - Talk pages summary: Wikimedia REST Get Structured Talk Page Contents description: 'Gets structured talk page contents for the provided title. Stability: [experimental](https://www.mediawiki.org/wiki/Wikimedia_Product/Wikimedia_Product_Infrastructure_team/API_endpoint_stability_policy#Experimental) ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: revision in: path description: 'Optional page revision. Note that older revisions are not stored, so request latency with the revision would be higher. ' required: true schema: type: integer - name: redirect in: query description: 'Requests for [redirect pages](https://www.mediawiki.org/wiki/Help:Redirects) return HTTP 302 with a redirect target in `Location` header and content in the body. To get a 200 response instead, supply `false` to the `redirect` parameter. ' schema: type: boolean responses: '200': description: structured talk page JSON. headers: ETag: description: 'Syntax: "{revision}/{tid}". Example: "701384379/154d7bca-c264-11e5-8c2f-1b51b33b59fc" ' schema: type: string content: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Talk/0.1.0": schema: type: string '301': description: 'A permanent redirect is returned if the supplied article title was not in the normalized form. To avoid this kind of redirect, you can use the [mediawiki-title](https://github.com/wikimedia/mediawiki-title) library to perform title normalization client-side. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '302': description: 'The page is a [redirect page](https://www.mediawiki.org/wiki/Help:Redirects). The `location` header points to the redirect target. If you would like to avoid automatically following redirect pages, set the `redirect=false` query parameter. Beware that redirected pre-flighted cross-origin requests (such as those sending custom request headers like `Api-User-Agent`) will fail in most current browsers [due to a spec bug](https://github.com/whatwg/fetch/issues/204). ' '404': description: Unknown page title content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-amples: - title: Get structured talk page for enwiki Salt article request: params: domain: en.wikipedia.org title: Salt response: status: 200 headers: content-type: /application\/json; charset=utf-8; profile=".+Talk.+"/ etag: /.+/ body: topics: - id: /.+/ replies: - sha: /.+/ depth: /.+/ html: /.*/ depth: /.+/ html: /.*/ shas: html: /.+/ indicator: /.+/ x-microcks-operation: delay: 0 dispatcher: FALLBACK /transform/html/to/wikitext: post: tags: - Transforms summary: Wikimedia REST Transform HTML to Wikitext description: 'Transform [Parsoid HTML](https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec) to Wikitext. When converting pre-existing (possibly modified) content, you should pass in the `title`, `revision`, and `If-Match` header. This lets [Parsoid](https://www.mediawiki.org/wiki/Parsoid) preserve small syntactic variations in wikitext, which ensures that diffs are readable. - Stability: [stable](https://www.mediawiki.org/wiki/API_versioning#Stable) - Rate limit: 25 req/s ' parameters: - name: if-match in: header description: 'The `ETag` header of the original render indicating it''s revision and timeuuid. Required if both `title` and `revision` parameters are present. ' schema: type: string requestBody: content: multipart/form-data: schema: required: - html properties: html: type: string description: The HTML to transform x-textarea: true scrub_wikitext: type: boolean description: Normalise the DOM to yield cleaner wikitext? required: true responses: '200': description: MediaWiki Wikitext. content: text/plain; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/wikitext/1.0.0": schema: type: string '403': description: Access to the specific revision is restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '404': description: Unknown page title or revision content: application/problem+json: schema: $ref: '#/components/schemas/problem' '409': description: Revision was restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '410': description: Page was deleted content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /transform/html/to/wikitext/{title}: post: tags: - Transforms summary: Wikimedia REST Transform HTML to Wikitext description: 'Transform [Parsoid HTML](https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec) to Wikitext. When converting pre-existing (possibly modified) content, you should pass in the `title`, `revision`, and `If-Match` header. This lets [Parsoid](https://www.mediawiki.org/wiki/Parsoid) preserve small syntactic variations in wikitext, which ensures that diffs are readable. - Stability: [stable](https://www.mediawiki.org/wiki/API_versioning#Stable) - Rate limit: 25 req/s ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: if-match in: header description: 'The `ETag` header of the original render indicating it''s revision and timeuuid. Required if both `title` and `revision` parameters are present. ' schema: type: string requestBody: content: multipart/form-data: schema: required: - html properties: html: type: string description: The HTML to transform x-textarea: true scrub_wikitext: type: boolean description: Normalise the DOM to yield cleaner wikitext? required: true responses: '200': description: MediaWiki Wikitext. content: text/plain; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/wikitext/1.0.0": schema: type: string '403': description: Access to the specific revision is restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '404': description: Unknown page title or revision content: application/problem+json: schema: $ref: '#/components/schemas/problem' '409': description: Revision was restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '410': description: Page was deleted content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /transform/html/to/wikitext/{title}/{revision}: post: tags: - Transforms summary: Wikimedia REST Transform HTML to Wikitext description: 'Transform [Parsoid HTML](https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec) to Wikitext. When converting pre-existing (possibly modified) content, you should pass in the `title`, `revision`, and `If-Match` header. This lets [Parsoid](https://www.mediawiki.org/wiki/Parsoid) preserve small syntactic variations in wikitext, which ensures that diffs are readable. - Stability: [stable](https://www.mediawiki.org/wiki/API_versioning#Stable) - Rate limit: 25 req/s ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: revision in: path description: The page revision required: true schema: type: integer - name: if-match in: header description: 'The `ETag` header of the original render indicating it''s revision and timeuuid. Required if both `title` and `revision` parameters are present. ' schema: type: string requestBody: content: multipart/form-data: schema: required: - html properties: html: type: string description: The HTML to transform x-textarea: true scrub_wikitext: type: boolean description: Normalise the DOM to yield cleaner wikitext? required: true responses: '200': description: MediaWiki Wikitext. content: text/plain; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/wikitext/1.0.0": schema: type: string '403': description: Access to the specific revision is restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '404': description: Unknown page title or revision content: application/problem+json: schema: $ref: '#/components/schemas/problem' '409': description: Revision was restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '410': description: Page was deleted content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /transform/wikitext/to/html: post: tags: - Transforms summary: Wikimedia REST Transform Wikitext to HTML description: 'Transform wikitext to HTML. Note that if you set `stash: true`, you also need to supply the title. - Stability: [stable](https://www.mediawiki.org/wiki/API_versioning#Stable) - Rate limit: 25 req/s (5 req/s when `stash: true`) ' requestBody: content: multipart/form-data: schema: required: - wikitext properties: wikitext: type: string description: The Wikitext to transform to HTML x-textarea: true body_only: type: boolean description: Return only `body.innerHTML` stash: type: boolean description: Whether to temporarily stash the result of the transformation required: true responses: '200': description: See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec content: text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/2.1.0": schema: type: string '403': description: access to the specific revision is restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '404': description: Unknown page title or revision content: application/problem+json: schema: $ref: '#/components/schemas/problem' '409': description: Revision was restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '410': description: Page was deleted content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /transform/wikitext/to/html/{title}: post: tags: - Transforms summary: Wikimedia REST Transform Wikitext to HTML description: 'Transform wikitext to HTML. Note that if you set `stash: true`, you also need to supply the title. - Stability: [stable](https://www.mediawiki.org/wiki/API_versioning#Stable) - Rate limit: 25 req/s (5 req/s when `stash: true`) ' requestBody: content: multipart/form-data: schema: required: - wikitext properties: wikitext: type: string description: The Wikitext to transform to HTML x-textarea: true body_only: type: boolean description: Return only `body.innerHTML` stash: type: boolean description: Whether to temporarily stash the result of the transformation required: true responses: '200': description: See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec content: text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/2.1.0": schema: type: string '403': description: access to the specific revision is restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '404': description: Unknown page title or revision content: application/problem+json: schema: $ref: '#/components/schemas/problem' '409': description: Revision was restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '410': description: Page was deleted content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: true parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string x-amples: - title: Transform wikitext to html request: params: domain: en.wikipedia.org title: User:BSitzmann_(WMF)/MCS/Test/Frankenstein body: wikitext: == Heading == body_only: true response: status: 200 headers: content-type: /^text\/html.+/ body: /^Heading<\/h2>$/ x-microcks-operation: delay: 0 dispatcher: FALLBACK /transform/wikitext/to/html/{title}/{revision}: post: tags: - Transforms summary: Wikimedia REST Transform Wikitext to HTML description: 'Transform wikitext to HTML. Note that if you set `stash: true`, you also need to supply the title. - Stability: [stable](https://www.mediawiki.org/wiki/API_versioning#Stable) - Rate limit: 25 req/s (5 req/s when `stash: true`) ' requestBody: content: multipart/form-data: schema: required: - wikitext properties: wikitext: type: string description: The Wikitext to transform to HTML x-textarea: true body_only: type: boolean description: Return only `body.innerHTML` stash: type: boolean description: Whether to temporarily stash the result of the transformation required: true responses: '200': description: See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec content: text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/2.1.0": schema: type: string '403': description: access to the specific revision is restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '404': description: Unknown page title or revision content: application/problem+json: schema: $ref: '#/components/schemas/problem' '409': description: Revision was restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '410': description: Page was deleted content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: revision in: path description: The page revision required: true schema: type: integer x-microcks-operation: delay: 0 dispatcher: FALLBACK /transform/wikitext/to/lint: post: tags: - Transforms summary: Wikimedia REST Check Wikitext for Lint Errors description: 'Parse the supplied wikitext and check it for lint errors. - Stability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental) - Rate limit: 25 req/s ' requestBody: content: multipart/form-data: schema: required: - wikitext properties: wikitext: type: string description: The Wikitext to check x-textarea: true application/json: schema: required: - wikitext properties: wikitext: type: string description: The Wikitext to check x-textarea: true required: true responses: '200': description: Linter errors, if any, as a JSON blob content: application/json: schema: type: object '404': description: Unknown page title content: application/problem+json: schema: $ref: '#/components/schemas/problem' '409': description: Latest revision was restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '410': description: Page was deleted content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /transform/wikitext/to/lint/{title}: post: tags: - Transforms summary: Wikimedia REST Check Wikitext for Lint Errors description: 'Parse the supplied wikitext and check it for lint errors. - Stability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental) - Rate limit: 25 req/s ' requestBody: content: multipart/form-data: schema: required: - wikitext properties: wikitext: type: string description: The Wikitext to check x-textarea: true required: true responses: '200': description: Linter errors, if any, as a JSON blob content: application/json: schema: type: object '404': description: Unknown page title content: application/problem+json: schema: $ref: '#/components/schemas/problem' '409': description: Latest revision was restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '410': description: Page was deleted content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string x-microcks-operation: delay: 0 dispatcher: FALLBACK /transform/wikitext/to/lint/{title}/{revision}: post: tags: - Transforms summary: Wikimedia REST Check Wikitext for Lint Errors description: 'Parse the supplied wikitext and check it for lint errors. - Stability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental) - Rate limit: 25 req/s ' requestBody: content: multipart/form-data: schema: required: - wikitext properties: wikitext: type: string description: The Wikitext to check x-textarea: true required: true responses: '200': description: Linter errors, if any, as a JSON blob content: application/json: schema: type: object '404': description: Unknown page title content: application/problem+json: schema: $ref: '#/components/schemas/problem' '409': description: Latest revision was restricted content: application/problem+json: schema: $ref: '#/components/schemas/problem' '410': description: Page was deleted content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: revision in: path description: The page revision required: true schema: type: integer x-microcks-operation: delay: 0 dispatcher: FALLBACK /transform/wikitext/to/mobile-html/{title}: post: tags: - Transforms summary: Wikimedia REST Transform Wikitext to Mobile HTML description: 'Transform wikitext to Mobile HTML. - Stability: [stable](https://www.mediawiki.org/wiki/Wikimedia_Product/Wikimedia_Product_Infrastructure_team/API_endpoint_stability_policy#Stable) - Rate limit: 25 req/s (5 req/s when `stash: true`) Please follow [wikitech-l](https://lists.wikimedia.org/mailman/listinfo/wikitech-l) or [mediawiki-api-announce](https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce) for announcements of breaking changes. ' parameters: - name: title in: path description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.' required: true schema: type: string - name: Accept-Language in: header description: 'The desired language variant code for wikis where LanguageConverter is enabled. Example: `sr-el` for Latin transcription of the Serbian language. ' schema: type: string - name: output-mode in: header description: Output mode for mobile-html. Default is `editPreview`. required: false schema: type: string enum: - editPreview - contentAndReferences - content - references requestBody: content: multipart/form-data: schema: required: - wikitext properties: wikitext: type: string description: The Wikitext to transform to HTML x-textarea: true required: true responses: '200': description: See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec content: text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Mobile-HTML/1.0.0": schema: type: string '404': description: Unknown page title content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' operationId: transformWikitextToMobileHtml x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /media/math/check/{type}: post: deprecated: true tags: - Math summary: Wikimedia REST Check and Normalize a TeX Formula. description: 'Checks the supplied TeX formula for correctness and returns the normalised formula representation as well as information about identifiers. Available types are tex and inline-tex. The response contains the `x-resource-location` header which can be used to retrieve the render of the checked formula in one of the supported rendering formats. Just append the value of the header to `/media/math/{format}/` and perform a GET request against that URL. **NOTE**: the use of this endpoint is *strongly discouraged*. Instead, use the identical endpoint of the (canonical) Math API on the `wikimedia.org` domain. Stability: [deprecated](https://www.mediawiki.org/wiki/API_versioning#Deprecated). ' parameters: - name: type in: path description: The input type of the given formula; can be tex or inline-tex required: true schema: type: string enum: - tex - inline-tex - chem requestBody: content: multipart/form-data: schema: required: - q properties: q: type: string description: The formula to check required: true responses: '200': description: Information about the checked formula content: application/json: schema: type: object '400': description: Invalid type content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: true x-amples: - title: Mathoid - check test formula request: params: domain: wikimedia.org type: tex body: q: E=mc^{2} response: status: 200 headers: content-type: /^application\/json/ x-resource-location: /.+/ cache-control: no-cache body: success: true checked: /.+/ x-microcks-operation: delay: 0 dispatcher: FALLBACK /media/math/formula/{hash}: get: deprecated: true tags: - Math summary: Wikimedia REST Get a Previously-stored Formula description: 'Returns the previously-stored formula via `/media/math/check/{type}` for the given hash. **NOTE**: the use of this endpoint is *strongly discouraged*. Instead, use the identical endpoint of the (canonical) Math API on the `wikimedia.org` domain. Stability: [deprecated](https://www.mediawiki.org/wiki/API_versioning#Deprecated). ' parameters: - name: hash in: path description: The hash string of the previous POST data required: true schema: minLength: 1 type: string responses: '200': description: Information about the checked formula content: application/json: schema: type: object '404': description: Data for the given hash cannot be found content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /media/math/render/{format}/{hash}: get: deprecated: true tags: - Math summary: Wikimedia REST Get Rendered Formula in the Given Format. description: 'Given a request hash, renders a TeX formula into its mathematic representation in the given format. When a request is issued to the `/media/math/check/{format}` POST endpoint, the response contains the `x-resource-location` header denoting the hash ID of the POST data. Once obtained, this endpoint has to be used to obtain the actual render. **NOTE**: the use of this endpoint is *strongly discouraged*. Instead, use the identical endpoint of the (canonical) Math API on the `wikimedia.org` domain. Stability: [deprecated](https://www.mediawiki.org/wiki/API_versioning#Deprecated). ' parameters: - name: format in: path description: The output format; can be svg or mml required: true schema: type: string enum: - svg - mml - png - name: hash in: path description: The hash string of the previous POST data required: true schema: minLength: 1 type: string responses: '200': description: The rendered formula content: image/svg+xml: schema: type: string application/mathml+xml: schema: type: string '404': description: Unknown format or hash ID content: application/problem+json: schema: $ref: '#/components/schemas/problem' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/citation/{format}/{query}: get: tags: - Citation summary: Wikimedia REST Get Citation Data Given an Article Identifier. description: "Generates citation data given a URL, DOI, PMID, or PMCID.\n\nAutomated requests can be made at a rate of 1 request per second (rps).\n\nSee more at [Citoid service documentation](https://www.mediawiki.org/wiki/Citoid)\n\ \nThe citation data can be requested in one of the following formats:\n - `mediawiki`: format designed for MediaWiki to be used with `templateData`.\n Uses [Zotero field names](https://aurimasv.github.io/z2csl/typeMap.xml).\n\ \ - `mediawiki-basefields`: `mediawiki` format with Zotero `basefield` field names.\n - `zotero`: format used by [Zotero](https://www.zotero.org/).\n - `bibtex`: format used in conjunction with LaTeX documents.\n See [bibtex.org](http://www.bibtex.org/).\n - `wikibase`: format designed for [Wikibase](https://www.mediawiki.org/wiki/Extension:Wikibase_Repository).\n\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n" parameters: - name: format in: path description: The format to use for the resulting citation data schema: type: string enum: - mediawiki - mediawiki-basefields - zotero - bibtex - wikibase required: true - name: query in: path description: 'URL of an article, DOI, PMCID or PMID in the URL-encoded format. Note that on the Swagger-UI doc page you don''t need to URI-encode the parameter manually, it will be done by the docs engine. ' required: true schema: type: string - name: Accept-Language in: header description: 'For some articles the result depends on the `Accept-Language` header, so provide it if localized content is required. ' schema: type: string responses: '200': description: The citation data in the requested format content: application/json; charset=utf-8;: schema: $ref: '#/components/schemas/result' application/x-bibtex; charset=utf-8: schema: $ref: '#/components/schemas/result' '404': description: Citation data was not found. content: application/problem+json: schema: $ref: '#/components/schemas/problem' operationId: getCitation x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/lists/setup: post: tags: - Reading lists summary: Wikimedia REST Opt in to Use Reading Lists. description: 'Must precede other list operations. Request must be authenticated with a MediaWiki session cookie. Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) ' parameters: - name: csrf_token in: query required: true schema: type: string example: f63c343876da566045e6b59c4532450559c828d3+\ description: The CRSF edit token provided by the MediaWiki API responses: '200': description: Success. content: application/json; charset=utf-8: schema: type: object default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/lists/teardown: post: tags: - Reading lists summary: Wikimedia REST Opt Out from Using Reading Lists. description: 'Deletes all data. User needs to opt in again before being able to do anything. Request must be authenticated with a MediaWiki session cookie. Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) ' parameters: - name: csrf_token in: query required: true schema: type: string example: f63c343876da566045e6b59c4532450559c828d3+\ description: The CRSF edit token provided by the MediaWiki API responses: '200': description: Success. content: application/json; charset=utf-8: schema: type: object default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/lists/: get: tags: - Reading lists summary: Wikimedia REST Get All Lists of the Current User. description: 'Returns metadata describing the lists of the current user. Might be truncated and include a continuation token. Request must be authenticated with a MediaWiki session cookie. Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) ' parameters: - name: next in: query description: Continuation parameter from previous request schema: type: string - name: sort in: query description: 'Sort order - `name`: by name, ascending; - `updated`: by last modification date, descending. ' schema: type: string default: updated enum: - name - updated responses: '200': description: An array of list metadata. content: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Lists/0.1": schema: type: object properties: lists: type: array items: $ref: '#/components/schemas/list_read' next: type: string description: Continuation token. continue-from: type: string format: date-time description: 'Timestamp to sync from, to be used with the `GET /lists/changes/since/{date}` endpoint. ' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK post: tags: - Reading lists summary: Wikimedia REST Create a New List for the Current User. description: 'Creates a new empty list. On name conflict, does nothing and returns the data of an existing list. Request must be authenticated with a MediaWiki session cookie. Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) This endpoint is deprecated and might be removed without warning. Use the batch version instead. ' x-maxsize: 5000 parameters: - name: csrf_token in: query required: true schema: type: string example: f63c343876da566045e6b59c4532450559c828d3+\ description: The CRSF edit token provided by the MediaWiki API requestBody: content: '*/*': schema: $ref: '#/components/schemas/list_write' required: true responses: '200': description: The data for the new list. content: application/json; charset=utf-8: schema: type: object properties: id: type: integer description: 'List ID. Deprecated, will be removed. Use the full list object. ' example: 7 list: $ref: '#/components/schemas/list_read' required: - id - list default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/lists/{id}: put: tags: - Reading lists summary: Wikimedia REST Update a List. description: 'List must belong to current user and request must be authenticated with a MediaWiki session cookie. If the name is changed, the new name must not be in use. Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) ' parameters: - name: id in: path required: true schema: type: integer example: 42 - name: csrf_token in: query required: true schema: type: string example: f63c343876da566045e6b59c4532450559c828d3+\ description: The CRSF edit token provided by the MediaWiki API requestBody: content: '*/*': schema: $ref: '#/components/schemas/list_write' required: false responses: '200': description: The updated data for the list. content: application/json; charset=utf-8: schema: type: object properties: id: type: integer description: 'List ID. Deprecated, will be removed. Use the full list object. ' example: 7 list: $ref: '#/components/schemas/list_read' required: - id - list default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: tags: - Reading lists summary: Wikimedia REST Delete a List. description: 'List must belong to current user and request must be authenticated with a MediaWiki session cookie. Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) ' parameters: - name: id in: path required: true schema: type: integer example: 42 responses: '200': description: Success. content: application/json; charset=utf-8: schema: type: object default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/lists/batch: post: tags: - Reading lists summary: Wikimedia REST Create Multiple New Lists for the Current User. description: 'See `POST /lists/`. Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) ' x-maxsize: 5000 parameters: - name: csrf_token in: query required: true schema: type: string example: f63c343876da566045e6b59c4532450559c828d3+\ description: The CRSF edit token provided by the MediaWiki API requestBody: content: '*/*': schema: title: batch required: - batch type: object properties: batch: maxItems: 500 type: array items: $ref: '#/components/schemas/list_write' required: true responses: '200': description: The data for the new lists (in the same order as the inputs). content: application/json; charset=utf-8: schema: title: list_create_batch type: object properties: batch: type: array description: Deprecated, will be removed. Use the full list objects instead. items: title: list_id type: object required: - id properties: id: type: integer description: List ID example: 7 lists: type: array items: $ref: '#/components/schemas/list_read' required: - batch - lists default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/lists/{id}/entries/: get: tags: - Reading lists summary: Wikimedia REST Get All Entries of a Given List. description: 'Returns pages contained by the given list. Might be truncated and include a continuation token. List must belong to current user and request must be authenticated with a MediaWiki session cookie. Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) ' parameters: - name: id in: path required: true schema: type: integer example: 42 - name: next in: query description: Continuation parameter from previous request schema: type: string - name: sort in: query description: 'Sort order - `name`: by page title, ascending; - `updated`: by last modification date, descending. ' schema: type: string default: updated enum: - name - updated responses: '200': description: An array of list entries. content: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Lists/0.1": schema: type: object properties: entries: type: array items: $ref: '#/components/schemas/list_entry_read' next: type: string description: Continuation token. default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' operationId: getListEntries x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK post: tags: - Reading lists summary: Wikimedia REST Create a New List Entry. description: 'Creates a new list entry in the given list. On conflict, does nothing and returns the data of an existing list. The list must belong to the current user and the request must be authenticated with a MediaWiki session cookie. Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) This endpoint is deprecated and might be removed without warning. Use the batch version instead. ' x-maxsize: 100 parameters: - name: id in: path required: true schema: type: integer example: 42 - name: csrf_token in: query required: true schema: type: string example: f63c343876da566045e6b59c4532450559c828d3+\ description: The CRSF edit token provided by the MediaWiki API requestBody: content: '*/*': schema: $ref: '#/components/schemas/list_entry_write' required: true responses: '200': description: The data for the new list entry. content: application/json; charset=utf-8: schema: type: object properties: id: type: integer description: 'List entry ID Deprecated, will be removed. Use the full entry object instead. ' example: 13 entry: $ref: '#/components/schemas/list_entry_read' required: - id - entry default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/lists/{id}/entries/{entry_id}: delete: tags: - Reading lists summary: Wikimedia REST Delete a List Entry. description: 'Deletes a given list entry. The list must belong to the current user and the request must be authenticated with a MediaWiki session cookie. Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) ' parameters: - name: id in: path required: true schema: type: integer example: 42 - name: entry_id in: path required: true schema: type: integer example: 64 responses: '200': description: Success. content: application/json; charset=utf-8: schema: type: object default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/lists/{id}/entries/batch: post: tags: - Reading lists summary: Wikimedia REST Create Multiple New List Entries. description: 'See `POST /lists/{id}/entries/`. Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) ' x-maxsize: 100 parameters: - name: id in: path required: true schema: type: integer example: 42 - name: csrf_token in: query required: true schema: type: string example: f63c343876da566045e6b59c4532450559c828d3+\ description: The CRSF edit token provided by the MediaWiki API requestBody: content: '*/*': schema: type: object required: - batch properties: batch: title: list_entries type: array maxItems: 500 items: $ref: '#/components/schemas/list_entry_write' required: true responses: '200': description: The data for the new list entries (in the same order as the inputs). content: application/json; charset=utf-8: schema: type: object properties: batch: type: array items: type: object properties: id: type: integer description: List entry ID example: 13 entries: type: array items: $ref: '#/components/schemas/list_entry_read' required: - entries - batch default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/lists/pages/{project}/{title}: get: tags: - Reading lists summary: Wikimedia REST Get Lists of the Current User Which Contain a Given Page. description: 'Request must be authenticated with a MediaWiki session cookie. Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) ' parameters: - name: project in: path schema: type: string description: Domain of the wiki containing the page. example: https://en.wikipedia.org required: true - name: title in: path schema: type: string description: Title of the page containing the page, in database format. example: Barack_Obama required: true - name: next in: query description: Continuation parameter from previous request schema: type: string responses: '200': description: An array of list metadata. content: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Lists/0.1": schema: type: object properties: lists: type: array items: $ref: '#/components/schemas/list_read' next: type: string description: Continuation token. default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/lists/changes/since/{date}: get: tags: - Reading lists summary: Wikimedia REST Get Recent Changes to the Lists description: 'Returns metadata describing lists and entries which have changed. Might be truncated and include a continuation token. Request must be authenticated with a MediaWiki session cookie. For safe synchronization, the date parameter should be taken from the `continue-from` field of a previous `GET /lists/` or `GET /lists/changes/since/{date}` request. This will ensure that no changes are skipped, at the cost of sometimes receiving the same change multitple times. Clients should handle changes in an idempotent way. Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) ' parameters: - name: date in: path description: 'Cutoff date (in ISO 8601). To ensure reliable synchronization, the API might return changes which are slightly older than the cutoff date. ' schema: type: string format: date-time required: true - name: next in: query description: Continuation parameter from previous request schema: type: string responses: '200': description: An array of list and entry metadata. content: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Lists/0.1": schema: type: object properties: lists: type: array items: $ref: '#/components/schemas/list_read' next: type: string description: Continuation token. continue-from: type: string format: date-time description: 'Timestamp to sync from, to be used with the `GET /lists/changes/since/{date}` endpoint. ' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/recommendation/article/creation/translation/{from_lang}: get: tags: - Recommendation summary: Wikimedia REST Recommend Articles for Translation. description: 'Recommends articles to be translated from the source to the domain language. See more at [Recommendation API documentation](https://meta.wikimedia.org/wiki/Recommendation_API) Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) ' parameters: - name: from_lang in: path description: The source language code required: true schema: type: string - name: count in: query description: The max number of articles to return schema: type: integer default: 24 responses: '200': description: the list of articles recommended for translation content: application/json: schema: $ref: '#/components/schemas/recommendation_result' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/recommendation/article/creation/translation/{from_lang}/{seed_article}: get: tags: - Recommendation summary: Wikimedia REST Recommend Articles for Translation. description: 'Recommends articles to be translated from the source to the domain language. See more at [Recommendation API documentation](https://meta.wikimedia.org/wiki/Recommendation_API) Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) ' parameters: - name: from_lang in: path description: The source language code required: true schema: type: string - name: seed_article in: path description: The article to use as a search seed required: true schema: type: string - name: count in: query description: The max number of articles to return schema: type: integer default: 24 responses: '200': description: the list of articles recommended for translation content: application/json: schema: $ref: '#/components/schemas/recommendation_result' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/recommendation/article/creation/morelike/{seed_article}: get: tags: - Recommendation summary: Wikimedia REST Recommend Missing Articles description: 'Recommends articles similar to the seed article but are missing from the domain language Wikipedia. Stability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable) ' parameters: - name: seed_article in: path description: The article title used to search similar but missing articles required: true schema: type: string responses: '200': description: the prioritized list of Wikidata IDs recommended for creation as Wikipedia articles content: application/json: schema: $ref: '#/components/schemas/morelike_result' default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/css/mobile/{type}: get: tags: - Mobile summary: Wikimedia REST Get CSS for Mobile Apps. description: 'Gets common CSS mobile apps need to properly display pages using Page Content Service. In most cases all of the types are needed (preferably in this order): * base (Common mobile CSS from ResourceLoader) * site (Site-specific, mobile CSS from ResourceLoader, as defined in MediaWiki\:Mobile.css) * pcs (CSS for the Page Content Service) The `base` and `pcs` responses are the same regardless of what domain is used. For these we suggest meta.wikimedia.org. You can still pass pagelib for type, but this is a legacy version of the CSS for existing app clients. Stability: [unstable](https://www.mediawiki.org/wiki/Wikimedia_Product/Wikimedia_Product_Infrastructure_team/API_endpoint_stability_policy#Unstable) Please follow [wikitech-l](https://lists.wikimedia.org/mailman/listinfo/wikitech-l) or [mediawiki-api-announce](https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce) for announcements of breaking changes. ' parameters: - name: type in: path description: The desired CSS bundle schema: type: string enum: - base - pagelib - pcs - site required: true responses: '200': description: Success headers: ETag: description: Different values indicate that the content has changed schema: type: string content: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/CSS/1.0.0": schema: type: object default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/javascript/mobile/{type}: get: tags: - Mobile summary: Wikimedia REST Get JavaScript for Mobileapps description: 'Gets the JavaScript bundle so that clients can have convenient access to that for consuming the page HTML. Amongst other things, * it allows to detect the platform and through that enable platform specific CSS rules, * has code to lazy load images on the page, * code for collapsing and expanding tables. Valid types are pagelib or pcs. Passing pcs will return the JavaScript for the Page Content Service. Passing pagelib will return a deprecated legacy version of the wikimedia-page-library JavaScript to support existing app clients. Stability: [unstable](https://www.mediawiki.org/wiki/Wikimedia_Product/Wikimedia_Product_Infrastructure_team/API_endpoint_stability_policy#Unstable) Please follow [wikitech-l](https://lists.wikimedia.org/mailman/listinfo/wikitech-l) or [mediawiki-api-announce](https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce) for announcements of breaking changes. ' parameters: - name: type in: path description: The desired JavaScript bundle schema: type: string enum: - pagelib - pcs required: true responses: '200': description: Success headers: ETag: description: Different values indicate that the content has changed schema: type: string content: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/JavaScript/1.0.0": schema: type: object default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK /data/i18n/{type}: get: tags: - Mobile summary: Wikimedia REST Get Internationalization Info description: 'Gets internationalization information for the given site. Currently the only supported type is pcs for the Page Content Service. Stability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental) ' parameters: - name: type in: path description: The desired internationalization bundle schema: type: string enum: - pcs required: true responses: '200': description: Success headers: ETag: description: Different values indicate that the content has changed schema: type: string content: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/i18n/0.0.1": schema: type: object default: description: Error content: application/problem+json: schema: $ref: '#/components/schemas/problem' x-monitor: false x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: revisions: description: The result format for revision listing required: - items type: object properties: items: $ref: '#/components/schemas/revisionIdentifier' listing: description: The result format for listings required: - items type: object properties: items: type: array items: type: string _links: type: object properties: next: type: object properties: href: type: string description: Relative link to next result page. revision: description: Result format for revision items required: - count - items type: object properties: count: type: integer format: int32 items: $ref: '#/components/schemas/revisionInfo' revisionInfo: type: object description: Complete information about the revision properties: title: type: string page_id: type: integer format: int32 rev: type: integer format: int32 tid: type: string comment: type: string restrictions: type: array items: type: string tags: type: array items: type: string user_id: type: integer format: int32 user_text: type: string timestamp: type: string format: date-time redirect: type: boolean page_language: type: string revisionIdentifier: type: object description: Unique revision identifier properties: revision: type: integer format: int32 tid: type: string titles_set: type: object properties: canonical: type: string description: the DB key (non-prefixed), e.g. may have _ instead of spaces, best for making request URIs, still requires Percent-encoding normalized: type: string description: the normalized title (https://www.mediawiki.org/wiki/API:Query#Example_2:_Title_normalization), e.g. may have spaces instead of _ display: type: string description: the title as it should be displayed to the user required: - canonical - normalized - display description: a good example of the differences can be seen in https://en.wikipedia.org/api/rest_v1/page/summary/IOS_13 media_list: type: object properties: revision: type: string description: the revision ID used to create the list tid: type: string description: the time uuid of the page rendering used to create the list items: type: array description: a list of media items items: $ref: '#/components/schemas/media_item' required: - items - revision - tid media_item: type: object properties: title: type: string description: The file page title type: type: string enum: - image - video - audio section_id: type: integer description: section ID in which the item is found on the page showInGallery: type: boolean description: whether the client should show the file in an image gallery presentation caption: type: object properties: html: type: string description: on-wiki caption for the media item, including all HTML markup text: type: string description: plain text of the on-wiki caption for the media item original: type: object description: reference to a Mathoid-rendered math formula image properties: source: type: string description: Mathoid image render URL mime: type: string description: the Mathoid image mime type required: - type - section_id - showInGallery problem: required: - type type: object properties: type: type: string title: type: string detail: type: string instance: type: string originalimage: type: object properties: source: type: string description: Original image URI width: type: integer description: Original image width height: type: integer description: Original image height required: - height - source - width thumbnail: type: object properties: source: type: string description: Thumbnail image URI width: type: integer description: Thumbnail width height: type: integer description: Thumnail height required: - height - source - width summary: type: object properties: titles: $ref: '#/components/schemas/titles_set' title: deprecated: true type: string description: 'The page title. Deprecated: Use `titles.normalized` instead. ' displaytitle: deprecated: true type: string description: 'The page title how it should be shown to the user. Deprecated: Use `titles.display` instead. ' pageid: type: integer description: The page ID extract: type: string description: First several sentences of an article in plain text extract_html: type: string description: First several sentences of an article in simple HTML format thumbnail: $ref: '#/components/schemas/thumbnail' originalimage: $ref: '#/components/schemas/originalimage' lang: type: string description: The page language code example: en dir: type: string description: The page language direction code example: ltr timestamp: type: string description: The time when the page was last edited in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format example: {} description: type: string description: Wikidata description for the page example: American poet coordinates: type: object description: The coordinates of the item properties: lat: type: number description: The latitude lon: type: number description: The longitude required: - lat - lon required: - dir - extract - lang - titles cx_mt: type: object properties: contents: type: string description: the translated content cx_dict: type: object properties: source: type: string description: the original word to look up translations: type: array description: the translations found items: type: object properties: phrase: type: string description: the translated phrase info: type: string description: extra information about the phrase sources: type: string description: the source dictionary used for the translation result: required: - title - url - itemType type: object properties: itemType: type: string title: type: string url: type: string list_read: title: list type: object properties: id: type: integer example: 42 name: type: string example: Planets description: type: string example: Planets of the Solar System created: type: string format: date-time description: Creation date (in ISO 8601) updated: type: string format: date-time description: Last modification date (in ISO 8601) required: - id - name - created - updated list_write: title: list type: object properties: name: type: string example: Planets description: type: string example: Planets of the Solar System required: - name list_entry_read: title: list_entry type: object properties: id: type: integer example: 64 project: type: string description: Domain of the wiki containing the page. example: https://en.wikipedia.org title: type: string description: Title of the page containing the page, in database format. example: Barack_Obama created: type: string format: date-time description: Creation date (in ISO 8601) updated: type: string format: date-time description: Last modification date (in ISO 8601) list_entry_write: type: object properties: project: type: string description: Domain of the wiki containing the page. example: https://en.wikipedia.org title: type: string description: Title of the page containing the page, in database format. example: Barack_Obama required: - project - title recommendation_result: type: object properties: count: type: integer description: the number of recommendations returned items: type: array description: the list of articles recommended for translation items: type: object properties: wikidata_id: type: string description: wikidata id for the item title: type: string description: title of the article in the source language sitelink_count: type: integer description: count of sites the wikidata item is linked to morelike_result: type: array description: the prioritized list of Wikidata IDs recommended for creation as Wikipedia articles items: type: object properties: wikidata_id: type: string description: Wikidata ID for the item score: type: number description: Score of the recommendation. The higher the score, the more important the recommendation is. source_language: type: string description: Source of the recommendation -- which wiki is recommending the current article. x-default-params: {} tags: - name: Page content description: page content in different formats - name: Transforms description: convert content between HTML and Wikitext - name: Math description: formula rendering - name: Citation description: generation of citation data - name: Reading lists description: Private lists of selected pages externalDocs: description: Project documentation url: https://www.mediawiki.org/wiki/Reading/Reading_Lists - name: Recommendation description: contribution recommendations servers: - url: https://en.wikipedia.org/api/rest_v1 description: English Wikipedia REST v1 endpoint - url: https://{lang}.wikipedia.org/api/rest_v1 description: Per-language Wikipedia REST v1 endpoint variables: lang: default: en description: Language code (e.g. en, de, fr, es, ja)