Static Widget API

This API allows you to interact with your widgets via static HTTP POST/GET calls vs. dynamic scripting. This enables direct and open access to your widgets to support third-party desktop and mobile applications.

The API is simple enough for mobile phones to control and monitor widgets and robust enough to support LabVIEW applications.

Get the “widgetID”

A widget created on the Interface created an embed tag for use on websites. To connect the API calls to the widget you will need the the “widgetID”.

API Access

To access the API, you can use GET or POST calls. You can also use “http” or “https” to send API calls.

HTTP GET[widgetID]

HTTP POST id=[widgetID]


To send additional parameters to the API, use an ”&” as a delimiter for each parameter passed.

Here is an example:[widgetID]&value=1&format=xml

Here are the parameters that you can send to the API:


Required – widgetID of widget created on the Interface


Optional – Value to be passed to the widget (URL encoded)

  • Logic High/On/1 – value=1
  • Logic Low/Off/0 – value=0


Optional – Type of format for the API response (Default is Text)

  • Plain Text – format=text
  • HTML – format=html
  • WAP/WML – format=wml
  • XML – format=xml
  • JSON – format=json
  • VoiceXML – format=vxml
  • TwiML – format=twiml
  • TwiML SMS – format=twimlsms


Optional – Callback parameter for JSONP objects and cross-domain scripting

API Responses

A call to the API returns a response depending on the success and type of request. The response will be wrapped in the appropriate headers if the format parameter is passed.

Here are the following possible responses:


If you send a command to a control widget and the command was issued successfully, you will get the word “Sent” returned back to you


If you send a command to a control or monitor widget and the command was issued unsuccessfully, you will get the word “Error” returned back to you


If the web gateway is offline, the response will be “Offline”


If you send a call to a monitor widget, you will receive a scaled or labeled value depending on the widget settings

Example Applications

Secure HTML Form

This is an HTML form that uses HTTP POST to send a value to a control widget.

    <title>Static Widget API with HTML Form</title>
        <form action="" method="post">
          <textarea row="2" cols="16" id="value" name="value"></textarea><br />
          <input type="hidden" name="id" value="ah0MtPBUZN5c" />
          <input type="submit" value="Submit" />


This example is a WML formatted page to control a digital output using HTTP GET calls.

<?xml version="1.0"?>

  <card title="Room Lights">
    <p><a href="">On</a></p>
    <p><a href="">Off</a></p>