Interacting with your endpoint in the GUI

The Dynamic API GUI interface was designed so that you can interact with any Dynamic API endpoint in your browser.

By default, the HTML interface shows a grid for data widgets and the raw data in k syntax for the value widgets.

You can provide interactive documentation for your endpoint in the Insights Platform GUI by providing HTML in a widget <layer> named apidoc. For examples, see any of the built-in endpoints under default.api in the Object Manager. The example below is a section of default.api.dbm, the QuickApp for the dbm endpoint, showing the apidoc layer containing the online documentation for the endpoint.

<widget name="index" class_="value" label_="result" value_="@result">
      <layer name="apidoc">
          <h1><tt>dbm</tt> API Endpoint</h1>
          <p>This endpoint wraps <tt>&lt;do action_="dbm"/&gt;</tt>.</p>
          <p>Input is a list of two items called <tt>@cmd</tt>. It contains:</p>
            <li>a string indicating the transaction (<tt>trans_</tt>) to run</li>
            <li>a dictionary containing the parameters (<tt>data_</tt>) for that transaction</li>
          <p>The result is a dictionary containing:</p>
            <dd>A result code (0 for success, 1 for error).</dd>
            <dt><tt>msg</tt> (when <tt>rc=1</tt>)</dt>
            <dd>The error message.</dd>
            <dt><tt>value</tt> (when <tt>rc=0</tt>)</dt>
            <dd>This can be any json object, depending on the transaction named in <tt>@cmd.1</tt>.</dd>

You will see the documentation when you access your endpoint in the GUI through /api/[path_to_quickapp].