Willow API Reference (v2.0)

Welcome to the Willow API Reference documentation!

We are excited to see what you build with the Willow platform. Ensure you are looking at the correct version of the API documentation as we are always building and incrementing our APIs to provide more value for our customers.

You can find information about how to obtain your Access Token here.

View response samples in the right panel. Check back soon for request samples in your favorite programming language.

For more information about Willow products, visit our product page.

Authentication

Prerequisites

You first need to register your application in the Willow system. You can do so by navigating to the Willow Marketplace, selecting Asset Owner or Solutions Provider, and submitting the Contact Us form.

Coming Soon - You will be able to Sign Up to create a Developer Account and self-register your application.

Once your application is registered to use the Willow API, you will receive a Client ID and Client Secret that will allow you to request an access token. Review the Authentication Guide for more details.

OAuth2

Security Scheme Type OAuth2
clientCredentials OAuth Flow
Token URL: https://api.willowinc.com/v2/oauth2/token
Scopes:

    Pagination

    In many of our endpoints, we support the Continuation Token method of pagination. When you make a request to an endpoint supporting continuation tokens, you will receive a continuation token string in the response body.

    When making a new request for the next page of results, include the continuation token as a query parameter along with the desired page size.

    Errors

    The Willow API uses HTTP response status codes to indicate the success or otherwise of API requests. While not all codes listed below are used, some may be used in the future. Codes in the 2xx range indicate success, codes in the 4xx range indicate an error, and codes in the 5xx range indicate a server-side error. Note that 4xx and 5xx responses may be returned for any request and clients should cater for them.

    Response
    Code
    Description
    200 Success -- The request was successful.
    201 Created -- The resource was successfully created.
    400 Bad Request -- General client error, possibly malformed data.
    401 Unauthorized -- The API Key was not authorised (or no API Key was found).
    402 Payment Required -- The API is not available on your current plan.
    403 Forbidden -- The request is not allowed.
    404 Not Found -- The resource was not found.
    405 Method Not Allowed -- The resource does not accept the HTTP method.
    406 Not Acceptable -- The resource cannot return the client's required content type.
    408 Request Timeout -- The server would not wait any longer for the client.
    409 Conflict - This request attempts to create a duplicate.
    415 Unsupported Media Type - The server doesn't accept the submitted content-type.
    422 Unprocessable Entity -- The data was well-formed but invalid.
    429 Too Many Requests -- The client has reached or exceeded a rate limit, or the server is overloaded.
    500, 502,
    503, 504
    Server errors - something went wrong with Willow's servers.
    These errors are most likely momentary operational errors, and requests should be retried once.

    Rate Limiting

    API Rate Limits are in place to protect Willow from API traffic spikes and flooding attacks that could put our platform at risk. We therefore measure the amount of requests sent to the API in order to throttle these when they surpass the amount allowed. Upon exceeding the threshold, we will respond with '429 Too Many Requests'.

    Willow Rate Limits

    X-RateLimit-Limit: 3600
    X-RateLimit-Remaining: 3599
    X-RateLimit-Reset: 1590793125

    The default rate limit for the Willow API is 3,600 API calls per hour at this time. The following response headers are returned with each API call to help your app monitor its rate limiting status.

    Header Description
    X-RateLimit-Limit Maximum number of requests allowed for the app.
    X-RateLimit-Remaining Number of requests left in the current time.
    X-RateLimit-Reset The Unix Timestamp when the number of requests will be reset to the maximum limit.

    Auth

    Authentication is required prior to accessing the Willow API. Refer to Authentication section above for details.

    Retrieve an access token

    Request Body schema:
    clientId
    string Nullable
    clientSecret
    string Nullable

    Responses

    Request samples

    Content type
    {
    • "clientId": "string",
    • "clientSecret": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "accessToken": "string",
    • "expiresIn": 0,
    • "tokenType": "string"
    }

    Sites

    Sites are the root node for location objects in the digital twin. The term site is used to refer to buildings, venues, campuses, and other asset classes and geolocations. Because sites are a well understood locations, they are flexible in the exact type of structure or area in which they define. Floors are attached to Sites and can be retrieved by defining the siteId as a path parameter.

    List sites

    Authorizations:

    Responses

    Request samples

    const resp = await fetch(
      `https://api.willowinc.com/v2/sites`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "id": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
      • "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac",
      • "name": "North America HQ",
      • "tzid": "Eastern Standard Time",
      • "location": {
        • "address": "575 5th Ave, 17th Floor",
        • "postCode": "10017",
        • "suburb": "New York",
        • "state": "New York",
        • "country": "United States"
        },
      • "regionId": "string"
      }
    ]

    List floors

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    query Parameters
    pageSize
    integer <int32> [ 0 .. 100 ] Nullable
    Default: 100

    Define the page size (number of elements to return).

    continuationToken
    string Nullable

    String used for pagination. Submit the Continuation Token returned in the previous request to fetch the next page of results.

    Responses

    Request samples

    const query = new URLSearchParams({
      pageSize: '100',
      continuationToken: 'string'
    }).toString();
    
    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/floors?${query}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "id": "b7d170fd-48fd-4392-a4e9-1ad5880edc62",
      • "name": "Level 10",
      • "code": "L010"
      }
    ]

    Retrieve ADT Status for a Site

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/isadt`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    true

    Assets

    Assets are physical objects located at the site that have a commonly understood identity and value. The WillowTwin product suite refers to the collection of Assets at a site as the Asset Register. These may be Equipment objects such as Electrical Panelboards or Fire Pumps or static objects such as doors, windows, or workstations. Each asset is assigned to a Category such as HVAC - Air Side or Architectural to enable grouping of common pieces of equipment. Each Asset also has a rich set of parameters, or properties. These parameters may be common across all assets, such as Specification Section, or unique to an Asset type such as VAV-Box Maximum Airflow Rating (CFM).

    Retrieve an Asset

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    assetId
    required
    string <uuid>
    Example: 62b1928c-7331-02a3-bc74-3dba18ca91a2

    The unique ID of the asset which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const assetId = 'YOUR_assetId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/assets/${assetId}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    {
    • "id": "62b1928c-7331-02a3-bc74-3dba18ca91a2",
    • "modelId": "dtmi:com:willowinc:FanPoweredBox;1",
    • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02",
    • "name": "Variable Air Volume Box VAV-01.1",
    • "hasLiveData": true,
    • "categoryId": "00300000-0000-0000-0000-000000010976",
    • "categoryName": "Fan Powered Box",
    • "floorId": "b7d170fd-48fd-4392-a4e9-1ad5880edc62",
    • "identifier": "VAV-01.1",
    • "forgeViewerModelId": "b7d170fd-48fd-4392-a4e9-1ad5880edc62",
    • "tags": [
      • {
        • "name": "equip"
        },
      • {
        • "name": "hvac"
        },
      • {
        • "name": "fpb"
        },
      • {
        • "name": "coolOnly"
        }
      ],
    • "points": [
      • {
        • "id": "0fcd55ad-251d-4111-bed9-de32c7addb52",
        • "modelId": "dtmi:com:willowinc:TemperatureSensor;1",
        • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02-ZAT",
        • "trendId": "0fcd55ad-251d-4111-bed9-de32c7addb52",
        • "externalId": "11011AI6",
        • "name": "Zone Temperature Sensor",
        • "description": "FPB 17.02 - Zone Temperature Sensor",
        • "tags": [
          • {
            • "name": "zone"
            },
          • {
            • "name": "air"
            },
          • {
            • "name": "temp",
            • "feature": "3d"
            },
          • {
            • "name": "sensor"
            }
          ],
        • "type": "analog",
        • "currentValue": {
          • "value": 22.5863236278265,
          • "unit": "degC"
          },
        • "displayPriority": 1,
        • "assets": [
          • {
            • "id": "12a81670-1b05-465f-940f-ec5371843e34",
            • "name": "FPB 17.02",
            • "categoryName": "Fan Powered Box"
            },
          • {
            • "id": "09ade39f-a69a-4d95-a8e0-dc28309874e4",
            • "name": "BACnet Controller 17.1",
            • "categoryName": "Controller"
            }
          ],
        • "trenedInterval": 1200,
        • "isEnabled": true,
        • "isDetected": true,
        • "deviceId": "19f770eb-b77f-4c35-b479-63d2c08f35b6",
        • "categoryName": "Temperature Sensor",
        • "properties": {
          • "property1": {
            • "displayName": "phenomenon",
            • "value": "Water",
            • "kind": "string"
            }
          },
        • "metadata": [
          • {
            • "key": "manufacturer",
            • "value": "omega",
            • "dataType": "string"
            }
          ]
        }
      ],
    • "parentId": "d27058e5-32cb-4411-992b-0804dbdb929d",
    • "assetParameters": [
      • {
        • "key": "assetType",
        • "displayName": "Asset Type",
        • "value": "Terminal Unit - VAV Box"
        },
      • {
        • "key": "specificationSection",
        • "displayName": "Specification Section",
        • "value": "23 36 00"
        },
      • {
        • "key": "roomNumber",
        • "displayName": "Room Number",
        • "value": "01-104"
        },
      • {
        • "key": "maxAirflowRating",
        • "displayName": "Maximum Airflow Rating (CFM)",
        • "value": 300
        }
      ]
    }

    List Asset Categories

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/categories`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "id": "00300000-0000-0000-0000-000000010605",
      • "name": "Mechanical - Air Side",
      • "childCategories": [
        • [
          • {
            • "id": "00300000-0000-0000-0000-000000010976",
            • "name": "VAV Boxes",
            • "childCategories": [ ]
            },
          • {
            • "id": "00300000-0000-0000-0000-000000010979",
            • "name": "Fan Coil Units",
            • "childCategories": [ ]
            },
          • {
            • "id": "00300000-0000-0000-0000-000000010980",
            • "name": "Dampers",
            • "childCategories": [ ]
            }
          ]
        ]
      }
    ]

    List Assets

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    categoryId
    required
    string <uuid>
    Example: 00300000-0000-0000-0000-000000010605

    The unique ID of the asset category which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const categoryId = 'YOUR_categoryId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/categories/${categoryId}/assets`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "id": "62b1928c-7331-02a3-bc74-3dba18ca91a2",
      • "modelId": "dtmi:com:willowinc:FanPoweredBox;1",
      • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02",
      • "name": "Variable Air Volume Box VAV-01.1",
      • "hasLiveData": true,
      • "categoryId": "00300000-0000-0000-0000-000000010976",
      • "categoryName": "Fan Powered Box",
      • "floorId": "b7d170fd-48fd-4392-a4e9-1ad5880edc62",
      • "identifier": "VAV-01.1",
      • "forgeViewerModelId": "b7d170fd-48fd-4392-a4e9-1ad5880edc62",
      • "tags": [
        • {
          • "name": "equip"
          },
        • {
          • "name": "hvac"
          },
        • {
          • "name": "fpb"
          },
        • {
          • "name": "coolOnly"
          }
        ],
      • "points": [
        • {
          • "id": "0fcd55ad-251d-4111-bed9-de32c7addb52",
          • "modelId": "dtmi:com:willowinc:TemperatureSensor;1",
          • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02-ZAT",
          • "trendId": "0fcd55ad-251d-4111-bed9-de32c7addb52",
          • "externalId": "11011AI6",
          • "name": "Zone Temperature Sensor",
          • "description": "FPB 17.02 - Zone Temperature Sensor",
          • "tags": [
            • {
              • "name": "zone"
              },
            • {
              • "name": "air"
              },
            • {
              • "name": "temp",
              • "feature": "3d"
              },
            • {
              • "name": "sensor"
              }
            ],
          • "type": "analog",
          • "currentValue": {
            • "value": 22.5863236278265,
            • "unit": "degC"
            },
          • "displayPriority": 1,
          • "assets": [
            • {
              • "id": "12a81670-1b05-465f-940f-ec5371843e34",
              • "name": "FPB 17.02",
              • "categoryName": "Fan Powered Box"
              },
            • {
              • "id": "09ade39f-a69a-4d95-a8e0-dc28309874e4",
              • "name": "BACnet Controller 17.1",
              • "categoryName": "Controller"
              }
            ],
          • "trenedInterval": 1200,
          • "isEnabled": true,
          • "isDetected": true,
          • "deviceId": "19f770eb-b77f-4c35-b479-63d2c08f35b6",
          • "categoryName": "Temperature Sensor",
          • "properties": {
            • "property1": {
              • "displayName": "phenomenon",
              • "value": "Water",
              • "kind": "string"
              }
            },
          • "metadata": [
            • {
              • "key": "manufacturer",
              • "value": "omega",
              • "dataType": "string"
              }
            ]
          }
        ],
      • "parentId": "d27058e5-32cb-4411-992b-0804dbdb929d",
      • "assetParameters": [
        • {
          • "key": "assetType",
          • "displayName": "Asset Type",
          • "value": "Terminal Unit - VAV Box"
          },
        • {
          • "key": "specificationSection",
          • "displayName": "Specification Section",
          • "value": "23 36 00"
          },
        • {
          • "key": "roomNumber",
          • "displayName": "Room Number",
          • "value": "01-104"
          },
        • {
          • "key": "maxAirflowRating",
          • "displayName": "Maximum Airflow Rating (CFM)",
          • "value": 300
          }
        ]
      }
    ]

    Equipment

    Equipment is the root node for asset objects in the digital twin. Equipment are physical objects that may optionally have associated Devices, Points, and Live Data. Equipment is associated to a location in the digital twin as well as a parent which enables a user to understand location context as well as system relationships between equipment. The Equipment Object is categorized with a discipline such as HVAC or Electrical to enable grouping of common pieces of equipment. The digital twin also has tags associated with each Equipment to provide metadata about the object. These tags follow the guidance of Project Haystack but can be customized for each Customer and Site. Tags are strings that can be grouped together into arrays and applied to Equipment to provide metadata about the type, function, or purpose. These arrays are often referred to as Tagsets and are a means of providing standard context about an entity.

    List equipment

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    query Parameters
    pageSize
    integer <int32> [ 0 .. 100 ] Nullable
    Default: 100

    Define the page size (number of elements to return).

    pageStart
    integer <int32> Nullable
    Default: 0

    Index of the page.

    categoryId
    string <uuid> Nullable
    Example: categoryId=00300000-0000-0000-0000-000000010976

    The unique ID of the category given by Willow which the asset belongs to

    floorId
    string <uuid> Nullable
    Example: floorId=b7d170fd-48fd-4392-a4e9-1ad5880edc62

    The unique ID of the floor which is given by Willow

    liveDataOnly
    boolean Nullable
    Default: false
    Example: liveDataOnly=true

    Filter response to only return twins that have live data points associated

    Responses

    Request samples

    const query = new URLSearchParams({
      pageSize: '100',
      pageStart: '0',
      categoryId: '00300000-0000-0000-0000-000000010976',
      floorId: 'b7d170fd-48fd-4392-a4e9-1ad5880edc62',
      liveDataOnly: 'true'
    }).toString();
    
    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/equipment?${query}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    {
    • "continuationToken": "string",
    • "data": [
      • {
        • "id": "62b1928c-7331-02a3-bc74-3dba18ca91a2",
        • "modelId": "dtmi:com:willowinc:FanPoweredBox;1",
        • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02",
        • "name": "Variable Air Volume Box VAV-01.1",
        • "hasLiveData": true,
        • "categoryId": "00300000-0000-0000-0000-000000010976",
        • "categoryName": "Fan Powered Box",
        • "floorId": "b7d170fd-48fd-4392-a4e9-1ad5880edc62",
        • "identifier": "VAV-01.1",
        • "forgeViewerModelId": "b7d170fd-48fd-4392-a4e9-1ad5880edc62",
        • "tags": [
          • {
            • "name": "equip"
            },
          • {
            • "name": "hvac"
            },
          • {
            • "name": "fpb"
            },
          • {
            • "name": "coolOnly"
            }
          ],
        • "points": [
          • {
            • "id": "0fcd55ad-251d-4111-bed9-de32c7addb52",
            • "modelId": "dtmi:com:willowinc:TemperatureSensor;1",
            • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02-ZAT",
            • "trendId": "0fcd55ad-251d-4111-bed9-de32c7addb52",
            • "externalId": "11011AI6",
            • "name": "Zone Temperature Sensor",
            • "description": "FPB 17.02 - Zone Temperature Sensor",
            • "tags": [
              • {
                • "name": "zone"
                },
              • {
                • "name": "air"
                },
              • {
                • "name": "temp",
                • "feature": "3d"
                },
              • {
                • "name": "sensor"
                }
              ],
            • "type": "analog",
            • "currentValue": {
              • "value": 22.5863236278265,
              • "unit": "degC"
              },
            • "displayPriority": 1,
            • "assets": [
              • {
                • "id": "12a81670-1b05-465f-940f-ec5371843e34",
                • "name": "FPB 17.02",
                • "categoryName": "Fan Powered Box"
                },
              • {
                • "id": "09ade39f-a69a-4d95-a8e0-dc28309874e4",
                • "name": "BACnet Controller 17.1",
                • "categoryName": "Controller"
                }
              ],
            • "trenedInterval": 1200,
            • "isEnabled": true,
            • "isDetected": true,
            • "deviceId": "19f770eb-b77f-4c35-b479-63d2c08f35b6",
            • "categoryName": "Temperature Sensor",
            • "properties": {
              • "property1": {
                • "displayName": "phenomenon",
                • "value": "Water",
                • "kind": "string"
                }
              },
            • "metadata": [
              • {
                • "key": "manufacturer",
                • "value": "omega",
                • "dataType": "string"
                }
              ]
            }
          ],
        • "parentId": "d27058e5-32cb-4411-992b-0804dbdb929d",
        • "assetParameters": [
          • {
            • "key": "assetType",
            • "displayName": "Asset Type",
            • "value": "Terminal Unit - VAV Box"
            },
          • {
            • "key": "specificationSection",
            • "displayName": "Specification Section",
            • "value": "23 36 00"
            },
          • {
            • "key": "roomNumber",
            • "displayName": "Room Number",
            • "value": "01-104"
            },
          • {
            • "key": "maxAirflowRating",
            • "displayName": "Maximum Airflow Rating (CFM)",
            • "value": 300
            }
          ]
        }
      ]
    }

    List equipment

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    query Parameters
    pageSize
    integer <int32> [ 0 .. 100 ] Nullable
    Default: 100

    Define the page size (number of elements to return).

    continuationToken
    string Nullable

    String used for pagination. Submit the Continuation Token returned in the previous request to fetch the next page of results.

    Responses

    Request samples

    const query = new URLSearchParams({
      pageSize: '100',
      continuationToken: 'string'
    }).toString();
    
    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/equipments?${query}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    {
    • "continuationToken": "string",
    • "data": [
      • {
        • "id": "62b1928c-7331-02a3-bc74-3dba18ca91a2",
        • "modelId": "dtmi:com:willowinc:FanPoweredBox;1",
        • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02",
        • "name": "Variable Air Volume Box VAV-01.1",
        • "hasLiveData": true,
        • "categoryId": "00300000-0000-0000-0000-000000010976",
        • "categoryName": "Fan Powered Box",
        • "floorId": "b7d170fd-48fd-4392-a4e9-1ad5880edc62",
        • "identifier": "VAV-01.1",
        • "forgeViewerModelId": "b7d170fd-48fd-4392-a4e9-1ad5880edc62",
        • "tags": [
          • {
            • "name": "equip"
            },
          • {
            • "name": "hvac"
            },
          • {
            • "name": "fpb"
            },
          • {
            • "name": "coolOnly"
            }
          ],
        • "points": [
          • {
            • "id": "0fcd55ad-251d-4111-bed9-de32c7addb52",
            • "modelId": "dtmi:com:willowinc:TemperatureSensor;1",
            • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02-ZAT",
            • "trendId": "0fcd55ad-251d-4111-bed9-de32c7addb52",
            • "externalId": "11011AI6",
            • "name": "Zone Temperature Sensor",
            • "description": "FPB 17.02 - Zone Temperature Sensor",
            • "tags": [
              • {
                • "name": "zone"
                },
              • {
                • "name": "air"
                },
              • {
                • "name": "temp",
                • "feature": "3d"
                },
              • {
                • "name": "sensor"
                }
              ],
            • "type": "analog",
            • "currentValue": {
              • "value": 22.5863236278265,
              • "unit": "degC"
              },
            • "displayPriority": 1,
            • "assets": [
              • {
                • "id": "12a81670-1b05-465f-940f-ec5371843e34",
                • "name": "FPB 17.02",
                • "categoryName": "Fan Powered Box"
                },
              • {
                • "id": "09ade39f-a69a-4d95-a8e0-dc28309874e4",
                • "name": "BACnet Controller 17.1",
                • "categoryName": "Controller"
                }
              ],
            • "trenedInterval": 1200,
            • "isEnabled": true,
            • "isDetected": true,
            • "deviceId": "19f770eb-b77f-4c35-b479-63d2c08f35b6",
            • "categoryName": "Temperature Sensor",
            • "properties": {
              • "property1": {
                • "displayName": "phenomenon",
                • "value": "Water",
                • "kind": "string"
                }
              },
            • "metadata": [
              • {
                • "key": "manufacturer",
                • "value": "omega",
                • "dataType": "string"
                }
              ]
            }
          ],
        • "parentId": "d27058e5-32cb-4411-992b-0804dbdb929d",
        • "assetParameters": [
          • {
            • "key": "assetType",
            • "displayName": "Asset Type",
            • "value": "Terminal Unit - VAV Box"
            },
          • {
            • "key": "specificationSection",
            • "displayName": "Specification Section",
            • "value": "23 36 00"
            },
          • {
            • "key": "roomNumber",
            • "displayName": "Room Number",
            • "value": "01-104"
            },
          • {
            • "key": "maxAirflowRating",
            • "displayName": "Maximum Airflow Rating (CFM)",
            • "value": 300
            }
          ]
        }
      ]
    }

    Devices

    Devices are controller objects that have inputs and outputs that correspond to Point objects receiving and transmitting Live Data. We adopt the use of Devices to follow BACnet terminology. These controllers are often associated with a single Equipment object but may have Point objects that span across multiple pieces of Equipment.

    List devices

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    query Parameters
    pageSize
    integer <int32> [ 0 .. 100 ] Nullable
    Default: 100

    Define the page size (number of elements to return).

    continuationToken
    string Nullable

    String used for pagination. Submit the Continuation Token returned in the previous request to fetch the next page of results.

    Responses

    Request samples

    const query = new URLSearchParams({
      pageSize: '100',
      continuationToken: 'string'
    }).toString();
    
    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/devices?${query}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    {
    • "continuationToken": "string",
    • "data": [
      • {
        • "id": "19f770eb-b77f-4c35-b479-63d2c08f35b6",
        • "modelId": "dtmi:com:willowinc:Controller;1",
        • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02",
        • "registrationId": "string",
        • "registrationKey": "string",
        • "isEnabled": true,
        • "isDetected": true,
        • "connectorId": "string",
        • "points": [
          • {
            • "id": "0fcd55ad-251d-4111-bed9-de32c7addb52",
            • "modelId": "dtmi:com:willowinc:TemperatureSensor;1",
            • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02-ZAT",
            • "trendId": "0fcd55ad-251d-4111-bed9-de32c7addb52",
            • "externalId": "11011AI6",
            • "name": "Zone Temperature Sensor",
            • "description": "FPB 17.02 - Zone Temperature Sensor",
            • "tags": [
              • {
                • "name": "zone"
                },
              • {
                • "name": "air"
                },
              • {
                • "name": "temp",
                • "feature": "3d"
                },
              • {
                • "name": "sensor"
                }
              ],
            • "type": "analog",
            • "currentValue": {
              • "value": 22.5863236278265,
              • "unit": "degC"
              },
            • "displayPriority": 1,
            • "assets": [
              • {
                • "id": "12a81670-1b05-465f-940f-ec5371843e34",
                • "name": "FPB 17.02",
                • "categoryName": "Fan Powered Box"
                },
              • {
                • "id": "09ade39f-a69a-4d95-a8e0-dc28309874e4",
                • "name": "BACnet Controller 17.1",
                • "categoryName": "Controller"
                }
              ],
            • "trenedInterval": 1200,
            • "isEnabled": true,
            • "isDetected": true,
            • "deviceId": "19f770eb-b77f-4c35-b479-63d2c08f35b6",
            • "categoryName": "Temperature Sensor",
            • "properties": {
              • "property1": {
                • "displayName": "phenomenon",
                • "value": "Water",
                • "kind": "string"
                }
              },
            • "metadata": [
              • {
                • "key": "manufacturer",
                • "value": "omega",
                • "dataType": "string"
                }
              ]
            }
          ]
        }
      ]
    }

    Points

    Points can be treated as leaf nodes for asset objects in the digital twin. They are children to both Equipment and Devices and correspond to Live Data that is often being received of transmitted from a device. Similar to Equipment, tags are associated with each Point to provide metadata about the object. These tags also follow the guidance of Project Haystack and can be customized for each Customer and Site. Tags are strings that can be grouped together into arrays and applied to Points to provide metadata about the type, function, or purpose. These arrays are often referred to as Tagsets and are a means of providing standard context about an entity.

    List points

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    query Parameters
    pageSize
    integer <int32> [ 0 .. 100 ] Nullable
    Default: 100

    Define the page size (number of elements to return).

    pageStart
    integer <int32> Nullable
    Default: 0

    Index of the page.

    equipmentId
    string <uuid> Nullable
    Example: equipmentId=6be53768-811e-4db8-baee-471a01498df7

    The unique ID of the equipment which is given by Willow

    includeAssets
    boolean Nullable
    Default: false
    Example: includeAssets=true

    Whether the response should include the asset object

    Responses

    Request samples

    const query = new URLSearchParams({
      pageSize: '100',
      pageStart: '0',
      equipmentId: '6be53768-811e-4db8-baee-471a01498df7',
      includeAssets: 'true'
    }).toString();
    
    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/points?${query}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "id": "0fcd55ad-251d-4111-bed9-de32c7addb52",
      • "modelId": "dtmi:com:willowinc:TemperatureSensor;1",
      • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02-ZAT",
      • "trendId": "0fcd55ad-251d-4111-bed9-de32c7addb52",
      • "externalId": "11011AI6",
      • "name": "Zone Temperature Sensor",
      • "description": "FPB 17.02 - Zone Temperature Sensor",
      • "tags": [
        • {
          • "name": "zone"
          },
        • {
          • "name": "air"
          },
        • {
          • "name": "temp",
          • "feature": "3d"
          },
        • {
          • "name": "sensor"
          }
        ],
      • "type": "analog",
      • "currentValue": {
        • "value": 22.5863236278265,
        • "unit": "degC"
        },
      • "displayPriority": 1,
      • "assets": [
        • {
          • "id": "12a81670-1b05-465f-940f-ec5371843e34",
          • "name": "FPB 17.02",
          • "categoryName": "Fan Powered Box"
          },
        • {
          • "id": "09ade39f-a69a-4d95-a8e0-dc28309874e4",
          • "name": "BACnet Controller 17.1",
          • "categoryName": "Controller"
          }
        ],
      • "trenedInterval": 1200,
      • "isEnabled": true,
      • "isDetected": true,
      • "deviceId": "19f770eb-b77f-4c35-b479-63d2c08f35b6",
      • "categoryName": "Temperature Sensor",
      • "properties": {
        • "property1": {
          • "displayName": "phenomenon",
          • "value": "Water",
          • "kind": "string"
          }
        },
      • "metadata": [
        • {
          • "key": "manufacturer",
          • "value": "omega",
          • "dataType": "string"
          }
        ]
      }
    ]

    Retrieve a point

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    id
    required
    string <uuid>
    Example: WLW-NYC-575_5_AVE-FPB-17.02

    The unique ID of the resource

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const id = 'YOUR_id_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/points/${id}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    {
    • "id": "0fcd55ad-251d-4111-bed9-de32c7addb52",
    • "modelId": "dtmi:com:willowinc:TemperatureSensor;1",
    • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02-ZAT",
    • "trendId": "0fcd55ad-251d-4111-bed9-de32c7addb52",
    • "externalId": "11011AI6",
    • "name": "Zone Temperature Sensor",
    • "description": "FPB 17.02 - Zone Temperature Sensor",
    • "tags": [
      • {
        • "name": "zone"
        },
      • {
        • "name": "air"
        },
      • {
        • "name": "temp",
        • "feature": "3d"
        },
      • {
        • "name": "sensor"
        }
      ],
    • "type": "analog",
    • "currentValue": {
      • "value": 22.5863236278265,
      • "unit": "degC"
      },
    • "displayPriority": 1,
    • "assets": [
      • {
        • "id": "12a81670-1b05-465f-940f-ec5371843e34",
        • "name": "FPB 17.02",
        • "categoryName": "Fan Powered Box"
        },
      • {
        • "id": "09ade39f-a69a-4d95-a8e0-dc28309874e4",
        • "name": "BACnet Controller 17.1",
        • "categoryName": "Controller"
        }
      ],
    • "trenedInterval": 1200,
    • "isEnabled": true,
    • "isDetected": true,
    • "deviceId": "19f770eb-b77f-4c35-b479-63d2c08f35b6",
    • "categoryName": "Temperature Sensor",
    • "properties": {
      • "property1": {
        • "displayName": "phenomenon",
        • "value": "Water",
        • "kind": "string"
        }
      },
    • "metadata": [
      • {
        • "key": "manufacturer",
        • "value": "omega",
        • "dataType": "string"
        }
      ]
    }

    Live Data

    Live Data generated by Points and stored in the digital twin and always associated with a timestamp value. The Willow API has the ability to read current values as well as a historical trend via the Trend Logs endpoint.

    List time series

    This endpoint returns the time series data for point(s) in an aggregated response according to the defined granularity. The following table shows the default and recommended granularity parameter for a give date range:

    Range of Days Default
    Granularity
    Granularity
    Recommendations
    Granularity
    Recommendations (ISO 8601)
    <= 1 5 minutes 5 minutes
    10 minutes
    15 minutes
    30 minutes
    PT5M
    PT10M
    PT15M
    PT30M
    <= 3 5 minutes 5 minutes
    10 minutes
    15 minutes
    30 minutes
    1 hour
    PT5M
    PT10M
    PT15M
    PT30M
    PT1H
    <=7 10 minutes 10 minutes
    15 minutes
    30 minutes
    1 hour
    2 hours
    4 hours
    12 hours
    1 day
    PT10M
    PT15M
    PT30M
    PT1H
    PT2H
    PT4H
    PT12H
    P1D
    <= 11 15 minutes 15 minutes
    30 minutes
    1 hour
    2 hours
    4 hours
    12 hours
    1 day
    PT15M
    PT30M
    PT1H
    PT2H
    PT4H
    PT12H
    P1D
    <= 35 30 minutes 30 minutes
    1 hour
    2 hours
    4 hours
    12 hours
    1 day
    PT30M
    PT1H
    PT2H
    PT4H
    PT12H
    P1D
    <= 49 1 hour 1 hour
    2 hours
    4 hours
    12 hours
    1 day
    1 week
    PT1H
    PT2H
    PT4H
    PT12H
    P1D
    P1W
    <= 91 2 hours 2 hours
    4 hours
    12 hours
    1 day
    1 week
    PT2H
    PT4H
    PT12H
    P1D
    P1W
    <= 182 4 hours 4 hours
    12 hours
    1 day
    1 week
    1 month
    PT4H
    PT12H
    P1D
    P1W
    P1M
    <= 371 12 hours 12 hours
    1 day
    1 week
    1 month
    PT12H
    P1D
    P1W
    P1M

    While this endpoint will accept additional granularity options, the above are recommended for the best performance.

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    query Parameters
    pointIds
    Array of strings <uuid> Nullable
    Example: pointIds=0fcd55ad-251d-4111-bed9-de32c7addb52,7461183c-139f-4e60-95ba-6a6b3d3f9321

    Array of unique point IDs given by Willow

    startDate
    required
    string <date-time> Nullable
    Example: startDate=2020-05-23T22:12:21.047Z

    Start date and time of specific results desired in ISO 8601 format

    endDate
    required
    string <date-time> Nullable
    Example: endDate=2020-05-30T22:12:21.047Z

    End date and time of specific results desired in ISO 8601 format

    granularity
    string <ISO8601> Nullable
    Example: granularity=P0DT1H

    Interval at which the time series values should be aggregated, aligned, and returned in ISO 8601 format

    Responses

    Request samples

    const query = new URLSearchParams({
      pointIds: '0fcd55ad-251d-4111-bed9-de32c7addb52,7461183c-139f-4e60-95ba-6a6b3d3f9321',
      startDate: '2020-05-23T22:12:21.047Z',
      endDate: '2020-05-30T22:12:21.047Z',
      granularity: 'P0DT1H'
    }).toString();
    
    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/timemachine?${query}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "pointId": "0fcd55ad-251d-4111-bed9-de32c7addb52",
      • "name": "zone air temp sensor",
      • "type": "analog",
      • "unit": "degC",
      • "data": [
        • {
          • "timestamp": "2020-05-27T16:00:00.000Z",
          • "average": "22.5",
          • "minimum": "18.9",
          • "maximum": "26.8",
          • "sum": "120.8",
          • "onCount": "5",
          • "offCount": "4"
          },
        • {
          • "timestamp": "2020-05-27T17:00:00.000Z",
          • "average": "24.1",
          • "minimum": "20.7",
          • "maximum": "25.9",
          • "sum": "110.4",
          • "onCount": "3",
          • "offCount": "6"
          }
        ]
      }
    ]

    Trend Logs

    Trend logs return an array of timestamped Point values. Because Live Data is often captured at intervals on the order of minutes, this endpoint can return a large amount of data with a single API call. Therefore, we recommend leveraging the query parameters to return a specific Point and interval by specifying the desired startDate and endDate.

    Retrieve a point trend log

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    pointId
    required
    string <uuid>
    Example: 0fcd55ad-251d-4111-bed9-de32c7addb52

    The unique ID of the point which is given by Willow

    query Parameters
    startDate
    string <date-time> Nullable
    Example: startDate=2020-05-23T22:12:21.047Z

    Start date and time of specific results desired in ISO 8601 format

    endDate
    string <date-time> Nullable
    Example: endDate=2020-05-30T22:12:21.047Z

    End date and time of specific results desired in ISO 8601 format

    Responses

    Request samples

    const query = new URLSearchParams({
      startDate: '2020-05-23T22:12:21.047Z',
      endDate: '2020-05-30T22:12:21.047Z'
    }).toString();
    
    const siteId = 'YOUR_siteId_PARAMETER';
    const pointId = 'YOUR_pointId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/points/${pointId}/trendlog?${query}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    {
    • "continuationToken": "string",
    • "point": {
      • "id": "0fcd55ad-251d-4111-bed9-de32c7addb52",
      • "modelId": "dtmi:com:willowinc:TemperatureSensor;1",
      • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02-ZAT",
      • "trendId": "0fcd55ad-251d-4111-bed9-de32c7addb52",
      • "externalId": "11011AI6",
      • "name": "Zone Temperature Sensor",
      • "description": "FPB 17.02 - Zone Temperature Sensor",
      • "tags": [
        • {
          • "name": "zone"
          },
        • {
          • "name": "air"
          },
        • {
          • "name": "temp",
          • "feature": "3d"
          },
        • {
          • "name": "sensor"
          }
        ],
      • "type": "analog",
      • "currentValue": {
        • "value": 22.5863236278265,
        • "unit": "degC"
        },
      • "displayPriority": 1,
      • "assets": [
        • {
          • "id": "12a81670-1b05-465f-940f-ec5371843e34",
          • "name": "FPB 17.02",
          • "categoryName": "Fan Powered Box"
          },
        • {
          • "id": "09ade39f-a69a-4d95-a8e0-dc28309874e4",
          • "name": "BACnet Controller 17.1",
          • "categoryName": "Controller"
          }
        ],
      • "trenedInterval": 1200,
      • "isEnabled": true,
      • "isDetected": true,
      • "deviceId": "19f770eb-b77f-4c35-b479-63d2c08f35b6",
      • "categoryName": "Temperature Sensor",
      • "properties": {
        • "property1": {
          • "displayName": "phenomenon",
          • "value": "Water",
          • "kind": "string"
          }
        },
      • "metadata": [
        • {
          • "key": "manufacturer",
          • "value": "omega",
          • "dataType": "string"
          }
        ]
      },
    • "data": [
      • {
        • "timestamp": "2019-08-24T14:15:22Z",
        • "value": "string"
        }
      ]
    }

    Create point trend logs Deprecated

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    query Parameters
    startDate
    string <date-time> Nullable
    Example: startDate=2020-05-23T22:12:21.047Z

    Start date and time of specific results desired in ISO 8601 format

    endDate
    string <date-time> Nullable
    Example: endDate=2020-05-30T22:12:21.047Z

    End date and time of specific results desired in ISO 8601 format

    Request Body schema:
    Array ()
    string <uuid>

    Responses

    Request samples

    Content type
    [
    • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ]

    Response samples

    Content type
    application/json
    [
    • {
      • "continuationToken": "string",
      • "point": {
        • "id": "0fcd55ad-251d-4111-bed9-de32c7addb52",
        • "modelId": "dtmi:com:willowinc:TemperatureSensor;1",
        • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02-ZAT",
        • "trendId": "0fcd55ad-251d-4111-bed9-de32c7addb52",
        • "externalId": "11011AI6",
        • "name": "Zone Temperature Sensor",
        • "description": "FPB 17.02 - Zone Temperature Sensor",
        • "tags": [
          • {
            • "name": "zone"
            },
          • {
            • "name": "air"
            },
          • {
            • "name": "temp",
            • "feature": "3d"
            },
          • {
            • "name": "sensor"
            }
          ],
        • "type": "analog",
        • "currentValue": {
          • "value": 22.5863236278265,
          • "unit": "degC"
          },
        • "displayPriority": 1,
        • "assets": [
          • {
            • "id": "12a81670-1b05-465f-940f-ec5371843e34",
            • "name": "FPB 17.02",
            • "categoryName": "Fan Powered Box"
            },
          • {
            • "id": "09ade39f-a69a-4d95-a8e0-dc28309874e4",
            • "name": "BACnet Controller 17.1",
            • "categoryName": "Controller"
            }
          ],
        • "trenedInterval": 1200,
        • "isEnabled": true,
        • "isDetected": true,
        • "deviceId": "19f770eb-b77f-4c35-b479-63d2c08f35b6",
        • "categoryName": "Temperature Sensor",
        • "properties": {
          • "property1": {
            • "displayName": "phenomenon",
            • "value": "Water",
            • "kind": "string"
            }
          },
        • "metadata": [
          • {
            • "key": "manufacturer",
            • "value": "omega",
            • "dataType": "string"
            }
          ]
        },
      • "data": [
        • {
          • "timestamp": "2019-08-24T14:15:22Z",
          • "value": "string"
          }
        ]
      }
    ]

    List point trend logs

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    query Parameters
    pointIds
    Array of strings <uuid> Nullable
    Example: pointIds=0fcd55ad-251d-4111-bed9-de32c7addb52,7461183c-139f-4e60-95ba-6a6b3d3f9321

    Array of unique point IDs given by Willow

    startDate
    string <date-time> Nullable
    Example: startDate=2020-05-23T22:12:21.047Z

    Start date and time of specific results desired in ISO 8601 format

    endDate
    string <date-time> Nullable
    Example: endDate=2020-05-30T22:12:21.047Z

    End date and time of specific results desired in ISO 8601 format

    Responses

    Request samples

    const query = new URLSearchParams({
      pointIds: '0fcd55ad-251d-4111-bed9-de32c7addb52,7461183c-139f-4e60-95ba-6a6b3d3f9321',
      startDate: '2020-05-23T22:12:21.047Z',
      endDate: '2020-05-30T22:12:21.047Z'
    }).toString();
    
    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/trendlogs?${query}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "continuationToken": "string",
      • "point": {
        • "id": "0fcd55ad-251d-4111-bed9-de32c7addb52",
        • "modelId": "dtmi:com:willowinc:TemperatureSensor;1",
        • "twinId": "WLW-NYC-575_5_AVE-FPB-17.02-ZAT",
        • "trendId": "0fcd55ad-251d-4111-bed9-de32c7addb52",
        • "externalId": "11011AI6",
        • "name": "Zone Temperature Sensor",
        • "description": "FPB 17.02 - Zone Temperature Sensor",
        • "tags": [
          • {
            • "name": "zone"
            },
          • {
            • "name": "air"
            },
          • {
            • "name": "temp",
            • "feature": "3d"
            },
          • {
            • "name": "sensor"
            }
          ],
        • "type": "analog",
        • "currentValue": {
          • "value": 22.5863236278265,
          • "unit": "degC"
          },
        • "displayPriority": 1,
        • "assets": [
          • {
            • "id": "12a81670-1b05-465f-940f-ec5371843e34",
            • "name": "FPB 17.02",
            • "categoryName": "Fan Powered Box"
            },
          • {
            • "id": "09ade39f-a69a-4d95-a8e0-dc28309874e4",
            • "name": "BACnet Controller 17.1",
            • "categoryName": "Controller"
            }
          ],
        • "trenedInterval": 1200,
        • "isEnabled": true,
        • "isDetected": true,
        • "deviceId": "19f770eb-b77f-4c35-b479-63d2c08f35b6",
        • "categoryName": "Temperature Sensor",
        • "properties": {
          • "property1": {
            • "displayName": "phenomenon",
            • "value": "Water",
            • "kind": "string"
            }
          },
        • "metadata": [
          • {
            • "key": "manufacturer",
            • "value": "omega",
            • "dataType": "string"
            }
          ]
        },
      • "data": [
        • {
          • "timestamp": "2019-08-24T14:15:22Z",
          • "value": "string"
          }
        ]
      }
    ]

    Insights

    Insights are often referred to as faults or notifications and are generated within the digital twin based on rules and analytics that trigger from Live and Trended data. Likewise, Insights that are generated outside the Willow platform can be created using this endpoint.

    List insights

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/insights`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "id": "8cf1743b-fcb7-44c8-9b6d-0038323ba9e5",
      • "sequenceNumber": "av-I-465",
      • "floorCode": "L010",
      • "equipmentId": "6be53768-811e-4db8-baee-471a01498df7",
      • "type": "fault",
      • "name": "258adba7",
      • "priority": 3,
      • "status": "inProgress",
      • "state": "active",
      • "occurredDate": "2020-05-28T00:33:02.836Z",
      • "updatedDate": "2020-08-28T13:46:01.919Z",
      • "externalId": "20200428_d4b43edf",
      • "externalStatus": "active",
      • "externalMetadata": "string"
      }
    ]

    Create an insight

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Request Body schema:
    floorCode
    string Nullable
    equipmentId
    string <uuid> Nullable
    type
    string (InsightType)
    Enum: "fault" "energyOptimisation"

    The insight type

    name
    string Nullable
    description
    string Nullable
    priority
    integer <int32>
    state
    string (InsightState)
    Enum: "inactive" "active" "archived"

    The state of the insight

    occurredDate
    string <date-time>
    detectedDate
    string <date-time>
    externalId
    string Nullable
    externalStatus
    string Nullable
    externalMetadata
    string Nullable

    Responses

    Request samples

    Content type
    {
    • "floorCode": "string",
    • "equipmentId": "d2a795e1-f645-4e24-bc0a-ab1965048fcc",
    • "type": "fault",
    • "name": "string",
    • "description": "string",
    • "priority": 0,
    • "state": "active",
    • "occurredDate": "2019-08-24T14:15:22Z",
    • "detectedDate": "2019-08-24T14:15:22Z",
    • "externalId": "string",
    • "externalStatus": "string",
    • "externalMetadata": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "8cf1743b-fcb7-44c8-9b6d-0038323ba9e5",
    • "sequenceNumber": "av-I-465",
    • "floorCode": "L010",
    • "equipmentId": "6be53768-811e-4db8-baee-471a01498df7",
    • "type": "fault",
    • "name": "258adba7",
    • "priority": 3,
    • "status": "inProgress",
    • "state": "active",
    • "occurredDate": "2020-05-28T00:33:02.836Z",
    • "updatedDate": "2020-08-28T13:46:01.919Z",
    • "externalId": "20200428_d4b43edf",
    • "externalStatus": "active",
    • "externalMetadata": "string",
    • "customerId": "3fc260f3-3e91-470b-8285-15a11c799491",
    • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
    • "description": "Chilled Water Pump CWP-01.1 is running when Chiller CH-01 is off.",
    • "createdDate": "2020-05-28T01:25:02.881Z",
    • "detectedDate": "2020-05-28T01:02:02.836Z"
    }

    Retrieve an insight

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    insightId
    required
    string <uuid>
    Example: 8cf1743b-fcb7-44c8-9b6d-0038323ba9e5

    The unique ID of the insight which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const insightId = 'YOUR_insightId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/insights/${insightId}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    {
    • "id": "8cf1743b-fcb7-44c8-9b6d-0038323ba9e5",
    • "sequenceNumber": "av-I-465",
    • "floorCode": "L010",
    • "equipmentId": "6be53768-811e-4db8-baee-471a01498df7",
    • "type": "fault",
    • "name": "258adba7",
    • "priority": 3,
    • "status": "inProgress",
    • "state": "active",
    • "occurredDate": "2020-05-28T00:33:02.836Z",
    • "updatedDate": "2020-08-28T13:46:01.919Z",
    • "externalId": "20200428_d4b43edf",
    • "externalStatus": "active",
    • "externalMetadata": "string",
    • "customerId": "3fc260f3-3e91-470b-8285-15a11c799491",
    • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
    • "description": "Chilled Water Pump CWP-01.1 is running when Chiller CH-01 is off.",
    • "createdDate": "2020-05-28T01:25:02.881Z",
    • "detectedDate": "2020-05-28T01:02:02.836Z"
    }

    Update an insight

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    insightId
    required
    string <uuid>
    Example: 8cf1743b-fcb7-44c8-9b6d-0038323ba9e5

    The unique ID of the insight which is given by Willow

    Request Body schema:
    name
    string Nullable
    description
    string Nullable
    priority
    integer <int32> Nullable
    state
    string (InsightState)
    Enum: "inactive" "active" "archived"

    The state of the insight

    occurredDate
    string <date-time> Nullable
    detectedDate
    string <date-time> Nullable
    externalId
    string Nullable
    externalStatus
    string Nullable
    externalMetadata
    string Nullable

    Responses

    Request samples

    Content type
    {
    • "name": "string",
    • "description": "string",
    • "priority": 0,
    • "state": "active",
    • "occurredDate": "2019-08-24T14:15:22Z",
    • "detectedDate": "2019-08-24T14:15:22Z",
    • "externalId": "string",
    • "externalStatus": "string",
    • "externalMetadata": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "8cf1743b-fcb7-44c8-9b6d-0038323ba9e5",
    • "sequenceNumber": "av-I-465",
    • "floorCode": "L010",
    • "equipmentId": "6be53768-811e-4db8-baee-471a01498df7",
    • "type": "fault",
    • "name": "258adba7",
    • "priority": 3,
    • "status": "inProgress",
    • "state": "active",
    • "occurredDate": "2020-05-28T00:33:02.836Z",
    • "updatedDate": "2020-08-28T13:46:01.919Z",
    • "externalId": "20200428_d4b43edf",
    • "externalStatus": "active",
    • "externalMetadata": "string",
    • "customerId": "3fc260f3-3e91-470b-8285-15a11c799491",
    • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
    • "description": "Chilled Water Pump CWP-01.1 is running when Chiller CH-01 is off.",
    • "createdDate": "2020-05-28T01:25:02.881Z",
    • "detectedDate": "2020-05-28T01:02:02.836Z"
    }

    Delete an insight

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    insightId
    required
    string <uuid>
    Example: 8cf1743b-fcb7-44c8-9b6d-0038323ba9e5

    The unique ID of the insight which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const insightId = 'YOUR_insightId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/insights/${insightId}`,
      {
        method: 'DELETE',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Update an insight state

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    insightId
    required
    string <uuid>
    Example: 8cf1743b-fcb7-44c8-9b6d-0038323ba9e5

    The unique ID of the insight which is given by Willow

    Request Body schema:
    state
    string (InsightState)
    Enum: "inactive" "active" "archived"

    The state of the insight

    Responses

    Request samples

    Content type
    {
    • "state": "active"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "8cf1743b-fcb7-44c8-9b6d-0038323ba9e5",
    • "sequenceNumber": "av-I-465",
    • "floorCode": "L010",
    • "equipmentId": "6be53768-811e-4db8-baee-471a01498df7",
    • "type": "fault",
    • "name": "258adba7",
    • "priority": 3,
    • "status": "inProgress",
    • "state": "active",
    • "occurredDate": "2020-05-28T00:33:02.836Z",
    • "updatedDate": "2020-08-28T13:46:01.919Z",
    • "externalId": "20200428_d4b43edf",
    • "externalStatus": "active",
    • "externalMetadata": "string",
    • "customerId": "3fc260f3-3e91-470b-8285-15a11c799491",
    • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
    • "description": "Chilled Water Pump CWP-01.1 is running when Chiller CH-01 is off.",
    • "createdDate": "2020-05-28T01:25:02.881Z",
    • "detectedDate": "2020-05-28T01:02:02.836Z"
    }

    Tickets

    Tickets are used to describe both service requests and incidents that can be generated and tracked within the Willow platform. When a ticket is generated, a pre-defined workflow will determine how the problem is responded to and remedied. The Willow platform can automate the creation of tickets when an Insight is generated. Tickets that are generated outside the Willow platform can be created and updated using this endpoint.

    List tickets

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    query Parameters
    createdAfter
    string <date-time> Nullable
    Example: createdAfter=2021-05-30T22:12:21.047Z

    Date created by which to filter specific results desired in ISO 8601 format

    Responses

    Request samples

    const query = new URLSearchParams({
      createdAfter: '2021-05-30T22:12:21.047Z'
    }).toString();
    
    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/tickets?${query}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "id": "9740da10-9f90-4623-9d48-51d14c093526",
      • "sequenceNumber": "av-T-4",
      • "floorCode": "L010",
      • "priority": 2,
      • "status": "inProgress",
      • "issueType": "equipment",
      • "issueId": "6be53768-811e-4db8-baee-471a01498df7",
      • "issueName": "VAV-10.1",
      • "description": "The area around my workstation is too hot today.",
      • "reporterId": "c5260fe8-520d-4513-af62-28439855c48a",
      • "reporterName": "Michael Bennett",
      • "reporterPhone": "(555) 555-5555",
      • "reporterEmail": "mbennett@acmecorp.com",
      • "reporterCompany": "Acme Corp",
      • "externalId": "WHQ-BLDG1-00000789",
      • "assigneeType": "customerUser",
      • "assigneeId": "2a4d6a10-72e5-414f-94a3-389967df4a00",
      • "sourceType": "platform",
      • "sourceId": "92913814g-9822-43c5-94gc-1ecf27ac80b2",
      • "dueDate": "2020-05-27T07:00:00.000Z",
      • "createdDate": "2020-05-28T05:17:47.142Z",
      • "updatedDate": "2020-05-28T05:19:00.181Z",
      • "resolvedDate": "2020-05-28T09:14:02.713Z",
      • "closedDate": "2020-05-28T09:14:22.479Z",
      • "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      }
    ]

    Create a ticket

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Request Body schema:
    floorId
    string Nullable

    The unique ID of the floor which is given by Willow

    priority
    integer <int32>

    The code for the priority level. Urgent=1, High=2, Medium=3, Low=4

    summary
    string Nullable
    description
    string Nullable
    status
    string (TicketStatus)
    Enum: "open" "reassign" "inProgress" "limitedAvailability" "resolved" "closed"

    The status of the ticket

    externalId
    string Nullable
    externalStatus
    string Nullable
    externalMetadata
    string Nullable
    object (ReporterDto)
    dueDate
    string <date-time> Nullable

    Date and time when the ticket is due to be complete

    categoryId
    string <uuid>

    The category ID of the ticket which is given by Willow

    Responses

    Request samples

    Content type
    {
    • "floorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    • "priority": 2,
    • "summary": "string",
    • "description": "The area around my workstation is too hot today.",
    • "status": "inProgress",
    • "externalId": "string",
    • "externalStatus": "string",
    • "externalMetadata": "string",
    • "reporter": {
      • "id": "c5260fe8-520d-4513-af62-28439855c48a",
      • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
      • "name": "Michael Bennett",
      • "phone": "(555) 555-5555",
      • "email": "mbennett@acmecorp.com",
      • "company": "Acme Corp"
      },
    • "dueDate": "2020-05-27T07:00:00.000Z",
    • "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "9740da10-9f90-4623-9d48-51d14c093526",
    • "sequenceNumber": "av-T-4",
    • "floorCode": "L010",
    • "priority": 2,
    • "status": "inProgress",
    • "issueType": "equipment",
    • "issueId": "6be53768-811e-4db8-baee-471a01498df7",
    • "issueName": "VAV-10.1",
    • "description": "The area around my workstation is too hot today.",
    • "reporterId": "c5260fe8-520d-4513-af62-28439855c48a",
    • "reporterName": "Michael Bennett",
    • "reporterPhone": "(555) 555-5555",
    • "reporterEmail": "mbennett@acmecorp.com",
    • "reporterCompany": "Acme Corp",
    • "externalId": "WHQ-BLDG1-00000789",
    • "assigneeType": "customerUser",
    • "assigneeId": "2a4d6a10-72e5-414f-94a3-389967df4a00",
    • "sourceType": "platform",
    • "sourceId": "92913814g-9822-43c5-94gc-1ecf27ac80b2",
    • "dueDate": "2020-05-27T07:00:00.000Z",
    • "createdDate": "2020-05-28T05:17:47.142Z",
    • "updatedDate": "2020-05-28T05:19:00.181Z",
    • "resolvedDate": "2020-05-28T09:14:02.713Z",
    • "closedDate": "2020-05-28T09:14:22.479Z",
    • "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    • "customerId": "3fc260f3-3e91-470b-8285-15a11c799491",
    • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
    • "cause": "VAV Box fan stuck",
    • "solution": "Replaced fan motor",
    • "externalStatus": "In Progress",
    • "externalMetadata": "string",
    • "attachments": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "type": "image",
        • "fileName": "string",
        • "createdDate": "2019-08-24T14:15:22Z"
        }
      ]
    }

    Retrieve a ticket

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    ticketId
    required
    string <uuid>
    Example: 9740da10-9f90-4623-9d48-51d14c093526

    The unique ID of the ticket which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const ticketId = 'YOUR_ticketId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/tickets/${ticketId}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    {
    • "id": "9740da10-9f90-4623-9d48-51d14c093526",
    • "sequenceNumber": "av-T-4",
    • "floorCode": "L010",
    • "priority": 2,
    • "status": "inProgress",
    • "issueType": "equipment",
    • "issueId": "6be53768-811e-4db8-baee-471a01498df7",
    • "issueName": "VAV-10.1",
    • "description": "The area around my workstation is too hot today.",
    • "reporterId": "c5260fe8-520d-4513-af62-28439855c48a",
    • "reporterName": "Michael Bennett",
    • "reporterPhone": "(555) 555-5555",
    • "reporterEmail": "mbennett@acmecorp.com",
    • "reporterCompany": "Acme Corp",
    • "externalId": "WHQ-BLDG1-00000789",
    • "assigneeType": "customerUser",
    • "assigneeId": "2a4d6a10-72e5-414f-94a3-389967df4a00",
    • "sourceType": "platform",
    • "sourceId": "92913814g-9822-43c5-94gc-1ecf27ac80b2",
    • "dueDate": "2020-05-27T07:00:00.000Z",
    • "createdDate": "2020-05-28T05:17:47.142Z",
    • "updatedDate": "2020-05-28T05:19:00.181Z",
    • "resolvedDate": "2020-05-28T09:14:02.713Z",
    • "closedDate": "2020-05-28T09:14:22.479Z",
    • "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    • "customerId": "3fc260f3-3e91-470b-8285-15a11c799491",
    • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
    • "cause": "VAV Box fan stuck",
    • "solution": "Replaced fan motor",
    • "externalStatus": "In Progress",
    • "externalMetadata": "string",
    • "attachments": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "type": "image",
        • "fileName": "string",
        • "createdDate": "2019-08-24T14:15:22Z"
        }
      ]
    }

    Update a ticket

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    ticketId
    required
    string <uuid>
    Example: 9740da10-9f90-4623-9d48-51d14c093526

    The unique ID of the ticket which is given by Willow

    Request Body schema:
    priority
    integer <int32> Nullable
    status
    string (TicketStatus)
    Enum: "open" "reassign" "inProgress" "limitedAvailability" "resolved" "closed"

    The status of the ticket

    floorCode
    string Nullable
    summary
    string Nullable
    description
    string Nullable
    cause
    string Nullable
    solution
    string Nullable
    assigneeType
    string (TicketAssigneeType)
    Enum: "noAssignee" "contractor" "customerUser"

    The user type of who is assigned to work on the ticket

    assigneeId
    string <uuid> Nullable
    dueDate
    string <date-time> Nullable

    Responses

    Request samples

    Content type
    {
    • "priority": 0,
    • "status": "inProgress",
    • "floorCode": "string",
    • "summary": "string",
    • "description": "string",
    • "cause": "string",
    • "solution": "string",
    • "assigneeType": "customerUser",
    • "assigneeId": "665a9750-71bd-4b96-bacd-9efa4ae022dd",
    • "dueDate": "2019-08-24T14:15:22Z"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "9740da10-9f90-4623-9d48-51d14c093526",
    • "sequenceNumber": "av-T-4",
    • "floorCode": "L010",
    • "priority": 2,
    • "status": "inProgress",
    • "issueType": "equipment",
    • "issueId": "6be53768-811e-4db8-baee-471a01498df7",
    • "issueName": "VAV-10.1",
    • "description": "The area around my workstation is too hot today.",
    • "reporterId": "c5260fe8-520d-4513-af62-28439855c48a",
    • "reporterName": "Michael Bennett",
    • "reporterPhone": "(555) 555-5555",
    • "reporterEmail": "mbennett@acmecorp.com",
    • "reporterCompany": "Acme Corp",
    • "externalId": "WHQ-BLDG1-00000789",
    • "assigneeType": "customerUser",
    • "assigneeId": "2a4d6a10-72e5-414f-94a3-389967df4a00",
    • "sourceType": "platform",
    • "sourceId": "92913814g-9822-43c5-94gc-1ecf27ac80b2",
    • "dueDate": "2020-05-27T07:00:00.000Z",
    • "createdDate": "2020-05-28T05:17:47.142Z",
    • "updatedDate": "2020-05-28T05:19:00.181Z",
    • "resolvedDate": "2020-05-28T09:14:02.713Z",
    • "closedDate": "2020-05-28T09:14:22.479Z",
    • "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    • "customerId": "3fc260f3-3e91-470b-8285-15a11c799491",
    • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
    • "cause": "VAV Box fan stuck",
    • "solution": "Replaced fan motor",
    • "externalStatus": "In Progress",
    • "externalMetadata": "string",
    • "attachments": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "type": "image",
        • "fileName": "string",
        • "createdDate": "2019-08-24T14:15:22Z"
        }
      ]
    }

    Create Multiple Tickets

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Request Body schema:
    Array ()
    floorId
    string Nullable

    The unique ID of the floor which is given by Willow

    priority
    integer <int32>

    The code for the priority level. Urgent=1, High=2, Medium=3, Low=4

    summary
    string Nullable
    description
    string Nullable
    status
    string (TicketStatus)
    Enum: "open" "reassign" "inProgress" "limitedAvailability" "resolved" "closed"

    The status of the ticket

    externalId
    string Nullable
    externalStatus
    string Nullable
    externalMetadata
    string Nullable
    object (ReporterDto)
    dueDate
    string <date-time> Nullable

    Date and time when the ticket is due to be complete

    categoryId
    string <uuid>

    The category ID of the ticket which is given by Willow

    Responses

    Request samples

    Content type
    [
    • {
      • "floorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      • "priority": 2,
      • "summary": "string",
      • "description": "The area around my workstation is too hot today.",
      • "status": "inProgress",
      • "externalId": "string",
      • "externalStatus": "string",
      • "externalMetadata": "string",
      • "reporter": {
        • "id": "c5260fe8-520d-4513-af62-28439855c48a",
        • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
        • "name": "Michael Bennett",
        • "phone": "(555) 555-5555",
        • "email": "mbennett@acmecorp.com",
        • "company": "Acme Corp"
        },
      • "dueDate": "2020-05-27T07:00:00.000Z",
      • "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      }
    ]

    List Reporters

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/reporters`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "id": "c5260fe8-520d-4513-af62-28439855c48a",
      • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
      • "name": "Michael Bennett",
      • "phone": "(555) 555-5555",
      • "email": "mbennett@acmecorp.com",
      • "company": "Acme Corp"
      }
    ]

    Create a reporter

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Request Body schema:
    customerId
    string <uuid>
    name
    string Nullable

    The name of the ticket reporter (requestor)

    phone
    string Nullable
    email
    string Nullable
    company
    string Nullable

    Responses

    Request samples

    Content type
    {
    • "customerId": "3fc260f3-3e91-470b-8285-15a11c799491",
    • "name": "Michael Bennett",
    • "phone": "(555) 555-5555",
    • "email": "mbennett@acmecorp.com",
    • "company": "Acme Corp"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "c5260fe8-520d-4513-af62-28439855c48a",
    • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
    • "name": "Michael Bennett",
    • "phone": "(555) 555-5555",
    • "email": "mbennett@acmecorp.com",
    • "company": "Acme Corp"
    }

    Update a reporter

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    reporterId
    required
    string <uuid>
    Example: c5260fe8-520d-4513-af62-28439855c48a

    The unique ID of the ticket reporter which is given by Willow

    Request Body schema:
    customerId
    string <uuid>
    name
    string Nullable

    The name of the ticket reporter (requestor)

    phone
    string Nullable
    email
    string Nullable
    company
    string Nullable

    Responses

    Request samples

    Content type
    {
    • "customerId": "3fc260f3-3e91-470b-8285-15a11c799491",
    • "name": "Michael Bennett",
    • "phone": "(555) 555-5555",
    • "email": "mbennett@acmecorp.com",
    • "company": "Acme Corp"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "c5260fe8-520d-4513-af62-28439855c48a",
    • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
    • "name": "Michael Bennett",
    • "phone": "(555) 555-5555",
    • "email": "mbennett@acmecorp.com",
    • "company": "Acme Corp"
    }

    Delete a reporter

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    reporterId
    required
    string <uuid>
    Example: c5260fe8-520d-4513-af62-28439855c48a

    The unique ID of the ticket reporter which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const reporterId = 'YOUR_reporterId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/reporters/${reporterId}`,
      {
        method: 'DELETE',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    List ticket categories

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/tickets/categories`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
      • "name": "Too Hot"
      }
    ]

    Create a ticket category

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Request Body schema:
    name
    string

    The name of the ticket category

    Responses

    Request samples

    Content type
    {
    • "name": "Too Hot"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
    • "name": "Too Hot"
    }

    Retrieve a ticket category

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    ticketCategoryId
    required
    string <uuid>
    Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6

    The unique ID of the ticket category which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const ticketCategoryId = 'YOUR_ticketCategoryId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/tickets/categories/${ticketCategoryId}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    {
    • "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    • "siteId": "1218614a-9822-43c5-94ca-1ecc29ab80b0",
    • "name": "Too Hot"
    }

    Update a ticket category

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    ticketCategoryId
    required
    string <uuid>
    Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6

    The unique ID of the ticket category which is given by Willow

    Request Body schema:
    name
    string

    The name of the ticket category

    Responses

    Request samples

    Content type
    {
    • "name": "Too Hot"
    }

    Delete a ticket category

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    ticketCategoryId
    required
    string <uuid>
    Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6

    The unique ID of the ticket category which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const ticketCategoryId = 'YOUR_ticketCategoryId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/tickets/categories/${ticketCategoryId}`,
      {
        method: 'DELETE',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Users

    Users are provisioned for each customer and given access to individual Sites.

    List users

    Authorizations:
    path Parameters
    customerId
    required
    string <uuid>
    Example: b69d2f21-0c13-47e2-82bc-5a1b144b81c9

    The unique ID of the customer which is given by Willow

    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    query Parameters
    email
    string Nullable
    Example: email=mbennett@acmecorp.com

    E-mail address by which to filter specific results

    Responses

    Request samples

    const query = new URLSearchParams({
      email: 'mbennett@acmecorp.com'
    }).toString();
    
    const customerId = 'YOUR_customerId_PARAMETER';
    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/customers/${customerId}/sites/${siteId}/users?${query}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "id": "c5260fe8-520d-4513-af62-28439855c48a",
      • "name": "Michael Bennett",
      • "phone": "(555) 555-5555",
      • "email": "mbennett@acmecorp.com",
      • "company": "Acme Corp",
      • "createdDate": "2021-05-30T22:12:21.047Z"
      }
    ]

    Models

    Models refer to the Digital Twin Definition Language (DTDL) interfaces in the WillowTwin. The collection of models loaded into the WillowTwin are referred to as the ontology from which twins can be created.

    List models

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/models`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "isDecommissioned": false,
      • "id": "dtmi:com:willowinc:FanPoweredBox;1",
      • "displayName": {
        • "en": "Fan Powered Box"
        },
      • "description": {
        • "en": "Fan Powered Box is an HVAC terminal unit used to supply conditioned air to a space. The amount of air is regulated with a fan."
        },
      • "uploadTime": "2020-05-27T16:48:20.773Z",
      • "isShared": true
      }
    ]

    Retrieve a model

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    id
    required
    string <uuid>
    Example: WLW-NYC-575_5_AVE-FPB-17.02

    The unique ID of the resource

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const id = 'YOUR_id_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/models/${id}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    {
    • "isDecommissioned": false,
    • "id": "dtmi:com:willowinc:FanPoweredBox;1",
    • "displayName": {
      • "en": "Fan Powered Box"
      },
    • "description": {
      • "en": "Fan Powered Box is an HVAC terminal unit used to supply conditioned air to a space. The amount of air is regulated with a fan."
      },
    • "uploadTime": "2020-05-27T16:48:20.773Z",
    • "isShared": true
    }

    Search models

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    query Parameters
    query
    string
    Example: query=Occupancy

    String to search within DTDL model ids

    Responses

    Request samples

    const query = new URLSearchParams({query: 'Occupancy'}).toString();
    
    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/models/search?${query}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • "dtmi:com:willowinc:OccupancySensor;1",
    • "dtmi:com:willowinc:OccupancySetpoint;1",
    • "dtmi:com:willowinc:OccupancyZone;1",
    • "dtmi:com:willowinc:OccupancySensorEquipment;1"
    ]

    Twins

    Twins refer to any node in the WillowTwin. This endpoint can be used to maintain twins of any Model, provision twin relationships, and query for twins to find a subset of twins and their relationships.

    List twins

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/twins`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "id": "WLW-NYC-575_5_AVE-FPB-17.02",
      • "metadata": {
        • "modelId": "dtmi:com:willowinc:FanPoweredBox;1"
        },
      • "customProperties": {
        • "name": "string",
        • "modelNumber": "string",
        • "maxAirflowRating": 0
        }
      }
    ]

    Create a Twin

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Request Body schema:
    id
    string <uuid>

    The twin ID of the asset stored in ADT as $dtId

    object (TwinMetadata)
    object (TwinProperties)

    Responses

    Request samples

    Content type
    {
    • "id": "WLW-NYC-575_5_AVE-FPB-17.02",
    • "metadata": {
      • "modelId": "dtmi:com:willowinc:FanPoweredBox;1"
      },
    • "customProperties": {
      • "name": "string",
      • "modelNumber": "string",
      • "maxAirflowRating": 0
      }
    }

    Response samples

    Content type
    application/json
    {
    • "id": "WLW-NYC-575_5_AVE-FPB-17.02",
    • "metadata": {
      • "modelId": "dtmi:com:willowinc:FanPoweredBox;1"
      },
    • "customProperties": {
      • "name": "string",
      • "modelNumber": "string",
      • "maxAirflowRating": 0
      }
    }

    Retrieve a twin

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    id
    required
    string <uuid>
    Example: WLW-NYC-575_5_AVE-FPB-17.02

    The unique ID of the resource

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const id = 'YOUR_id_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/twins/${id}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    {
    • "id": "WLW-NYC-575_5_AVE-FPB-17.02",
    • "metadata": {
      • "modelId": "dtmi:com:willowinc:FanPoweredBox;1"
      },
    • "customProperties": {
      • "name": "string",
      • "modelNumber": "string",
      • "maxAirflowRating": 0
      }
    }

    List twins with relationships

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/twins/withrelationships`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "twin": {
        • "id": "WLW-NYC-575_5_AVE-FPB-17.02",
        • "metadata": {
          • "modelId": "dtmi:com:willowinc:FanPoweredBox;1"
          },
        • "customProperties": {
          • "name": "string",
          • "modelNumber": "string",
          • "maxAirflowRating": 0
          }
        },
      • "relationships": {
        • "id": "isFedBy_WLW-NYC-575_5_AVE-AHU.LR.03_d9e36596-bf36-4870-ba82-fffe78adce4d",
        • "name": "isFedBy",
        • "displayName": "Is Fed By",
        • "sourceId": "WLW-NYC-575_5_AVE-FPB-17.02",
        • "targetId": "WLW-NYC-575_5_AVE-AHU.LR.03",
        • "customProperties": {
          • "substance": "string"
          }
        }
      }
    ]

    Create a twin relationship

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Request Body schema:
    id
    string
    name
    string
    displayName
    string
    sourceId
    string
    targetId
    string
    object (TwinRelationshipProperties)

    Responses

    Request samples

    Content type
    {
    • "id": "isFedBy_WLW-NYC-575_5_AVE-AHU.LR.03_d9e36596-bf36-4870-ba82-fffe78adce4d",
    • "name": "isFedBy",
    • "displayName": "Is Fed By",
    • "sourceId": "WLW-NYC-575_5_AVE-FPB-17.02",
    • "targetId": "WLW-NYC-575_5_AVE-AHU.LR.03",
    • "customProperties": {
      • "substance": "string"
      }
    }

    Response samples

    Content type
    application/json
    {
    • "id": "isFedBy_WLW-NYC-575_5_AVE-AHU.LR.03_d9e36596-bf36-4870-ba82-fffe78adce4d",
    • "name": "isFedBy",
    • "displayName": "Is Fed By",
    • "sourceId": "WLW-NYC-575_5_AVE-FPB-17.02",
    • "targetId": "WLW-NYC-575_5_AVE-AHU.LR.03",
    • "customProperties": {
      • "substance": "string"
      }
    }

    List relationships for a twin

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    id
    required
    string <uuid>
    Example: WLW-NYC-575_5_AVE-FPB-17.02

    The unique ID of the resource

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const id = 'YOUR_id_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/twins/${id}/relationships`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    [
    • {
      • "id": "isFedBy_WLW-NYC-575_5_AVE-AHU.LR.03_d9e36596-bf36-4870-ba82-fffe78adce4d",
      • "name": "isFedBy",
      • "displayName": "Is Fed By",
      • "sourceId": "WLW-NYC-575_5_AVE-FPB-17.02",
      • "targetId": "WLW-NYC-575_5_AVE-AHU.LR.03",
      • "customProperties": {
        • "substance": "string"
        }
      }
    ]

    Retrieve a twin relationship

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    twinId
    required
    string <uuid>
    Example: WLW-NYC-575_5_AVE-FPB-17.02

    The unique ID of the twin

    relationshipId
    required
    string <uuid>
    Example: isFedBy_WLW-NYC-575_5_AVE-AHU.LR.03_d9e36596-bf36-4870-ba82-fffe78adce4d

    The unique ID of the twin relationship

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const twinId = 'YOUR_twinId_PARAMETER';
    const relationshipId = 'YOUR_relationshipId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/twins/${twinId}/relationships/${relationshipId}`,
      {
        method: 'GET',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Response samples

    Content type
    application/json
    {
    • "id": "isFedBy_WLW-NYC-575_5_AVE-AHU.LR.03_d9e36596-bf36-4870-ba82-fffe78adce4d",
    • "name": "isFedBy",
    • "displayName": "Is Fed By",
    • "sourceId": "WLW-NYC-575_5_AVE-FPB-17.02",
    • "targetId": "WLW-NYC-575_5_AVE-AHU.LR.03",
    • "customProperties": {
      • "substance": "string"
      }
    }

    Delete a twin relationship

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    twinId
    required
    string <uuid>
    Example: WLW-NYC-575_5_AVE-FPB-17.02

    The unique ID of the twin

    relationshipId
    required
    string <uuid>
    Example: isFedBy_WLW-NYC-575_5_AVE-AHU.LR.03_d9e36596-bf36-4870-ba82-fffe78adce4d

    The unique ID of the twin relationship

    Responses

    Request samples

    const siteId = 'YOUR_siteId_PARAMETER';
    const twinId = 'YOUR_twinId_PARAMETER';
    const relationshipId = 'YOUR_relationshipId_PARAMETER';
    const resp = await fetch(
      `https://api.willowinc.com/v2/sites/${siteId}/twins/${twinId}/relationships/${relationshipId}`,
      {
        method: 'DELETE',
        headers: {
          Authorization: 'Bearer <YOUR_TOKEN_HERE>'
        }
      }
    );
    
    const data = await resp.text();
    console.log(data);

    Query twins

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Request Body schema:
    fromCache
    boolean

    Determines whether to execute the query from the cache or ADT

    restrictToSite
    boolean

    Determines whether to execute the query for only the site specified in the path or the entire customer instance

    restrictWithChildren
    boolean

    Determines whether the twins defined in rootModels should only be included in the results if they have children relationships.

    rootModels
    Array of strings

    Array of DTDL model ids from which to start the twin query graph traversal

    object

    Defines which relationship names (followAny) to traverse from the twins found in the rootModel and which model ids (toModel) to stop the traversal.

    floors
    Array of strings

    Array of floor ids to restrict the query to

    Responses

    Request samples

    Content type
    {
    • "fromCache": true,
    • "restrictToSite": true,
    • "restrictWithChildren": true,
    • "rootModels": [
      • "dtmi:com:willowinc:Sensor;1"
      ],
    • "relationships": {
      • "followAny": [
        • "isCapabilityOf"
        ],
      • "toModel": "dtmi:com:willowinc:Zone;1"
      },
    • "floors": [
      • "b7d170fd-48fd-4392-a4e9-1ad5880edc62"
      ]
    }

    Response samples

    Content type
    application/json
    [
    • {
      • "id": "WLW-NYC-575_5_AVE-FPB-17.02",
      • "metadata": {
        • "modelId": "dtmi:com:willowinc:FanPoweredBox;1"
        },
      • "customProperties": {
        • "name": "string",
        • "modelNumber": "string",
        • "maxAirflowRating": 0
        }
      }
    ]

    LiveData

    Add live data

    Authorizations:
    path Parameters
    siteId
    required
    string <uuid>
    Example: 1218614a-9822-43c5-94ca-1ecc29ab80b0

    The unique ID of the site which is given by Willow

    Request Body schema:
    Array of objects (PointLiveData) Nullable
    skipExceptions
    boolean Nullable

    When posting multiple live data objects, this boolean property defines the WillowTwin response behavior upon encountering an error.

    Responses

    Request samples

    Content type
    {
    • "points": [
      • {
        • "pointId": "0fcd55ad-251d-4111-bed9-de32c7addb52",
        • "timestamp": "2020-05-27T16:48:20.773Z",
        • "value": 22.5863236278265
        }
      ],
    • "skipExceptions": true
    }

    Response samples

    Content type
    application/json
    {
    • "failures": [
      • {
        • "pointId": "0fcd55ad-251d-4111-bed9-de32c7addb52",
        • "errorMessage": "Point id not found",
        • "errorCode": 404
        }
      ]
    }
    Copyright © 2021 Willow. All rights reserved.