MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "TechWiki:Copyrights",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "345": {
                "pageid": 345,
                "ns": 0,
                "title": "Semset Concept",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "A '''semset''' is the use of a series of alternate labels and terms to describe a concept or entity. These alternatives include true synonyms, but may also be more expansive and include jargon, slang, acronyms or alternative terms that usage suggests refers to the same concept. For example, for the concept of \"United States of America\" possible semset entries could include:\n\n{| style=\"margin-left: 20px;\" cellpadding=\"6\" border=\"0\"\n|-\n| United States || America || Amerika || US \n|-\n| Uncle Sam || Great Satan || the States || USA \n|}\n\nThe semset construct is similar to the \"synsets\" in Wordnet, but with a broader use understanding. Included in the semset construct is the single (per language) preferred (human-readable) label for the concept, the <code>prefLabel</code>, an embracing listing of alternative phrase and terms for the concept (including acronyms, synonyms, and matching jargon), the <code>altLabels</code>, and a listing of prominent or common misspellings for the concept or its alternatives, the <code>hiddenLabels</code>. \n\nThe semset construct is an integral part of our recommended ontology best practices and is essential to the use of ontologies for information extraction and tagging of unstructured text.\n\n[[Category:zTechWiki]][[Category:Glossaries,_Dictionaries,_Definitions]]"
                    }
                ]
            },
            "5": {
                "pageid": 5,
                "ns": 0,
                "title": "Syntax Highlighting",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "This '''wiki''' allows '''syntax highlighting''' using [http://sourceforge.net/projects/geshi/files/ Geshi] and a [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi module extension] for Mediawiki. You can specify more than '''120''' [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages supported languages] in using the highlighter.\n\nThe system also works well for export (check out this page via this URL):\n* http://techwiki.openstructs.org/index.php/Syntax_Highlighting?action=render (then, '''View Source''')\n\n\n== Basic Usage ==\n\nTo use the system, you need to bracket your code example with these tags:\n<pre>\n  <source lang=\"lang\"> \n    * code is placed here\n    * default \"lang\" is \"php\"; will be used if no \"lang\" entered\n  </source>\n</pre>\nFollowing are some examples:\n\n== Export and External Style Sheet ==\nThe code generated by the highlighter embeds a dynamic style sheet. To use the same code without Geshi in an external application, you must add new classes and colors to your external style sheet.\n\nDepending on the language you are highlighting, you may get different classes listed.\n\nFor pages on which you are using highlighting, do a '''View Source''' and look for something like this generated table (this example is for 'PHP'):\n<pre>\n<style type=\"text/css\">/*<![CDATA[*/\n.source-php {line-height: normal;}\n.source-php li, .source-php pre {\n\tline-height: normal; border: 0px none white;\n}\n/**\n* GeSHi Dynamically Generated Stylesheet\n* --------------------------------------\n* Dynamically generated stylesheet for php\n* CSS class: source-php, CSS id:\n* GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann\n* (http://qbnz.com/highlighter/ and http://geshi.org/)\n* --------------------------------------\n*/\n.source-php .de1, .source-php .de2 {font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;}\n.source-php  {font-family: monospace;}\n.source-php .imp {font-weight: bold; color: red;}\n.source-php li, .source-php li.li1 {font-weight: normal;}\n.source-php li.li2 {font-weight: bold;}\n.source-php .kw1 {color: #b1b100;}\n.source-php .kw2 {color: #000000; font-weight: bold;}\n.source-php .kw3 {color: #990000;}\n.source-php .co1 {color: #666666; font-style: italic;}\n.source-php .co2 {color: #666666; font-style: italic;}\n.source-php .co3 {color: #0000cc; font-style: italic;}\n.source-php .coMULTI {color: #666666; font-style: italic;}\n.source-php .es0 {color: #000099; font-weight: bold;}\n.source-php .br0 {color: #009900;}\n.source-php .sy0 {color: #339933;}\n.source-php .st0 {color: #0000ff;}\n.source-php .nu0 {color: #cc66cc;}\n.source-php .me1 {color: #004000;}\n.source-php .me2 {color: #004000;}\n.source-php .re0 {color: #000088;}\n.source-php .ln-xtra, .source-php li.ln-xtra, .source-php div.ln-xtra {background-color: #ffc;}\n.source-php span.xtra { display:block; }\n\n/*]]>*/\n</style>\n\n</pre>\n\nMake sure you have a color assignment for each of the classes so listed in your external style sheet.\n\n== Use Examples ==\n=== pre Tag ===\nThe following material is in a pre tag. We are using PHP as the default. '''SOURCE DOES NOT WORK !!!!''':\n<pre>\n<source>\n\n<?php\nfunction syntaxHighlightingRenderHtml($input, $argv){\n\t/**\n\t * Pass in the globals defined above for use in the function.\n\t */\n\tglobal $BEAUT_PATH, $LOCAL_SERVER_ROOT, $OUTPUT_HIGHLIGHT_AS;\n\t/**\n\t * Require the two main files for the beautifier.\n\t */\n\trequire_once ($BEAUT_PATH.\"Beautifier/Core.php\");\n\n/**\n* If a specific language is requested load the relevant file and create the highlighter\n*/\n$myhfile = null;\nif($argv[\"language\"] && file_exists($BEAUT_PATH.\"HFile/HFile_\".$argv[\"language\"].\".php\") ){\nrequire_once ($BEAUT_PATH.\"HFile/HFile_\".$argv[\"language\"].\".php\");\n\nif (FALSE === eval(\"\\$myhfile = new HFile_\".$argv[\"language\"].\"();\") ) {\n$output .= \"Error:1 Could not instantiate HFile_\".$argv[\"language\"].\"()<br />\";\n}\n\n\n</source>\n</pre>\n\n=== PHP ===\nHere is the PHP example:\n\n<source lang=\"php\">\n\n<?php\n/**\n* MediaWiki Extension for Code Syntax Highlighting with the [ http://www.beautifier.org | Beautifier Syntax Highlighting Engine].\n*\n* Parses any content defined within the <nowiki><highlightSyntax></highlightSyntax></nowiki> tag\n* with the [ http://www.beautifier.org | Beautifier Syntax Highlighting Engine] and\n* returns the HTML output.\n* @author Lucas Hrabovsky <lucas@amie.st>\n* @copyright &copy; 2006 Amie Inc.\n* @package MediaWiki\n* @subpackage Extensions\n* @filesource\n*/\n/**\n* ----------------------------------------\n* Configuration Vars.\n* ----------------------------------------\n* @string BEAUT_PATH The root path to your Beatuifier installation.\n* @string LOCAL_SERVER_ROOT The root path to use when opening files on the local server for highlighting.\n* @string OUTPUT_HIGHLIGHT_AS Whether to output the HTML as CSS friendly or not.  enum('CSS','HTML')\n*/\n$BEAUT_PATH = \"/path/to/your/beautifier/installation/\";\n$LOCAL_SERVER_ROOT = \"/pathtoyour/public_html/or/www/directory/\";\n$OUTPUT_HIGHLIGHT_AS = \"HTML\";\n/**\n* Add the syntax highlighting extension to the wgExtensionFunctions array.\n*/\n$wgExtensionFunctions[] = \"syntaxHighlightingExtension\";\n/**\n* Register the syntaxHighlightingExtension with the Wiki Parser and associate\n* the highlightSyntax tag with the syntaxHighlightingRenderHtml function.\n*/\nfunction syntaxHighlightingExtension(){\n\tglobal $wgParser;\n\t$wgParser->setHook(\"HIGHLIGHTSYNTAX\",\"syntaxHighlightingRenderHtml\");\n}\n/**\n* The callback function for converting the input text to HTML output.\n*/\nfunction syntaxHighlightingRenderHtml($input, $argv){\n\t/**\n\t * Pass in the globals defined above for use in the function.\n\t */\n\tglobal $BEAUT_PATH, $LOCAL_SERVER_ROOT, $OUTPUT_HIGHLIGHT_AS;\n\t/**\n\t * Require the two main files for the beautifier.\n\t */\n\trequire_once ($BEAUT_PATH.\"Beautifier/Core.php\");\n\n/**\n* If a specific language is requested load the relevant file and create the highlighter\n*/\n$myhfile = null;\nif($argv[\"language\"] && file_exists($BEAUT_PATH.\"HFile/HFile_\".$argv[\"language\"].\".php\") ){\nrequire_once ($BEAUT_PATH.\"HFile/HFile_\".$argv[\"language\"].\".php\");\n\nif (FALSE === eval(\"\\$myhfile = new HFile_\".$argv[\"language\"].\"();\") ) {\n$output .= \"Error:1 Could not instantiate HFile_\".$argv[\"language\"].\"()<br />\";\n}\n\n}\n\n/**\n* Otherwise use php as a default\n*/\nelse\n{\nrequire_once ($BEAUT_PATH.\"HFile/HFile_php3.php\");\n$myhfile = new HFile_php3();\n}\n\n/**\n* Set up the highlight object based on whether\n* you want the output as CSS freindly or straight HTML.\n*/\nif($OUTPUT_HIGHLIGHT_AS==\"CSS\"){\n\trequire_once ($BEAUT_PATH.\"Output/Output_css.php\");\n\t$outputter = new Output_css();\n}\nelse {\n\trequire_once ($BEAUT_PATH.\"Output/Output_HTML.php\");\n\t$outputter = new Output_Html();\n}\n\n$highlighter = new Core($myhfile, $outputter);\n\n\t/**\n\t * The meat and potatoes...\n\t */\n\n\t/**\n\t * If the serverFile argument is passed in the tag, load the local file into the highlighter parser.\n\t */\n\tif($argv[\"serverFile\"]){\n\t\t$output .= \"<div style=\\\"font-weight: bold;\\\"><pre>\\n\";\n\t\t$output .= $highlighter->highlight_text($highlighter->load_file($serverRoot.$argv[\"serverFile\"]));\n\t\t$output .= \"</pre></div>\";\n\t\treturn $output;\n\t/**\n\t * If its a remote file, open it up and parse the returned contents.\n\t */\n\t} else if($argv[\"remoteFile\"]){\n\t\t$openFileName = $argv[\"remoteFile\"];\n\t\t$fp = fopen($openFileName, \"r\");\n\t\tif(!$fp){\n\t\t\t$output = \"Error: Syntax Highlighter could not open the file \".$openFileName.\"<br />\";\n\t\t} else {\n\t\t\t$fileContents = fread($fp, 8096);\n\t\t\tfclose($fp);\n\t\t\t$output .= \"<div style=\\\"font-weight: bold;\\\"><h1>Code from <a href=\\\"\".$argv[\"remoteFile\"].\"\\\">\".$argv[\"remoteFile\"].\"</a></h1><pre>\\n\";\n\t\t\t$output .= $highlighter->highlight_text($fileContents);\n\t\t\t$output .= \"</pre></div>\";\n\t\t}\n\t\treturn $output;\n\t/**\n\t * Else we just want to highlight the code within the syntaxHighlight tags.\n\t */\n\t} else {\n\t\t$output .= \"<div style=\\\"font-weight: bold;\\\"><pre>\\n\";\n\t\t$output .= $highlighter->highlight_text($input);\n\t\t$output .= \"</pre></div>\";\n\t\treturn $output;\n\t}\n}\n\n</source>\n\n=== HTML ===\nHere is the HTML example:\n\n<source lang=\"html4strict\">\n<html>\n  <head>\n    <meta content=\"text/html; charset=iso-8859-1\" http-equiv=\"content-type\">\n    <title>\n      Auth Registrar: Access\n    </title>\n  </head>\n  <body>\n    <h1 id=\"firstHeading\" class=\"firstHeading\">\n      Auth Registrar: Access\n    </h1>\n    <h3 id=\"siteSub\">\n      From DocWiki\n    </h3><!-- start content -->\n    <p>\n      The <b>Auth Registrar: Access Web service</b> is used to register\n      (create, update and delete) an <i>access</i> for a given IP address, to a\n      specific dataset and all the registered Web services endpoints registered\n      to the WSF (Web Services Framework) with given <a href=\n      \"http://docwiki.citizen-dan.org/index.php/CRUD_Concept\" title=\n      \"CRUD Concept\">CRUD</a> (Create, Read, Update and Delete) permissions in\n      the WSF.\n    </p>\n    <p>\n      Developers communicate with the Auth Registrar: Access Web service using\n      the HTTP POST method. You may request any content type (*/*).\n    </p>\n    <div class=\"boxGreenDotted\">\n      <b>No content is returned by the Web service endpoint if the endpoint\n      successfully executed the query. Only a \"200 OK\" message will be returned\n      in the header.</b>\n    </div><br>\n    <h3>\n      <span class=\"mw-headline\">Usage</span>\n    </h3>\n    <p>\n      This Web service is intended to be used by content management systems,\n      developers or administrators to manage access to WSF (Web Service\n      Framework) resources (users, datasets, Web services endpoints).\n    </p><br>\n    <h3>\n      <span class=\"mw-headline\">Web Service Endpoint Information</span>\n    </h3>\n    <p>\n      This section describes all you permissions you need in the WSF (Web\n      Service Framework) to send a query to this Web service endpoint, and it\n      describes how to access it.\n    </p>\n    <p>\n      To access this Web service endpoint you need the proper CRUD (Create,\n      Read, Update and Delete) permissions on a specific graph (dataset) of the\n      WSF. Without the proper permissions on this graph you won't be able to\n      send any queries to the endpoint.\n    </p>\n    <div class=\"ws-box\">\n      Needed registered CRUD permission:\n      <ul>\n        <li>Create: True\n        </li>\n        <li>Read: True\n        </li>\n        <li>Update: False\n        </li>\n        <li>Delete: False\n        </li>\n      </ul>\n      <p>\n        As shown on the graph URI:\n      </p>\n      <ul>\n        <li>http://[...]/wsf/\n        </li>\n      </ul>\n    </div>\n    <p>\n      Here is the information needed to communicate with this Web service's\n      endpoint. Descriptions of the parameters are included below.\n    </p>\n    <p>\n      <i>Note: if a parameter has a default value, the requester can omit it\n      and the default value will be used. Also, some baseline Web services may\n      not offer other values than the default.</i>\n    </p>\n    <div class=\"ws-box\">\n      HTTP Method:\n      <ul>\n        <li>POST\n        </li>\n      </ul>\n      <p>\n        Possible \"Accept:\" HTTP header field value:\n      </p>\n      <ul>\n        <li>*/*\n        </li>\n      </ul>\n      <p>\n        URI:\n      </p>\n      <ul>\n        <li>\n        http://<b>[...]</b>/ws/auth/registrar/access/&nbsp;?crud=<b>param1</b>&amp;ws_uris=<b>param2</b>&amp;dataset=<b>param3</b>&amp;action=<b>param4</b>&amp;\n        target_access_uri=<b>param5</b>&amp;registered_ip=<b>param6</b>\n        </li>\n      </ul>\n      <p>\n        URI dynamic parameters description:\n      </p>\n      <p>\n        <b>Note:</b> All parameters have to be <a href=\n        \"http://en.wikipedia.org/wiki/Percent-encoding\" class=\"external text\"\n        title=\"http://en.wikipedia.org/wiki/Percent-encoding\" rel=\n        \"nofollow\">URL-encoded</a>\n      </p>\n      <ul>\n        <li>\n          <b>param1.</b> A quadruple with a value \"True\" or \"False\" defined as\n          &lt;Create;Read;Update;Delete&gt;. Each value is separated by the \";\"\n          character. an example of such a quadruple is:\n          \"crud=True;True;False;False\", meaning: Create = True, Read = True,\n          Update = False and Delete = False\n        </li>\n        <li>\n          <b>param2.</b> A list of \";\" separated Web services URI accessible by\n          this <i>access</i> definition\n        </li>\n        <li>\n          <b>param3.</b> URI of the target dataset of this <i>access</i>\n          description\n        </li>\n        <li>\n          <b>param4.</b> One of:\n        </li>\n      </ul>\n      <ul>\n        <li>\n          <ul>\n            <li>\"<b>create <i>(default)</i></b>\": Create a new <i>access</i>\n            description\n            </li>\n            <li>\"<b>delete_target</b>\": Delete a target <i>access</i>\n            description for a specific IP address and a specific dataset\n            </li>\n            <li>\"<b>delete_all</b>\": Delete all <i>access</i> descriptions for\n            a target dataset\n            </li>\n            <li>\"<b>update</b>\": Update an existing <i>access</i> description\n            </li>\n          </ul>\n        </li>\n      </ul>\n      <ul>\n        <li>\n          <b>param5.</b> Target URI of the <i>access</i> resource to update.\n          Only used when <i>param4 = update</i>\n        </li>\n        <li>\n          <b>param6.</b> Target IP address registered in the WSF\n        </li>\n      </ul>\n    </div>Query Answer from the Endpoint\n    <p>\n      If the query is successfully performed by the endpoint (i.e., the\n      <i>access</i> resource has been properly created, updated or deleted),\n      the endpoint will return the HTTP status message \"200 OK\" with an empty\n      body. If an error occured, one of the HTTP status messages with the\n      description of the error message in the body of the HTTP query will be\n      returned.\n    </p><br>\n    <h3>\n      <span class=\"mw-headline\">HTTP Status Codes</span>\n    </h3>\n    <p>\n      Here are the possible HTTP status (error) codes returned by this Web\n      service endpoint.\n    </p>\n    <p>\n      On error code and the specific error, a different message description can\n      be issued (meaning a different error has been returned).\n    </p>\n    <div class=\"ws-box\">\n      <ul>\n        <li>\n          <b>Code:</b> 200\n          <ul>\n            <li>\n              <b>Message:</b> OK\n            </li>\n          </ul>\n        </li>\n        <li>\n          <b>Code:</b> 400\n          <ul>\n            <li>\n              <b>Message:</b> Bad Request\n            </li>\n            <li>\n              <b>Message description:</b> Answer from the endpoint\n            </li>\n            <li>\n              <b>Message description:</b> Action type undefined\n            </li>\n            <li>\n              <b>Message description:</b> No IP to register\n            </li>\n            <li>\n              <b>Message description:</b> No crud access defined\n            </li>\n            <li>\n              <b>Message description:</b> No web service URI(s) defined\n            </li>\n            <li>\n              <b>Message description:</b> No dataset defined\n            </li>\n            <li>\n              <b>Message description:</b> No target Access URI defined for\n              update\n            </li>\n            <li>\n              <b>Message description:</b> No requester IP available\n            </li>\n            <li>\n              <b>Message description:</b> No target dataset\n            </li>\n            <li>\n              <b>Message description:</b> No Web service URI available\n            </li>\n            <li>\n              <b>Message description:</b> Target Web service <i>XYZ</i> not\n              registered to this Web Services Framework\n            </li>\n            <li>\n              <b>Message description:</b> No access defined for this requester\n              IP <i>XYZ</i>, dataset (<i>XYZ</i>) and Web service (<i>XYZ</i>)\n            </li>\n            <li>\n              <b>Message description:</b> The target Web service (<i>XYZ</i>)\n              needs create access and the requested user (<i>XYZ</i>) doesn't\n              have this access for that dataset (<i>XYZ</i>)\n            </li>\n            <li>\n              <b>Message description:</b> The target Web service (<i>XYZ</i>)\n              needs read access and the requested user (<i>XYZ</i>) doesn't\n              have this access for that dataset (<i>XYZ</i>)\n            </li>\n            <li>\n              <b>Message description:</b> The target Web service (<i>XYZ</i>)\n              needs update access and the requested user (<i>XYZ</i>) doesn't\n              have this access for that dataset (<i>XYZ</i>)\n            </li>\n            <li>\n              <b>Message description:</b> The target Web service (<i>XYZ</i>)\n              needs delete access and the requested user (<i>XYZ</i>) doesn't\n              have this access for that dataset (<i>XYZ</i>)\n            </li>\n          </ul>\n        </li>\n      </ul>\n      <ul>\n        <li>\n          <b>Code:</b> 406\n          <ul>\n            <li>\n              <b>Message:</b> Not Acceptable\n            </li>\n            <li>\n              <b>Message description:</b> Unacceptable mime type requested\n            </li>\n          </ul>\n        </li>\n      </ul>\n      <ul>\n        <li>\n          <b>Code:</b> 500\n          <ul>\n            <li>\n              <b>Message:</b> Internal Error\n            </li>\n          </ul>\n        </li>\n      </ul>\n    </div>\n  </body>\n</html>\n</source>\n[[Category:zTechWiki]]\n\n\n\n\n[[Category:About TechWiki]]\n\n[[Category:Help]]"
                    }
                ]
            }
        }
    }
}