Changes

Jump to navigation Jump to search
168 bytes removed ,  18:36, 1 December 2023
m
Text replacement - "</syntaxhighlight>" to "</pre>"
<!-- before -->
<databases xmlns="http://basex.org/rest"/>
</syntaxhighlightpre>
=URL Architecture=
...
</databases>
</syntaxhighlightpre>
The resources of a database (directories, resource metadata) are listed if a database and an optional directory path is specified:
...
</database>
</syntaxhighlightpre>
If the path to a single resource is specified, the resource itself will be returned:
<info-db/>
</commands>
</syntaxhighlightpre>
Return the first five city names of the <b>factbook</b> database:
<rest><![CDATA[ (//city/name)[position() <= 5] ]]></text>
</rest>
</syntaxhighlightpre>
Return string lengths of all text nodes that are found in the node that has been specified as initial context node:
</context>
</query>
</syntaxhighlightpre>
Return the registered database users encoded in <code>ISO-8859-1</code>:
<parameter name='encoding' value='ISO-8859-1'/>
</command>
</syntaxhighlightpre>
Create a new database from the specified input and preserve all whitespaces:
<option name='chop' value='false'/>
</command>
</syntaxhighlightpre>
Bind value to the {{Code|$person}} variable and run query <code>find-person.xq</code>:
<text>find-person.xq</text>
</run>
</syntaxhighlightpre>
==PUT Method==
declare variable $b as xs:integer external;
<mult>{ $a * $b }</mult>
</syntaxhighlightpre>
; Example
declare variable $n as xs:integer* external;
sum($n)
</syntaxhighlightpre>
The dollar sign can be omitted as long as the variable name does not equal a parameter keyword (e.g.: <code>method</code>).
<variable name="b" value="2"/>
</query>
</syntaxhighlightpre>
=Response=
}
}
</syntaxhighlightpre>
===Content-Types===
// store input as raw
conn.setRequestProperty("Content-Type", "application/octet-stream");
</syntaxhighlightpre>
See the [[REST#PUT Requests|PUT Requests]] section for a description of the possible content-types.
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu