Invoking a QuickApp from the Dynamic API
You can treat any QuickApp as a Dynamic API endpoint by invoking
/api/[path_to_quickapp]
.
Using the new
endpoint
If you want multiple copies of the same QuickApp to run simultaneously, you can
launch your QuickApp by posting to
/api/new/[path_to_quickapp]
. This serves
a value widget that will contain the numeric tag of the spawned QuickApp. You can
then fetch the actual QuickApp via
/api/[tag_number]
. See the new
endpoint for more
information.
The index
widget
If you name a widget within your QuickApp index
, it will be served
instead of the widget status table when requesting the top level QuickApp. This is
most useful when you have only a single widget in your QuickApp. For example, when
you log into the API from the GUI, using
https://[host]/[1010-version]/api
,
you are directed to the /index
endpoint by default. The source code
for this endpoint is available through the Object Manager as
default.api.index
. The code consists of a single widget called
"index"
:
<base table="default.lonely"/>
<!-- api index -->
<dynamic>
<widget name="index" navcol_="name">
<layer name="apidoc">
<html><![CDATA[
<h1><tt>index</tt> of 1010data API Endpoints</h1>
<p>The following endpoints are available:</p>
]]>
</html>
</layer>
<directory folder="default.api"/>
<willbe name="name" value="strpick(path;'.';-1)"/>
<colord cols="name,title"/>
<!-- no point linking to ourselves -->
<sel value="name<>'index'"/>
</widget>
</dynamic>
index
.URL conventions
The Dynamic API uses certain conventions when parsing URLs in client applications. See Appendix: URL conventions for a complete reference.