API Hub
  • Learn
  • Build
  • Help

Versions

Overview

  • Introduction
  • Authentication
  • Error Codes
  • Rate-Limits
  • Upgrades

    Metadata

    • Overview

      Core Resources

      • Devices
      • Alerts

        Webhooks

        • Introduction
        • Defining a Webhook
        • Event Types
        • Alert Types
        • Webhook invocation, retries and logs
        • Event Handling

          On this page

          • GET /metadata
            • Request
            • Response

          Overview

          Before a KOLO™ device can be added to your account, your account must be setup with tags such as buildings, floors and rooms.

          GET /metadata#

          The GET /metadata endpoint provides hierarchical metadata information about KOLO™ IoT devices, including account, building, floor, room, and device location details. This data enables developers to create a structured view of the account’s physical layout and supports applications like facility maps, digital twins, and location-based management systems.

          Recommended Polling Interval: Metadata updates are infrequent, so polling every hour is sufficient unless metadata changes (such as added, modified, or deleted buildings, floors, rooms, or device locations) are expected.

          Request#

          Query Parameters#

          All query parameters are optional and can be used to filter metadata results based on the account structure.

          ParameterTypeDescription
          building_idstringUnique identifier for the building where the device is located
          floor_idstringUnique identifier for the floor where the device is located
          room_idstringUnique identifier for the room where the device is located
          device_location_idintegerUnique identifier for the device’s location within the room
          device_typestringCategory/type of the device (e.g., tissue, sanitizer)
          limitintegerCount of records to be fetched in a request with offset pagination. limit would fetch the specified list of records for the rooms count instead of entire set of records. If not specified, defaults to 100
          offsetintegerCount of records to be ignored from the start. offset is used along with limit. If not specified, defaults to 0

          Response#

          Status Code#

          200 - Successful execution of the request.

          Error Codes#

          Status CodeError MessageDescription
          400Bad RequestInvalid or malformed request parameters were provided
          401UnauthorizedMissing or invalid authorization token
          403ForbiddenAPI key or authorization header is missing or invalid
          404Not FoundResource specified cannot be found
          500Internal Server ErrorAn unexpected error occurred on the server

          Response Attributes#

          The response contains metadata detailing the physical layout of a KOLO™ account, organized hierarchically by account, building, floor, room, and device location.

          AttributeTypeDescription
          total_countintegerThe total number of rooms that could be retrieved
          nextstringURL to retrieve the next page of rooms
          prevstringURL to retrieve the previous page of rooms
          account_namestringName of the account for which metadata is retrieved
          account_idstringAccount Id for which metadata is retrieved
          metadataarray[object]List of metadata tags, organized by account, building, floor, room, and device locations
          building_idstringBuilding id for the retrieved room
          building_namestringBuilding name for the retrieved room
          floor_idstringFloor id for the retrieved room
          floor_namestringFloor name for the retrieved room
          room_idstringUnique identifier for retrieved room
          room_namestringName or label for the retrieved room
          device_locationsarray[object]List of device location details within the room
          location_idstringUnique identifier for the device’s location within the room
          location_namestringName or label for the device location
          typestringCategory/type of the device (e.g., tissue, soap)

          Sample Response#

          {
              "total_count": 1878,  // total count of objects(room)  in a list
              "next": "url for fetching next page",
              "prev": "url for fetching previous page",
              "account_name": "Account A",
              "account_id": "8958397",
              "metadata" : [
                  {
                      "floor_name": "Floor A",
                      "floor_id": "8958397",
                      "building_name": "Building A",
                      "building_id": "8958397",
                      "room_name": "Room A",
                      "room_id": "8958397",
                      "device_locations": [
                          {
                              "location_id": "979672",
                              "location_name": "Device Location 1",
                              "type": "Soap"
                          },
                          {
                              "location_id": "979673",
                              "location_name": "Device Location 2",
                              "type": "Tissue"
                          }
                      ]
                  }
              ]
          }