New spawns a new instance of a QuickApp.


When you use new to spawn an instance of a QuickApp, the API assigns a unique number to the QuickApp instance, called a tag. The tag number appears in the URL and in the user interface. The new QuickApp instance has the format https://[host]/[1010-version]/api/[tag_number].

You also have the option to use queries that don't end with <dynamic/>. If you do this, the new endpoint will not add an instid_ attribute to these queries. Therefore, you must assign your own unique number to the QuickApp instance. You can make use of the special variable @count for this purpose.



This URL spawns a new instance of the QuickApp [quickapp_name]. For example, https://[host]/[1010-version]/api/new/sql spawns a new instance of the sql QuickApp.

Alternatively, use the following URL to submit a <dynamic> query on the fly in the user interface. This is useful for experimenting with a query:


Enter the <dynamic> query in the text box and click Submit.

When you successfully spawn a new instance of a QuickApp, the following appears:

Click the link to interact with the new QuickApp instance.




A string containing a <dynamic> query.


new returns a numerical tag that enables you to interact with the QuickApp. To run the QuickApp, use the tag number returned by new in the URL:


User Interface Example: Spawn an instance of an endpoint

In the following example, the api/new/sql spawns a new instance of the sql endpoint:

Click the link api/7 to interact with the new sql QuickApp instance. Interact with the endpoint as you normally would.

You can return to this instance of the QuickApp at api/7 and interact with it any time during your session.

User Interface Example: Entering a <dynamic> query

In the following example, a new QuickApp is loaded on the fly using the @xml parameter in the user interface. @xml contains a <dynamic> query entered directly into the text box in the new endpoint.

Click Submit to spawn a new QuickApp containing the results of the query. The following screen appears:

Then click the link containing the tag for the QuickApp, in this case, api/10. The query results appear:

You can also interact with the QuickApp within the URL. In this example QuickApp, you can change the values of x and y by adding a query to the end of the URL, such as api/10?x=5&y=7. Now x=5 and y=7. The query results are as follows:

You can return to this QuickApp instance at api/10 and interact with it at any point during your session.

curl Example: Spawn an instance of a <dynamic> query

You can test a <dynamic> query with curl.

The following is a simple <dynamic> query saved as a file named app.xml:

<dynamic x="0" y="0" sum="0" msg="">
  <do on_="init,change(x),change(y)">
    <set sum="{@x + @y}"/>
    <set msg="{@x}+{@y}={@sum}"/>
  <widget class_="value" name="index" value_="@msg"/>
  <widget class_="value" name="sum" value_="@sum"/>

First, issue a curl command containing the <dynamic> query to the new endpoint:

$ curl -s -b cookie.txt -d "xml=$(cat app.xml)" 

The command returns JSON containing the tag number of the new instance that was created:


Then, issue a curl command to the tag that was created:

$ curl -s -b cookie.txt ''

This command returns the result of the <dynamic> query as follows:

"0 0=0,0"

You can also use curl to test different variables in your query, as follows:

$ curl -s -b cookie.txt 

The result of the <dynamic> query is now:

"5 3=5,3"