{
  "swagger": "2.0",
  "schemes": [
    "http"
  ],
  "host": "rest.wikimedia.org",
  "basePath": "/en.wikipedia.org/v1",
  "info": {
    "contact": {
      "name": "the Wikimedia Services team",
      "url": "http://mediawiki.org/wiki/RESTBase"
    },
    "description": "This API aims to provide coherent and low-latency access to Wikimedia content and services. It is currently in beta testing, so things aren't completely locked down yet. Each entry point has explicit stability markers to inform you about development status and change policy, according to [our API version policy](https://www.mediawiki.org/wiki/API_versioning).\n### High-volume access\n  - Don't perform more than 200 requests/s to this API.\n  - Set a unique `User-Agent` header that allows us to contact you\n    quickly. Email addresses or URLs of contact pages work well.\n",
    "license": {
      "name": "Apache2",
      "url": "http://www.apache.org/licenses/LICENSE-2.0"
    },
    "termsOfService": "https://wikimediafoundation.org/wiki/Terms_of_Use",
    "title": "Wikimedia",
    "version": "1.0.0-beta",
    "x-logo": {
      "url": "https://apis-guru.github.io/api-models/cache/wikimedia.org/1.0.0-beta/logo.png"
    },
    "x-origin": {
      "format": "swagger",
      "url": "http://rest.wikimedia.org/en.wikipedia.org/v1/?spec",
      "version": "2.0"
    },
    "x-providerName": "wikimedia.org"
  },
  "securityDefinitions": {
    "mediawiki_auth": {
      "description": "Checks permissions using MW api",
      "in": "header",
      "name": "cookie",
      "type": "apiKey",
      "x-internal-request-whitelist": [
        "/https?:\\/\\/[a-zA-Z0-9\\.]+\\/w\\/api\\.php/",
        "http://parsoid-lb.eqiad.wikimedia.org",
        "http://parsoid-beta.wmflabs.org"
      ]
    }
  },
  "paths": {
    "/media/math/check/{type}": {
      "post": {
        "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.\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#unstable).\n",
        "parameters": [
          {
            "description": "The input type of the given formula; can be tex or inline-tex",
            "enum": [
              "tex",
              "inline-tex"
            ],
            "in": "path",
            "name": "type",
            "required": true,
            "type": "string"
          },
          {
            "description": "The formula to check",
            "in": "formData",
            "name": "q",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Information about the checked formula"
          },
          "400": {
            "description": "Invalid type",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Math"
        ],
        "x-amples": [
          {
            "request": {
              "body": {
                "q": "E=mc^{2}"
              },
              "params": {
                "type": "tex"
              }
            },
            "response": {
              "body": {
                "checked": "/.+/",
                "success": true
              },
              "headers": {
                "cache-control": "/s-maxage/",
                "content-type": "/^application\\/json/",
                "x-resource-location": "/.+/"
              },
              "status": 200
            },
            "title": "Mathoid - check test formula"
          }
        ],
        "x-monitor": true,
        "x-request-handler": [
          {
            "check_input": {
              "request": {
                "body": {
                  "q": "{{ request.body.q }}",
                  "type": "{{ request.params.type }}"
                },
                "headers": {
                  "content-type": "application/json"
                },
                "uri": "{{ options.host }}/texvcinfo"
              }
            }
          },
          {
            "post_store": {
              "request": {
                "body": {
                  "q": "{{ check_input.body.checked }}",
                  "type": "{{ request.params.type }}"
                },
                "headers": {
                  "content-type": "application/json"
                },
                "method": "put",
                "uri": "/wikimedia.org/sys/post_data/mathoid.input/"
              },
              "return": {
                "body": "{{ check_input.body }}",
                "headers": {
                  "cache-control": "{{ options.cache-control }}",
                  "content-type": "application/json",
                  "x-resource-location": "{{ post_store.body }}"
                },
                "status": 200
              }
            }
          }
        ],
        "x-setup-handler": [
          {
            "init": {
              "method": "put",
              "uri": "/wikimedia.org/sys/post_data/mathoid.input"
            }
          }
        ]
      }
    },
    "/media/math/render/{format}/{hash}": {
      "get": {
        "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.\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#unstable).\n",
        "parameters": [
          {
            "description": "The output format; can be svg or mml",
            "enum": [
              "svg",
              "mml"
            ],
            "in": "path",
            "name": "format",
            "required": true,
            "type": "string"
          },
          {
            "description": "The hash string of the previous POST data",
            "in": "path",
            "name": "hash",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "image/svg+xml",
          "application/mathml+xml"
        ],
        "responses": {
          "200": {
            "description": "The rendered formula"
          },
          "404": {
            "description": "Unknown format or hash ID",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Math"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "check_storage": {
              "catch": {
                "status": 404
              },
              "request": {
                "headers": {
                  "cache-control": "{{ cache-control }}"
                },
                "method": "get",
                "uri": "/wikimedia.org/sys/key_value/mathoid.{$.request.params.format}/{$.request.params.hash}"
              },
              "return": {
                "body": "{{ check_storage.body }}",
                "headers": "{{ merge({ 'cache-control': options.cache-control }, check_storage.headers) }}",
                "status": 200
              },
              "return_if": {
                "status": "2xx"
              }
            }
          },
          {
            "postdata": {
              "request": {
                "uri": "/wikimedia.org/sys/post_data/mathoid.input/{$.request.params.hash}"
              }
            }
          },
          {
            "mathoid": {
              "request": {
                "body": "{{postdata.body}}",
                "headers": {
                  "content-type": "application/json"
                },
                "method": "post",
                "uri": "{{options.host}}/complete"
              }
            }
          },
          {
            "store_mml": {
              "request": {
                "body": "{{ mathoid.body.mml.body }}",
                "headers": "{{ merge(mathoid.body.mml.headers, { 'x-resource-location': request.params.hash }) }}",
                "method": "put",
                "uri": "/wikimedia.org/sys/key_value/mathoid.mml/{$.request.params.hash}"
              }
            },
            "store_svg": {
              "request": {
                "body": "{$.mathoid.body.svg.body}",
                "headers": "{{ merge(mathoid.body.svg.headers, { 'x-resource-location': request.params.hash }) }}",
                "method": "put",
                "uri": "/wikimedia.org/sys/key_value/mathoid.svg/{$.request.params.hash}"
              }
            }
          },
          {
            "return": {
              "return": {
                "body": "{{ mathoid.body[request.params.format].body }}",
                "headers": "{{ merge(mathoid.body[request.params.format].headers, { 'x-resource-location': request.params.hash, 'cache-control': options.cache-control }) }}",
                "status": 200
              }
            }
          }
        ],
        "x-setup-handler": [
          {
            "init_svg": {
              "body": {
                "keyType": "string",
                "valueType": "string"
              },
              "method": "put",
              "uri": "/wikimedia.org/sys/key_value/mathoid.svg"
            }
          },
          {
            "init_mml": {
              "body": {
                "keyType": "string",
                "valueType": "string"
              },
              "method": "put",
              "uri": "/wikimedia.org/sys/key_value/mathoid.mml"
            }
          }
        ]
      }
    },
    "/page/": {
      "get": {
        "description": "List page properties / page content sub-apis.\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Stable)\n",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The queriable sub-items",
            "schema": {
              "$ref": "#/definitions/listing"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-monitor": false
      }
    },
    "/page/data-parsoid/": {
      "get": {
        "description": "List titles for which the data-parsoid property is available. This currently only lists pages which have revisions stored in RESTBase.\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The next page token",
            "in": "query",
            "name": "page",
            "required": false,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The queriable list of page titles",
            "schema": {
              "$ref": "#/definitions/listing"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "query": {
                  "page": "{page}"
                },
                "uri": "/{domain}/sys/page_revisions/page/"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/data-parsoid/{title}": {
      "get": {
        "description": "Retrieve the latest data-parsoid (private Parsoid metadata)\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "the title of page content",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "data-parsoid JSON blob",
            "schema": {
              "$ref": "#/definitions/data-parsoid"
            }
          },
          "404": {
            "description": "Unknown page title",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-amples": [
          {
            "request": {
              "params": {
                "title": "Foobar"
              }
            },
            "response": {
              "body": {
                "counter": "/\\d+/",
                "ids": "/.*/",
                "sectionOffsets": "/.*/"
              },
              "headers": {
                "content-type": "application/json",
                "etag": "/.+/"
              },
              "status": 200
            },
            "title": "Get data-parsoid by title"
          }
        ],
        "x-monitor": true,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "headers": {
                  "cache-control": "{cache-control}",
                  "if-unmodified-since": "{if-unmodified-since}",
                  "x-restbase-mode": "{x-restbase-mode}",
                  "x-restbase-parentrevision": "{x-restbase-parentrevision}"
                },
                "uri": "/{domain}/sys/parsoid/data-parsoid/{title}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/data-parsoid/{title}/": {
      "get": {
        "description": "List data-parsoid revisions for a page. This currently only lists revisions stored in RESTBase.\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The next page token",
            "in": "query",
            "name": "page",
            "required": false,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of revisions",
            "schema": {
              "$ref": "#/definitions/revisions"
            }
          },
          "404": {
            "description": "Unknown page title",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "query": {
                "page": "{page}"
              },
              "request": {
                "headers": {
                  "cache-control": "{cache-control}",
                  "if-unmodified-since": "{if-unmodified-since}",
                  "x-restbase-mode": "{x-restbase-mode}",
                  "x-restbase-parentrevision": "{x-restbase-parentrevision}"
                },
                "uri": "/{domain}/sys/parsoid/data-parsoid/{title}/"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/data-parsoid/{title}/{revision}": {
      "get": {
        "description": "Retrieve data-parsoid (internal Parsoid metadata) for a given page & revision\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The revision",
            "in": "path",
            "name": "revision",
            "required": true,
            "type": "integer"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The latest Parsoid data for the given page",
            "schema": {
              "$ref": "#/definitions/data-parsoid"
            }
          },
          "400": {
            "description": "Invalid revision",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "403": {
            "description": "Access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page, revision or tid",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "headers": {
                  "cache-control": "{cache-control}",
                  "if-unmodified-since": "{if-unmodified-since}",
                  "x-restbase-mode": "{x-restbase-mode}",
                  "x-restbase-parentrevision": "{x-restbase-parentrevision}"
                },
                "uri": "/{domain}/sys/parsoid/data-parsoid/{title}/{revision}{/tid}"
              },
              "return": true
            }
          }
        ]
      },
      "parameters": []
    },
    "/page/data-parsoid/{title}/{revision}/{tid}": {
      "get": {
        "description": "Retrieve data-parsoid (internal Parsoid metadata) for a given page & revision\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The revision",
            "in": "path",
            "name": "revision",
            "required": true,
            "type": "integer"
          },
          {
            "description": "The revision's time ID",
            "in": "path",
            "name": "tid",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The latest Parsoid data for the given page",
            "schema": {
              "$ref": "#/definitions/data-parsoid"
            }
          },
          "400": {
            "description": "Invalid revision",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "403": {
            "description": "Access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page, revision or tid",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "headers": {
                  "cache-control": "{cache-control}",
                  "if-unmodified-since": "{if-unmodified-since}",
                  "x-restbase-mode": "{x-restbase-mode}",
                  "x-restbase-parentrevision": "{x-restbase-parentrevision}"
                },
                "uri": "/{domain}/sys/parsoid/data-parsoid/{title}/{revision}{/tid}"
              },
              "return": true
            }
          }
        ]
      },
      "parameters": []
    },
    "/page/graph/png/{title}/{revision}/{graph_id}": {
      "get": {
        "description": "Retrieve PNG graph images embedded in specific revisions of a page. See [the Graphoid documentation](https://www.mediawiki.org/wiki/Extension:Graph#Graphoid_service) for details.\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The page revision, or 0 for the latest",
            "in": "path",
            "name": "revision",
            "required": true,
            "type": "integer"
          },
          {
            "description": "The graph ID, consisting of a hash and the suffix `.png`.",
            "in": "path",
            "name": "graph_id",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "image/png"
        ],
        "responses": {
          "200": {
            "description": "The PNG render of the requested graph."
          },
          "403": {
            "description": "access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page title or revision",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-amples": [
          {
            "request": {
              "params": {
                "domain": "en.wikipedia.org",
                "graph_id": "c1c5d432407bd5fd7435f5edfb6fdb73ffd4bc9e.png",
                "revision": 0,
                "title": "User:Pchelolo/Graph"
              }
            },
            "response": {
              "headers": {
                "content-type": "image/png"
              },
              "status": 200
            },
            "title": "Get a graph from Graphoid"
          }
        ],
        "x-monitor": true,
        "x-request-handler": [
          {
            "get_from_graphoid": {
              "request": {
                "uri": "{+ $$.options.host }/{domain}/v1/png/{title}/{revision}/{graph_id}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/html/": {
      "get": {
        "description": "List titles for which an HTML representation is available. Currently this only lists pages that have revisions stored in RESTBase.\nStability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental)\n",
        "parameters": [
          {
            "description": "The next page token",
            "in": "query",
            "name": "page",
            "required": false,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The queriable list of page titles",
            "schema": {
              "$ref": "#/definitions/listing"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "query": {
                  "page": "{page}"
                },
                "uri": "/{domain}/sys/page_revisions/page/"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/html/{title}": {
      "get": {
        "description": "Retrieve the latest html for a page title available in storage.\nIf you know the revision as well, then please use the `{title}/{revision}` end point instead for better performance.\nSupply the `Cache-Control: no-cache` header to force a fetch of the most recent version.\nSee [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.\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title.",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "Comma-separated list of section IDs",
            "in": "query",
            "name": "sections",
            "type": "string"
          }
        ],
        "produces": [
          "text/html; profile=\"mediawiki.org/specs/html/1.1.0\""
        ],
        "responses": {
          "200": {
            "description": "The html for the given page title. Conforms to https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec.\n"
          },
          "404": {
            "description": "Unknown page title",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-amples": [
          {
            "request": {
              "params": {
                "title": "Foobar"
              }
            },
            "response": {
              "body": "/^<!DOCTYPE html>.*/",
              "headers": {
                "content-type": "/^text\\/html.+/",
                "etag": "/.+/"
              },
              "status": 200
            },
            "title": "Get html by title from storage"
          }
        ],
        "x-monitor": true,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "headers": {
                  "cache-control": "{cache-control}",
                  "if-unmodified-since": "{if-unmodified-since}",
                  "x-restbase-mode": "{x-restbase-mode}",
                  "x-restbase-parentrevision": "{x-restbase-parentrevision}"
                },
                "query": {
                  "sections": "{sections}"
                },
                "uri": "/{domain}/sys/parsoid/html/{title}"
              },
              "return": true
            }
          }
        ]
      },
      "post": {
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Save a new revision of a page given in HTML format.\nFor new pages, or when editting the latest revision of a page, the `base_etag` parameter should be left empty. For editing old revisions, it should contain the ETag header of the revision the edit is derived from.\nThe latest page revision ETag header could be provided in the If-Match header to detect edit conflicts. If the new page is created, appropriate user cookies must be provided.\nSee [the MediaWiki DOM spec](https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec) for a description of the MediaWiki-specific semantic markup needed by this API end-point.\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title.",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The ETag header of the revision the edit is based on.",
            "in": "formData",
            "name": "base_etag",
            "required": false,
            "type": "string"
          },
          {
            "description": "The HTML of the page to save",
            "in": "formData",
            "name": "html",
            "required": true,
            "type": "string"
          },
          {
            "description": "The CRSF edit token provided by the MW API",
            "in": "formData",
            "name": "csrf_token",
            "required": true,
            "type": "string"
          },
          {
            "description": "The summary of the change",
            "in": "formData",
            "name": "comment",
            "required": false,
            "type": "string"
          },
          {
            "description": "Whether this represents a minor change",
            "in": "formData",
            "name": "is_minor",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Whether the change is being made by a bot",
            "in": "formData",
            "name": "is_bot",
            "required": false,
            "type": "boolean"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The existing revision of the page matches the sent text"
          },
          "201": {
            "description": "A new revision of the page has been created"
          },
          "400": {
            "description": "Invalid request - lack of required parameters, bad ETags etc.",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "409": {
            "description": "Edit conflict",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "security": [
          {
            "mediawiki_auth": []
          }
        ],
        "tags": [
          "Page content"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "post_to_backend": {
              "request": {
                "body": "{$.request.body}",
                "headers": "{$.request.headers}",
                "uri": "/{domain}/sys/page_save/html/{title}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/html/{title}/": {
      "get": {
        "description": "List HTML revisions for a title. This currently only lists revisions that are already stored in RESTBase.\nStability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental)\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The next page token",
            "in": "query",
            "name": "page",
            "required": false,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The list of revisions",
            "schema": {
              "$ref": "#/definitions/revisions"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "headers": {
                  "cache-control": "{cache-control}",
                  "if-unmodified-since": "{if-unmodified-since}",
                  "x-restbase-mode": "{x-restbase-mode}",
                  "x-restbase-parentrevision": "{x-restbase-parentrevision}"
                },
                "query": {
                  "page": "{page}"
                },
                "uri": "/{domain}/sys/parsoid/html/{title}/"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/html/{title}/{revision}": {
      "get": {
        "description": "Retrieve the html for a given revision (and optional timeuuid).\nSee [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.\nThis 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.\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The revision",
            "in": "path",
            "name": "revision",
            "required": true,
            "type": "string"
          },
          {
            "description": "Comma-separated list of section IDs",
            "in": "query",
            "name": "sections",
            "type": "string"
          }
        ],
        "produces": [
          "text/html; profile=\"mediawiki.org/specs/html/1.1.0\""
        ],
        "responses": {
          "200": {
            "description": "The html for the given page, revision and tid. Conforms to https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec.\n"
          },
          "400": {
            "description": "Invalid revision or tid",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "403": {
            "description": "Access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page, revision or tid",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "headers": {
                  "cache-control": "{cache-control}",
                  "if-unmodified-since": "{if-unmodified-since}",
                  "x-restbase-mode": "{x-restbase-mode}",
                  "x-restbase-parentrevision": "{x-restbase-parentrevision}"
                },
                "query": {
                  "sections": "{sections}"
                },
                "uri": "/{domain}/sys/parsoid/html/{title}/{revision}{/tid}"
              },
              "return": true
            }
          }
        ]
      },
      "parameters": []
    },
    "/page/html/{title}/{revision}/{tid}": {
      "get": {
        "description": "Retrieve the html for a given revision (and optional timeuuid).\nSee [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.\nThis 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.\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The revision",
            "in": "path",
            "name": "revision",
            "required": true,
            "type": "string"
          },
          {
            "description": "The revision's time ID",
            "in": "path",
            "name": "tid",
            "required": true,
            "type": "string"
          },
          {
            "description": "Comma-separated list of section IDs",
            "in": "query",
            "name": "sections",
            "type": "string"
          }
        ],
        "produces": [
          "text/html; profile=\"mediawiki.org/specs/html/1.1.0\""
        ],
        "responses": {
          "200": {
            "description": "The html for the given page, revision and tid. Conforms to https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec.\n"
          },
          "400": {
            "description": "Invalid revision or tid",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "403": {
            "description": "Access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page, revision or tid",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "headers": {
                  "cache-control": "{cache-control}",
                  "if-unmodified-since": "{if-unmodified-since}",
                  "x-restbase-mode": "{x-restbase-mode}",
                  "x-restbase-parentrevision": "{x-restbase-parentrevision}"
                },
                "query": {
                  "sections": "{sections}"
                },
                "uri": "/{domain}/sys/parsoid/html/{title}/{revision}{/tid}"
              },
              "return": true
            }
          }
        ]
      },
      "parameters": []
    },
    "/page/mobile-sections-lead/{title}": {
      "get": {
        "description": "Retrieve the lead section of the latest HTML for a page title optimised for viewing with native mobile applications.\nStability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental). Don't rely on this.\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The HTML for the given page title."
          },
          "404": {
            "description": "Unknown page title",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Mobile"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "headers": {
                  "cache-control": "{cache-control}"
                },
                "method": "get",
                "uri": "/{domain}/sys/mobileapps/v1/handling/rev/mobile-sections-lead/{title}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/mobile-sections-remaining/{title}": {
      "get": {
        "description": "Retrieve the remainder of the latest HTML (without the lead section) for a page title optimised for viewing with native mobile applications, provided as a JSON object containing the sections.\nStability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental). Don't rely on this.\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The HTML for the given page title."
          },
          "404": {
            "description": "Unknown page title",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Mobile"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "headers": {
                  "cache-control": "{cache-control}"
                },
                "method": "get",
                "uri": "/{domain}/sys/mobileapps/v1/handling/rev/mobile-sections-remaining/{title}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/mobile-sections/{title}": {
      "get": {
        "description": "Retrieve the latest HTML for a page title optimised for viewing with native mobile applications. Note that the output is split by sections.\nStability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental). Don't rely on this.\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The HTML for the given page title."
          },
          "404": {
            "description": "Unknown page title",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Mobile"
        ],
        "x-amples": [
          {
            "request": {
              "params": {
                "domain": "en.wikipedia.org",
                "title": "Foobar"
              }
            },
            "response": {
              "body": {
                "lead": "/.+/",
                "remaining": "/.+/"
              },
              "headers": {
                "content-type": "/application\\/json/"
              },
              "status": 200
            },
            "title": "Get MobileApps Foobar page"
          }
        ],
        "x-monitor": true,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "headers": {
                  "cache-control": "{cache-control}"
                },
                "method": "get",
                "uri": "/{domain}/sys/mobileapps/v1/handling/rev/mobile-sections/{title}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/mobile-text/{title}": {
      "get": {
        "description": "Retrieve the *lite* version of the latest HTML for a page title optimised for viewing with native mobile applications.\nStability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental). Don't rely on this.\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The JSON comprising the HTML and various page attributes for the given page title."
          },
          "404": {
            "description": "Unknown page title",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Mobile"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "headers": {
                  "cache-control": "{cache-control}"
                },
                "method": "get",
                "uri": "{+$$.options.host}/{domain}/v1/page/mobile-text/{title}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/revision/": {
      "get": {
        "description": "List revisions. This currently only lists revisions stored in RESTBase.\nStability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental). Don't rely on this.\n",
        "parameters": [
          {
            "description": "The next page token",
            "in": "query",
            "name": "page",
            "required": false,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The queriable sub-items",
            "schema": {
              "$ref": "#/definitions/listing"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "query": {
                  "page": "{page}"
                },
                "uri": "/{domain}/sys/page_revisions/rev/"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/revision/{revision}": {
      "get": {
        "description": "Get metadata about a specific revision.\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The revision id",
            "in": "path",
            "name": "revision",
            "required": true,
            "type": "integer"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The revision's properties",
            "schema": {
              "$ref": "#/definitions/revision"
            }
          },
          "400": {
            "description": "Invalid revision",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "403": {
            "description": "Access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown revision id or domain",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-amples": [
          {
            "request": {
              "params": {
                "domain": "en.wikipedia.org",
                "revision": 642497713
              }
            },
            "response": {
              "body": {
                "items": [
                  {
                    "comment": "/.*/",
                    "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}$/",
                    "title": "Foobar"
                  }
                ]
              },
              "headers": {
                "content-type": "application/json",
                "etag": "/.+/"
              },
              "status": 200
            },
            "title": "Get rev by ID"
          }
        ],
        "x-monitor": true,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "headers": {
                  "cache-control": "{cache-control}"
                },
                "uri": "/{domain}/sys/page_revisions/rev/{revision}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/summary/{title}": {
      "get": {
        "description": "Returns the summary of the latest page content available in storage. Currently the summary includes the text for the first several sentences and the thumbnail URL.\nProvide a `Cache-Control: no-cache` header to request the latest data.\nStability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental)\n",
        "parameters": [
          {
            "description": "The page title.",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The summary for the given page",
            "schema": {
              "$ref": "#/definitions/summary"
            }
          },
          "404": {
            "description": "Unknown page title",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-amples": [
          {
            "request": {
              "params": {
                "title": "Barack_Obama"
              }
            },
            "response": {
              "body": {
                "extract": "/.+/",
                "thumbnail": {
                  "source": "/^https:/"
                }
              },
              "headers": {
                "content-type": "/^application\\/json$/",
                "etag": "/.+/"
              },
              "status": 200
            },
            "title": "Get summary from storage"
          }
        ],
        "x-monitor": true,
        "x-request-handler": [
          {
            "rev_info": {
              "request": {
                "method": "get",
                "uri": "/{domain}/sys/page_revisions/page/{title}"
              },
              "response": {
                "body": "{{rev_info.body.items[0]}}"
              }
            },
            "storage": {
              "catch": {
                "status": 404
              },
              "request": {
                "headers": {
                  "cache-control": "{{cache-control}}"
                },
                "method": "get",
                "uri": "/{domain}/sys/key_value/summary/{request.params.title}"
              },
              "return": {
                "body": "{{storage.body}}",
                "headers": {
                  "cache-control": "{{options.response_cache-control}}",
                  "content-type": "{{storage.headers.content-type}}",
                  "etag": "{{storage.headers.etag}}"
                },
                "status": 200
              },
              "return_if": {
                "status": "2xx"
              }
            }
          },
          {
            "extract": {
              "request": {
                "body": {
                  "explaintext": true,
                  "exsentences": 5,
                  "piprop": "thumbnail",
                  "pithumbsize": 320,
                  "prop": "extracts|pageimages",
                  "redirects": true,
                  "titles": "{{rev_info.body.title}}"
                },
                "method": "post",
                "uri": "/{domain}/sys/action/query"
              },
              "response": {
                "body": {
                  "extract": "{{extract.body.items[0].extract}}",
                  "thumbnail": "{{httpsSource(extract.body.items[0].thumbnail)}}",
                  "title": "{{extract.body.items[0].title}}"
                },
                "headers": {
                  "content-type": "application/json",
                  "etag": "\"{{rev_info.body.rev}}/{{rev_info.body.tid}}\""
                }
              }
            }
          },
          {
            "store_and_return": {
              "request": {
                "body": "{{extract.body}}",
                "headers": "{{extract.headers}}",
                "method": "put",
                "uri": "/{domain}/sys/key_value/summary/{request.params.title}"
              },
              "return": {
                "body": "{{extract.body}}",
                "headers": {
                  "cache-control": "{{options.response_cache-control}}",
                  "content-type": "{{extract.headers.content-type}}",
                  "etag": "{{extract.headers.etag}}"
                },
                "status": 200
              }
            }
          }
        ],
        "x-setup-handler": [
          {
            "init": {
              "body": {
                "valueType": "json"
              },
              "method": "put",
              "uri": "/{domain}/sys/key_value/summary"
            }
          }
        ]
      }
    },
    "/page/title/": {
      "get": {
        "description": "List all pages.\nStability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental). Don't rely on this.\n",
        "parameters": [
          {
            "description": "The next page token",
            "in": "query",
            "name": "page",
            "required": false,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The queriable list of page titles",
            "schema": {
              "$ref": "#/definitions/listing"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "query": {
                  "page": "{page}"
                },
                "uri": "/{domain}/sys/page_revisions/page/"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/title/{title}": {
      "get": {
        "description": "Returns the latest revision ID for the title present in storage. Supply the Cache-Control: no-cache header to obtain the latest available revision ID\nStability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental)\n",
        "parameters": [
          {
            "description": "The page title.",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The latest revision for the title",
            "schema": {
              "$ref": "#/definitions/revision"
            }
          },
          "404": {
            "description": "Unknown page title or no revisions found",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-amples": [
          {
            "request": {
              "params": {
                "title": "Foobar"
              }
            },
            "response": {
              "body": {
                "items": [
                  {
                    "comment": "/.*/",
                    "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}$/",
                    "title": "Foobar"
                  }
                ]
              },
              "headers": {
                "content-type": "application/json",
                "etag": "/.+/"
              },
              "status": 200
            },
            "title": "Get rev by title from storage"
          }
        ],
        "x-monitor": true,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "headers": {
                  "cache-control": "{cache-control}",
                  "if-unmodified-since": "{if-unmodified-since}"
                },
                "uri": "/{domain}/sys/page_revisions/page/{title}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/title/{title}/": {
      "get": {
        "description": "List revisions for a title. Currently this lists all revisions that ever used this title and are stored in RESTBase, but eventually it should probably return the linear history (across renames) of the page currently using this title.\nStability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental)\n",
        "parameters": [
          {
            "description": "The page title.",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The next page token",
            "in": "query",
            "name": "page",
            "required": false,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The queriable list of page revisions.",
            "schema": {
              "$ref": "#/definitions/listing"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Page content"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "query": {
                  "page": "{page}"
                },
                "uri": "/{domain}/sys/page_revisions/page/{title}/"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/page/wikitext/{title}": {
      "post": {
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Save a new revision of a page.\nFor new pages, or when editting the latest revision of a page, the `base_etag` parameter should be left empty. For editing old revisions, it should contain the ETag header of the revision the edit is derived from.\nThe latest page revision ETag header could be provided in the If-Match header to detect edit conflicts. If the new page is created, appropriate user cookies must be provided.\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title.",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The ETag header of the revision the edit is based on.",
            "in": "formData",
            "name": "base_etag",
            "required": false,
            "type": "string"
          },
          {
            "description": "The wikitext source of the page to save",
            "in": "formData",
            "name": "wikitext",
            "required": true,
            "type": "string"
          },
          {
            "description": "The CRSF edit token provided by the MW API",
            "in": "formData",
            "name": "csrf_token",
            "required": true,
            "type": "string"
          },
          {
            "description": "The summary of the change",
            "in": "formData",
            "name": "comment",
            "required": false,
            "type": "string"
          },
          {
            "description": "Whether this represents a minor change",
            "in": "formData",
            "name": "is_minor",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Whether the change is being made by a bot",
            "in": "formData",
            "name": "is_bot",
            "required": false,
            "type": "boolean"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The existing revision of the page matches the sent text"
          },
          "201": {
            "description": "A new revision of the page has been created"
          },
          "400": {
            "description": "Invalid request - lack of required parameters, bad ETags etc.",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "409": {
            "description": "Edit conflict",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "security": [
          {
            "mediawiki_auth": []
          }
        ],
        "tags": [
          "Page content"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "post_to_backend": {
              "request": {
                "body": "{$.request.body}",
                "headers": "{$.request.headers}",
                "uri": "/{domain}/sys/page_save/wikitext/{title}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/transform/html/to/html": {
      "parameters": [],
      "post": {
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Update / refresh / sanitize HTML\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The HTML to transform",
            "in": "formData",
            "name": "html",
            "required": true,
            "type": "string"
          },
          {
            "description": "Deprecated. Use `body_only`.",
            "in": "formData",
            "name": "bodyOnly",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Return only `body.innerHTML`",
            "in": "formData",
            "name": "body_only",
            "required": false,
            "type": "boolean"
          }
        ],
        "produces": [
          "text/html; profile=\"mediawiki.org/specs/html/1.1.0\""
        ],
        "responses": {
          "200": {
            "description": "See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec"
          },
          "403": {
            "description": "access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page title or revision",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "409": {
            "description": "Revision was restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "410": {
            "description": "Page was deleted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Transforms"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "body": {
                  "bodyOnly": "{bodyOnly}",
                  "body_only": "{body_only}",
                  "html": "{html}"
                },
                "headers": {
                  "if-match": "{if-match}"
                },
                "uri": "/{domain}/sys/parsoid/transform/html/to/html{/title}{/revision}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/transform/html/to/html/{title}": {
      "parameters": [],
      "post": {
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Update / refresh / sanitize HTML\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The HTML to transform",
            "in": "formData",
            "name": "html",
            "required": true,
            "type": "string"
          },
          {
            "description": "Deprecated. Use `body_only`.",
            "in": "formData",
            "name": "bodyOnly",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Return only `body.innerHTML`",
            "in": "formData",
            "name": "body_only",
            "required": false,
            "type": "boolean"
          }
        ],
        "produces": [
          "text/html; profile=\"mediawiki.org/specs/html/1.1.0\""
        ],
        "responses": {
          "200": {
            "description": "See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec"
          },
          "403": {
            "description": "access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page title or revision",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "409": {
            "description": "Revision was restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "410": {
            "description": "Page was deleted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Transforms"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "body": {
                  "bodyOnly": "{bodyOnly}",
                  "body_only": "{body_only}",
                  "html": "{html}"
                },
                "headers": {
                  "if-match": "{if-match}"
                },
                "uri": "/{domain}/sys/parsoid/transform/html/to/html{/title}{/revision}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/transform/html/to/html/{title}/{revision}": {
      "parameters": [],
      "post": {
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Update / refresh / sanitize HTML\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The page revision",
            "in": "path",
            "name": "revision",
            "required": true,
            "type": "integer"
          },
          {
            "description": "The HTML to transform",
            "in": "formData",
            "name": "html",
            "required": true,
            "type": "string"
          },
          {
            "description": "Deprecated. Use `body_only`.",
            "in": "formData",
            "name": "bodyOnly",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Return only `body.innerHTML`",
            "in": "formData",
            "name": "body_only",
            "required": false,
            "type": "boolean"
          }
        ],
        "produces": [
          "text/html; profile=\"mediawiki.org/specs/html/1.1.0\""
        ],
        "responses": {
          "200": {
            "description": "See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec"
          },
          "403": {
            "description": "access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page title or revision",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "409": {
            "description": "Revision was restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "410": {
            "description": "Page was deleted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Transforms"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "body": {
                  "bodyOnly": "{bodyOnly}",
                  "body_only": "{body_only}",
                  "html": "{html}"
                },
                "headers": {
                  "if-match": "{if-match}"
                },
                "uri": "/{domain}/sys/parsoid/transform/html/to/html{/title}{/revision}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/transform/html/to/wikitext": {
      "parameters": [],
      "post": {
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Transform HTML to wikitext\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The HTML to transform",
            "in": "formData",
            "name": "html",
            "required": true,
            "type": "string"
          },
          {
            "description": "Normalise the DOM to yield cleaner wikitext?",
            "in": "formData",
            "name": "scrub_wikitext",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Deprecated, use `scrub_wikitext` instead.",
            "in": "formData",
            "name": "scrubWikitext",
            "required": false,
            "type": "boolean"
          }
        ],
        "produces": [
          "text/plain; profile=\"mediawiki.org/specs/wikitext/1.0.0\""
        ],
        "responses": {
          "200": {
            "description": "See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec"
          },
          "403": {
            "description": "Access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page title or revision",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "409": {
            "description": "Revision was restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "410": {
            "description": "Page was deleted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Transforms"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "body": {
                  "html": "{html}",
                  "scrubWikitext": "{scrubWikitext}",
                  "scrub_wikitext": "{scrub_wikitext}"
                },
                "headers": {
                  "if-match": "{if-match}"
                },
                "uri": "/{domain}/sys/parsoid/transform/html/to/wikitext{/title}{/revision}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/transform/html/to/wikitext/{title}": {
      "parameters": [],
      "post": {
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Transform HTML to wikitext\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The HTML to transform",
            "in": "formData",
            "name": "html",
            "required": true,
            "type": "string"
          },
          {
            "description": "Normalise the DOM to yield cleaner wikitext?",
            "in": "formData",
            "name": "scrub_wikitext",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Deprecated, use `scrub_wikitext` instead.",
            "in": "formData",
            "name": "scrubWikitext",
            "required": false,
            "type": "boolean"
          }
        ],
        "produces": [
          "text/plain; profile=\"mediawiki.org/specs/wikitext/1.0.0\""
        ],
        "responses": {
          "200": {
            "description": "See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec"
          },
          "403": {
            "description": "Access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page title or revision",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "409": {
            "description": "Revision was restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "410": {
            "description": "Page was deleted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Transforms"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "body": {
                  "html": "{html}",
                  "scrubWikitext": "{scrubWikitext}",
                  "scrub_wikitext": "{scrub_wikitext}"
                },
                "headers": {
                  "if-match": "{if-match}"
                },
                "uri": "/{domain}/sys/parsoid/transform/html/to/wikitext{/title}{/revision}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/transform/html/to/wikitext/{title}/{revision}": {
      "parameters": [],
      "post": {
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Transform HTML to wikitext\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The page revision",
            "in": "path",
            "name": "revision",
            "required": true,
            "type": "integer"
          },
          {
            "description": "The HTML to transform",
            "in": "formData",
            "name": "html",
            "required": true,
            "type": "string"
          },
          {
            "description": "Normalise the DOM to yield cleaner wikitext?",
            "in": "formData",
            "name": "scrub_wikitext",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Deprecated, use `scrub_wikitext` instead.",
            "in": "formData",
            "name": "scrubWikitext",
            "required": false,
            "type": "boolean"
          }
        ],
        "produces": [
          "text/plain; profile=\"mediawiki.org/specs/wikitext/1.0.0\""
        ],
        "responses": {
          "200": {
            "description": "See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec"
          },
          "403": {
            "description": "Access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page title or revision",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "409": {
            "description": "Revision was restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "410": {
            "description": "Page was deleted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Transforms"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "body": {
                  "html": "{html}",
                  "scrubWikitext": "{scrubWikitext}",
                  "scrub_wikitext": "{scrub_wikitext}"
                },
                "headers": {
                  "if-match": "{if-match}"
                },
                "uri": "/{domain}/sys/parsoid/transform/html/to/wikitext{/title}{/revision}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/transform/sections/to/wikitext/{title}/{revision}": {
      "post": {
        "consumes": [
          "application/json",
          "multipart/form-data"
        ],
        "description": "Transform sections representation to wikitext\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The page revision",
            "in": "path",
            "name": "revision",
            "required": true,
            "type": "integer"
          },
          {
            "description": "Sections to transform",
            "in": "body",
            "name": "sections",
            "required": true,
            "schema": {
              "properties": {
                "sections": {
                  "example": "{\"mwAg\":\"<h2>First Section replaced</h2><h2>Appended Section</h2>\"}"
                }
              },
              "required": [
                "sections"
              ],
              "type": "object"
            }
          }
        ],
        "produces": [
          "text/html; profile=\"mediawiki.org/specs/html/1.1.0\""
        ],
        "responses": {
          "200": {
            "description": "See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec"
          },
          "400": {
            "description": "Illegal JSON provided or section id does not exist",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "403": {
            "description": "access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page title or revision",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "409": {
            "description": "Revision was restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "410": {
            "description": "Page was deleted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Transforms"
        ],
        "x-monitor": false,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "body": {
                  "sections": "{sections}"
                },
                "uri": "/{domain}/sys/parsoid/transform/sections/to/wikitext/{title}/{revision}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/transform/wikitext/to/html": {
      "parameters": [],
      "post": {
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Transform wikitext to HTML. Note that if you set `stash: true`, you\n  also need to supply the title.\n\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The Wikitext to transform to HTML",
            "in": "formData",
            "name": "wikitext",
            "required": true,
            "type": "string"
          },
          {
            "description": "Deprecated. Use `body_only`",
            "in": "formData",
            "name": "bodyOnly",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Return only `body.innerHTML`",
            "in": "formData",
            "name": "body_only",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Whether to temporarily stash the result of the transformation",
            "in": "formData",
            "name": "stash",
            "required": false,
            "type": "boolean"
          }
        ],
        "produces": [
          "text/html; profile=\"mediawiki.org/specs/html/1.1.0\""
        ],
        "responses": {
          "200": {
            "description": "See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec"
          },
          "403": {
            "description": "access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page title or revision",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "409": {
            "description": "Revision was restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "410": {
            "description": "Page was deleted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Transforms"
        ],
        "x-amples": [
          {
            "request": {
              "body": {
                "body_only": true,
                "wikitext": "== Heading =="
              },
              "params": {
                "title": "Foobar"
              }
            },
            "response": {
              "body": "/^<h2.*> Heading <\\/h2>$/",
              "headers": {
                "content-type": "/^text\\/html.+/"
              },
              "status": 200
            },
            "title": "Transform wikitext to html"
          }
        ],
        "x-monitor": true,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "body": {
                  "bodyOnly": "{bodyOnly}",
                  "body_only": "{body_only}",
                  "stash": "{stash}",
                  "wikitext": "{wikitext}"
                },
                "uri": "/{domain}/sys/parsoid/transform/wikitext/to/html{/title}{/revision}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/transform/wikitext/to/html/{title}": {
      "parameters": [],
      "post": {
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Transform wikitext to HTML. Note that if you set `stash: true`, you\n  also need to supply the title.\n\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The Wikitext to transform to HTML",
            "in": "formData",
            "name": "wikitext",
            "required": true,
            "type": "string"
          },
          {
            "description": "Deprecated. Use `body_only`",
            "in": "formData",
            "name": "bodyOnly",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Return only `body.innerHTML`",
            "in": "formData",
            "name": "body_only",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Whether to temporarily stash the result of the transformation",
            "in": "formData",
            "name": "stash",
            "required": false,
            "type": "boolean"
          }
        ],
        "produces": [
          "text/html; profile=\"mediawiki.org/specs/html/1.1.0\""
        ],
        "responses": {
          "200": {
            "description": "See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec"
          },
          "403": {
            "description": "access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page title or revision",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "409": {
            "description": "Revision was restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "410": {
            "description": "Page was deleted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Transforms"
        ],
        "x-amples": [
          {
            "request": {
              "body": {
                "body_only": true,
                "wikitext": "== Heading =="
              },
              "params": {
                "title": "Foobar"
              }
            },
            "response": {
              "body": "/^<h2.*> Heading <\\/h2>$/",
              "headers": {
                "content-type": "/^text\\/html.+/"
              },
              "status": 200
            },
            "title": "Transform wikitext to html"
          }
        ],
        "x-monitor": true,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "body": {
                  "bodyOnly": "{bodyOnly}",
                  "body_only": "{body_only}",
                  "stash": "{stash}",
                  "wikitext": "{wikitext}"
                },
                "uri": "/{domain}/sys/parsoid/transform/wikitext/to/html{/title}{/revision}"
              },
              "return": true
            }
          }
        ]
      }
    },
    "/transform/wikitext/to/html/{title}/{revision}": {
      "parameters": [],
      "post": {
        "consumes": [
          "multipart/form-data"
        ],
        "description": "Transform wikitext to HTML. Note that if you set `stash: true`, you\n  also need to supply the title.\n\nStability: [unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)\n",
        "parameters": [
          {
            "description": "The page title",
            "in": "path",
            "name": "title",
            "required": true,
            "type": "string"
          },
          {
            "description": "The page revision",
            "in": "path",
            "name": "revision",
            "required": true,
            "type": "integer"
          },
          {
            "description": "The Wikitext to transform to HTML",
            "in": "formData",
            "name": "wikitext",
            "required": true,
            "type": "string"
          },
          {
            "description": "Deprecated. Use `body_only`",
            "in": "formData",
            "name": "bodyOnly",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Return only `body.innerHTML`",
            "in": "formData",
            "name": "body_only",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Whether to temporarily stash the result of the transformation",
            "in": "formData",
            "name": "stash",
            "required": false,
            "type": "boolean"
          }
        ],
        "produces": [
          "text/html; profile=\"mediawiki.org/specs/html/1.1.0\""
        ],
        "responses": {
          "200": {
            "description": "See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec"
          },
          "403": {
            "description": "access to the specific revision is restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "404": {
            "description": "Unknown page title or revision",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "409": {
            "description": "Revision was restricted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "410": {
            "description": "Page was deleted",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/problem"
            }
          }
        },
        "tags": [
          "Transforms"
        ],
        "x-amples": [
          {
            "request": {
              "body": {
                "body_only": true,
                "wikitext": "== Heading =="
              },
              "params": {
                "title": "Foobar"
              }
            },
            "response": {
              "body": "/^<h2.*> Heading <\\/h2>$/",
              "headers": {
                "content-type": "/^text\\/html.+/"
              },
              "status": 200
            },
            "title": "Transform wikitext to html"
          }
        ],
        "x-monitor": true,
        "x-request-handler": [
          {
            "get_from_backend": {
              "request": {
                "body": {
                  "bodyOnly": "{bodyOnly}",
                  "body_only": "{body_only}",
                  "stash": "{stash}",
                  "wikitext": "{wikitext}"
                },
                "uri": "/{domain}/sys/parsoid/transform/wikitext/to/html{/title}{/revision}"
              },
              "return": true
            }
          }
        ]
      }
    }
  },
  "definitions": {
    "data-parsoid": {
      "description": "Result format for Parsoid data queries",
      "properties": {
        "counter": {
          "format": "int32",
          "type": "integer"
        },
        "ids": {
          "type": "object"
        }
      },
      "required": [
        "counter",
        "ids"
      ]
    },
    "listing": {
      "description": "The result format for listings",
      "properties": {
        "items": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "items"
      ]
    },
    "problem": {
      "properties": {
        "detail": {
          "type": "string"
        },
        "instance": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ]
    },
    "revision": {
      "description": "Result format for revision items",
      "properties": {
        "count": {
          "format": "int32",
          "type": "integer"
        },
        "items": {
          "$ref": "#/definitions/revisionInfo",
          "type": "array"
        }
      },
      "required": [
        "count",
        "items"
      ]
    },
    "revisionIdentifier": {
      "description": "Unique revision identifier",
      "properties": {
        "revision": {
          "format": "int32",
          "type": "integer"
        },
        "tid": {
          "type": "string"
        }
      }
    },
    "revisionInfo": {
      "description": "Complete information about the revision",
      "properties": {
        "comment": {
          "type": "string"
        },
        "latest_rev": {
          "format": "int32",
          "type": "integer"
        },
        "latest_tid": {
          "type": "string"
        },
        "nextrev_tid": {
          "type": "string"
        },
        "page_id": {
          "format": "int32",
          "type": "integer"
        },
        "redirect": {
          "type": "boolean"
        },
        "renames": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "restrictions": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "rev": {
          "format": "int32",
          "type": "integer"
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "tid": {
          "type": "string"
        },
        "timestamp": {
          "format": "date-time",
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "user_id": {
          "format": "int32",
          "type": "integer"
        },
        "user_text": {
          "type": "string"
        }
      }
    },
    "revisions": {
      "description": "The result format for revision listing",
      "properties": {
        "items": {
          "$ref": "#/definitions/revisionIdentifier",
          "type": "array"
        }
      },
      "required": [
        "items"
      ]
    },
    "summary": {
      "properties": {
        "extract": {
          "description": "First several sentences of an article in plain text",
          "type": "string"
        },
        "thumbnail": {
          "properties": {
            "height": {
              "description": "Thumnail height",
              "type": "integer"
            },
            "source": {
              "description": "Thumbnail image URI",
              "type": "string"
            },
            "width": {
              "description": "Thumbnail width",
              "type": "integer"
            }
          },
          "required": [
            "source",
            "width",
            "height"
          ],
          "type": "object"
        },
        "title": {
          "description": "The page title",
          "type": "string"
        }
      },
      "required": [
        "title",
        "extract"
      ],
      "type": "object"
    }
  },
  "x-default-params": {
    "domain": "en.wikipedia.org"
  },
  "x-host-basePath": "/api/rest_v1",
  "x-modules": {
    "/": [
      {
        "path": "v1/content.yaml"
      }
    ],
    "/media": [
      {
        "options": "{{options.mathoid}}",
        "path": "v1/mathoid.yaml"
      }
    ],
    "/page": [
      {
        "options": "{{options.mobileapps}}",
        "path": "v1/mobileapps.yaml"
      },
      {
        "options": "{{options.graphoid}}",
        "path": "v1/graphoid.yaml"
      },
      {
        "options": {
          "response_cache-control": "max-age: 3600, s-maxage: 3600"
        },
        "path": "v1/summary.js"
      }
    ]
  }
}
