openapi: 3.0.0
info:
  title: WiFi Motion Core APIs
  version: v3-x-x
  description: >-
    The WiFi Motion Core Cloud APIs facilitate the creation, configuration, and
    management of WiFi Motion networks via RESTful APIs. Additionally, it offers
    interfaces for accessing topologies, events, and motion data. This
    documentation outlines the endpoints for engaging with the WiFi Motion cloud
    and includes specifications for the following APIs:


    #### Network Settings 

     #### Motion History

     The motion history APIs provide various historical motion metrics. 

     #### Live Motion

     The live motion API opens a web socket and triggers the network to emit recorded motion at a 500ms interval. 

    #### Events

     The events APIs allow you to retrieve, create or tag events emitted by the network.  

    #### Network Status


    High-level APIs for retrieving the network's topology, last status message,
    or to view or modify the network's metadata.

     

    #### Location Data


    The location data APIs expose localized motion data. Localization happens on
    a per mac, or custom location name base. 


    #### Find


    A set of APIs to find a network in the WiFi Motion Cloud. Individual, or
    groups of networks can be queried by their primary identifiers or by MAC.


    #### Insights (advanced)


    APIs of the internal Home Insights Microservice. Used for motion-based
    activity and sleep insights.


    #### Config (advanced)


    Fine-grained network configuration. These APIs give full access to the
    underlying motion detection controls, but have no safeguards to prevent
    unwanted side effects. For friendlier configuration management, see the
    Network Settings APIs.


    #### Node (advanced)


    Interface to manage the access point or mesh nodes of a network. Provides
    APIs to find, delete or alter the configuration of nodes.


    #### Gatekeeper (advanced)


    Endpoint used by WiFi Motion agent for the initial cloud connection. This
    API returns credentials for connecting to the MQTT broker and stores the
    initial network configuration. We don't recommend using this API directly.


    #### Management (advanced)


    Execute commands directly on the network's access point, or on a mesh node.
    We recommend using the NOC Management Page for these actions.


    #### Debug (advanced)


    Debug endpoints, for internal use only.


    #### Application Settings (advanced)

     The application settings API allows users to create, update, delete, and retrieve configurations based on network ID.
  x-logo:
    url: ../img/cognitive_logo.svg
    backgroundColor: '#FFFFFF'
    altText: Cognitive systems logo
    href: /
paths:
  /api/v1/universal-alert:
    get:
      tags:
        - Universal Alerting
      summary: Retrieve Universal Alert rules
      description: >-
        Returns an array of all Universal Alert rules that are associated with
        the network.
      operationId: GET_universal_alert
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UniversalAlertResponse200'
          description: 200 - OK
        '422':
          description: Network not found
    post:
      tags:
        - Universal Alerting
      summary: Create a single custom rule
      description: Creates a single custom Universal Alert rule.
      operationId: POST_universal_alert
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UniversalAlertRequestBody'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UniversalAlertResponse201'
          description: 201 - Created
        '422':
          description: "{ error: \"rrule: no dates into the future\" }\r\n\r\n{ error: \"rrule: subsequent reoccurrence in the past\"}"
    parameters:
      - name: network_id
        in: query
        required: true
        schema:
          type: integer
          description: >-
            Unique identifier of the network whose configuration should be
            managed
  /api/v1/universal-alert/status:
    get:
      tags:
        - Universal Alerting
      summary: Get Universal Alert Status
      description: "Returns an array of all alerts associated with the network, but from the view of the job queue, including all the internal state of the job. \r\n\r\nThe data field of this response contains the client facing alert alert model. This endpoint is to assist with seeing the internals of the job queue."
      operationId: GET_universal_alert_status
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UniversalAlertStatusResponse200'
          description: 200 - OK
        '422':
          description: 422 - Unprocessable Content
    parameters:
      - name: network_id
        in: query
        required: true
        schema:
          type: integer
          description: >-
            Unique identifier of the network whose configuration should be
            managed
  /api/v1/universal-alert/{uuid}:
    get:
      tags:
        - Universal Alerting
      summary: Get universal alert
      description: Get a single alert by its uuid.
      operationId: GET_universal_alert_
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UniversalAlertUUIDResponse200'
          description: OK
        '400':
          description: ''
    delete:
      tags:
        - Universal Alerting
      summary: Delete Universal Alert
      description: "Deletes an alert by its uuid.\r\n\r\nA successful delete will return the entire alert model.\r\n\r\nOnly the alerts owned by the network can be deleted. And these alerts can be deleted by both member or owner."
      operationId: DELETE_universal_alert
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UniversalAlertUUIDResponse201'
          description: 201 - Created
        '422':
          description: ''
    patch:
      tags:
        - Universal Alerting
      summary: Update of Single Alert
      description: >-
        Update a single alert


        If an alert has been switched into an `"enabled": false` state because
        the alert has completed every possible recurrence, the mutation must
        include a new RRULE that has at least one occurrence in the future.


        Under the hood, PATCH is a get job, delete job, and create a job.


        Note that the following parameters cannot be mutated via the PATCH:

        - external_id

        - uuid

        - options


        path parameter can only be the uuid
      operationId: PATCH_universal-alert
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UniversalAlertUUIDRequestBody'
        required: true
      responses:
        '201':
          description: 201 - Created
        '400':
          description: 400 - Bad Request
        '422':
          description: "{ error: \"rrule: no dates into the future\" }\r\n\r\n{ error: \"rrule: subsequent reoccurrence in the past\"}"
    parameters:
      - name: uuid
        schema:
          minimum: 1
          type: string
        in: path
        required: true
      - name: network_id
        in: query
        required: true
        schema:
          type: integer
          description: >-
            Unique identifier of the network whose configuration should be
            managed
  /api/v1/universal-alert-bulk:
    patch:
      tags:
        - Universal Alerting
      summary: Universal Alert Bulk Enable
      description: Enable or disable multiple alerts.
      operationId: PATCH_universal_alert_bulk
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UniversalAlertingBulkRequestBody'
        required: true
      responses:
        '204':
          description: ''
        '422':
          description: ''
    parameters:
      - name: network_id
        in: query
        required: true
        schema:
          type: integer
          description: >-
            Unique identifier of the network whose configuration should be
            managed
  /network/{network_id}/motion/history/state:
    get:
      tags:
        - Motion History
      summary: Network motion-state history
      description: >-
        Retrieve time series array of motion-state values across the whole
        network.
      operationId: GET_network-network_id-motion-history-state
      parameters:
        - name: from
          schema:
            description: UTC timestamp in seconds
            type: integer
          in: query
        - name: to
          schema:
            description: UTC timestamp in seconds, defaults to current time
            type: integer
          in: query
        - name: bucket
          schema:
            description: Size of data series buckets returned in seconds
            default: 3600
            type: integer
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MotionHistoryState'
          description: |-
            200 - OK

            State values indicate the following:

            - `0` Not armed and not tripped

            - `1` Not armed and tripped

             - `2` Armed and not tripped

            - `3` Armed and tripped
        '404':
          description: 404 - Motion network was not found.
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/find/masterid/{master_id}:
    get:
      tags:
        - Find
      summary: Find by Node ID of Master
      operationId: GET_network-find-masterid-master_id
      parameters:
        - name: array
          schema:
            description: >-
              The default behavior is to return an array when there are multiple
              results and a single object in the case of a single result. When
              this parameter is true the response will always be an array.
            default: false
            type: boolean
          in: query
        - name: expandNodes
          schema:
            description: >-
              If true, will also return an array of all nodes belonging to this
              network under the 'nodes' key.
            default: false
            type: boolean
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MotionNetwork'
          description: OK.
        '404':
          description: Motion network was not found.
    parameters:
      - name: master_id
        schema:
          description: ID of Master Radar Node
          type: integer
        in: path
        required: true
  /node/find/id/{nodeid}:
    get:
      tags:
        - Node
      summary: Find network by id
      operationId: GET_node-find-id-nodeid
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MotionNetworkRadarNode'
          description: OK.
        '404':
          description: Node could not be found.
        '500':
          description: Something went wrong.
    parameters:
      - name: nodeid
        schema:
          description: Node ID
          type: integer
        in: path
        required: true
  /gatekeeper/node:
    put:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MotionNetworkRadarNode'
      tags:
        - Debug
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MotionNetworkRadarNode'
          description: ''
        '404':
          description: Not Found
      operationId: PUT_gatekeeper-node
      summary: '*DEBUG ONLY* Create node'
  /network/{network_id}/application/settings:
    parameters:
      - name: network_id
        in: path
        required: true
        schema:
          type: integer
          description: >-
            Unique identifier of the network whose configuration should be
            managed
    get:
      tags:
        - Application Settings
      summary: Get application configuration by network ID
      description: >-
        Retrieves the application configuration settings for a specified
        network.
      operationId: getApplicationConfigByNetworkId
      responses:
        '200':
          description: Application configuration retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationConfigurations'
        '400':
          description: Invalid network ID supplied
        '404':
          description: Configuration not found for the specified network ID
        '500':
          description: Internal server error
    post:
      tags:
        - Application Settings
      summary: Create a new application configuration
      description: >-
        Creates a new application configuration entry for a specific network
        with schedule settings and timezone.
      operationId: createApplicationConfig
      requestBody:
        description: Application configuration object that needs to be created
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationConfigurations'
            example:
              timezone: UTC
              enabled: true
              sleep_hour: 23
              sleep_minute: 0
              wake_hour: 7
              wake_minute: 0
      responses:
        '201':
          description: Configuration created successfully
        '400':
          description: Invalid input
        '409':
          description: Configuration already exists for this network
        '500':
          description: Internal server error
    patch:
      tags:
        - Application Settings
      summary: Update an application configuration
      description: >-
        Updates an existing application configuration with provided fields. Only
        supplied fields will be updated.
      operationId: updateApplicationConfig
      requestBody:
        description: Application configuration fields to update
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationConfigurations'
            example:
              timezone: UTC
              enabled: true
              sleep_hour: 23
              sleep_minute: 0
              wake_hour: 7
              wake_minute: 0
      responses:
        '200':
          description: Configuration updated successfully
        '400':
          description: Invalid input
        '404':
          description: Configuration not found for the specified network
        '500':
          description: Internal server error
    delete:
      tags:
        - Application Settings
      summary: Delete application configuration by network ID
      description: Deletes the application configuration settings for a specified network.
      operationId: deleteApplicationConfigByNetworkId
      responses:
        '200':
          description: Application configuration deleted successfully
        '400':
          description: Invalid network ID supplied
        '404':
          description: Configuration not found for the specified network ID
        '500':
          description: Internal server error
  /network/{network_id}/events/history:
    get:
      tags:
        - Events
      summary: Network event history
      description: Retrieve a list of events.
      operationId: GET_network-network_id-events-history
      parameters:
        - name: from
          schema:
            description: >-
              To go FORWARD in time, provide the UTC timestamp of the newest
              report client has received.
            type: integer
          in: query
        - name: to
          schema:
            description: >-
              To go BACK in time, provide the UTC timestamp of the oldest report
              client has received.
            type: integer
          in: query
        - name: filter
          schema:
            description: 'Only return a particular category of event: Link, Network, Motion'
            type: string
          in: query
        - name: last
          schema:
            description: Maximum number of events to return, default is 10
            default: 10
            type: integer
          in: query
        - name: sort
          schema:
            description: >-
              When true the returned events will be post-sorted by timestamp (in
              case it's possible they were written out of order)
            default: false
            type: boolean
          in: query
        - name: event_types
          schema:
            description: Specifies the event parameter used to filter the query results
            type: string
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GuardianEvent'
          description: OK, will return an array of events.
        '404':
          description: Motion network was not found.
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/{network_id}/motion/history/intensity:
    get:
      tags:
        - Motion History
      summary: Network motion-intensity history
      description: >-
        Retrieve time series array of motion-intensity values across the whole
        network
      operationId: GET_network-network_id-motion-history-intensity
      parameters:
        - name: from
          schema:
            description: UTC timestamp in seconds
            type: integer
          in: query
        - name: to
          schema:
            description: UTC timestamp in seconds
            type: integer
          in: query
        - name: bucket
          schema:
            description: Side of data series buckets return in seconds
            type: integer
          in: query
        - name: sumfunc
          schema:
            description: >-
              Summary function used to aggregate data when bucket size exceeds
              storage resolution (5sec).
            default: max
            enum:
              - max
              - min
              - avg
            type: string
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MotionHistoryIntensity'
          description: OK
        '404':
          description: Motion network was not found.
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/{network_id}/location/histogram:
    get:
      tags:
        - Location Data
      summary: Network motion-density histogram
      description: >-
        Retrieve time series array of motion-density values by location for
        network.
      operationId: GET_network-network_id-location-histogram
      parameters:
        - name: from
          schema:
            description: >-
              The UTC timestamp of the oldest report client already has in
              seconds
            type: integer
          in: query
          required: false
        - name: to
          schema:
            description: >-
              The UTC timestamp of the latest report client is interested in,
              current time will be used if not provided
            type: integer
          in: query
          required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LocationHistogramEntry'
          description: OK
        '404':
          description: Motion network was not found.
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/find/id/{network_id}:
    get:
      tags:
        - Find
      parameters:
        - name: array
          schema:
            description: >-
              The default behavior is to return an array when there are multiple
              results and a single object in the case of a single result. When
              this parameter is true the response will always be an array.
            default: false
            type: boolean
          in: query
        - name: expandNodes
          schema:
            description: >-
              If true, will also return an array of all nodes belonging to this
              network under the 'nodes' key.
            default: false
            type: boolean
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MotionNetwork'
          description: OK.
        '404':
          description: Motion network was not found.
      operationId: GET_network-find-id-network_id
      summary: Find by Network ID
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/find/mac/{bssid}:
    get:
      tags:
        - Find
      summary: Find by BSSID
      operationId: GET_network-find-mac-bssid
      parameters:
        - name: array
          schema:
            description: >-
              The default behavior is to return an array when there are multiple
              results and a single object in the case of a single result. When
              this parameter is true the response will always be an array.
            default: false
            type: boolean
          in: query
        - name: expandNodes
          schema:
            description: >-
              If true, will also return an array of all nodes belonging to this
              network under the 'nodes' key.
            default: false
            type: boolean
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                oneOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/MotionNetwork'
                  - type: object
                    $ref: '#/components/schemas/MotionNetwork'
          description: OK.
        '404':
          description: Motion network was not found.
    parameters:
      - name: bssid
        schema:
          description: Access point BSSID
          type: string
        in: path
        required: true
  /network/find/meta/{query}:
    get:
      tags:
        - Find
      parameters:
        - name: val
          schema:
            description: Value to search for
            type: string
          in: query
        - name: array
          schema:
            description: >-
              The default behavior is to return an array when there are multiple
              results and a single object in the case of a single result. When
              this parameter is true the response will always be an array.
            default: false
            type: boolean
          in: query
        - name: expandNodes
          schema:
            description: >-
              If true, will also return an array of all nodes belonging to this
              network under the 'nodes' key.
            default: false
            type: boolean
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MotionNetwork'
          description: OK.
        '404':
          description: Motion network was not found.
      operationId: GET_network-find-meta-query
      summary: Find by Meta field
      description: >-
        **Note**: You will have to urlencode the query string here, use the
        library provided by your runtime.


        Example queries where 'val' is a partial string match (use % as wildcard
        char):


        ```meta->>'guardian_env'```  (this will match the guardian_env key of
        the network meta blob)


        ```meta->'dwm'->>'systemName'```  (this will match the systemName key of
        the dwm object in the network meta blob)


        Example query checking for existence of a field (omit val to directly
        execute):


        ```meta->'dwm' \\? 'systemName'```
    parameters:
      - name: query
        schema:
          description: Guardian device ID
          type: string
        in: path
        required: true
  /network/find/device/{guardian_deviceid}:
    get:
      tags:
        - Find
      summary: Find by Guardian deviceId
      operationId: GET_network-find-device-guardian_deviceid
      parameters:
        - name: array
          schema:
            description: >-
              The default behavior is to return an array when there are multiple
              results and a single object in the case of a single result. When
              this parameter is true the response will always be an array.
            default: false
            type: boolean
          in: query
        - name: expandNodes
          schema:
            description: >-
              If true, will also return an array of all nodes belonging to this
              network under the 'nodes' key.
            default: false
            type: boolean
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MotionNetwork'
          description: OK.
        '404':
          description: Motion network was not found.
    parameters:
      - name: guardian_deviceid
        schema:
          description: Guardian device ID
          type: string
        in: path
        required: true
  /node/{nodeid}/edit:
    delete:
      tags:
        - Node
      responses:
        '200':
          description: OK.
        '404':
          description: Node could not be found.
      operationId: DELETE_node-nodeid-edit
      summary: Delete Node
    patch:
      tags:
        - Node
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MotionNetworkRadarNode'
          description: OK.
        '404':
          description: Node could not be found.
      operationId: PATCH_node-nodeid-edit
      summary: '*DEBUG ONLY* Modify Node'
    parameters:
      - name: nodeid
        schema:
          description: Node ID
          type: integer
        in: path
        required: true
  /network/{network_id}/deviceinfo:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceInfo'
        required: true
      tags:
        - Config
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessMessage'
        '404':
          description: Motion network was not found.
      operationId: POST_network-network_id-deviceinfo
      summary: Update Device Info
      description: >-
        For cloud2cloud integration.


        Payload will be logged and sent to device via  MQTT under  "device-info"
        schema.
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /socket/{deviceType}/{deviceId}/{eventType}:
    get:
      tags:
        - Debug
      responses:
        '200':
          description: OK
        '404':
          description: ''
      operationId: GET_socket-deviceType-deviceId-eventType
      summary: '*DEBUG ONLY* Generic WebSocket'
      description: |-
        deviceType: "atheros-csi" for nodes, "guardian" for systems
        deviceId: either Node (csi-*) or System (sys-*) identifier
        eventType:
    parameters:
      - name: deviceType
        schema:
          description: IoT device Type
          type: string
        in: path
        required: true
      - name: deviceId
        schema:
          description: IoT device ID
          type: string
        in: path
        required: true
      - name: eventType
        schema:
          description: IoT event ID (such as motion-mesh, motion-matrix, location)
          type: string
        in: path
        required: true
  /network/find/all/all:
    get:
      tags:
        - Find
      summary: List networks
      operationId: GET_network-find-all-all
      parameters:
        - name: count
          schema:
            description: Number of networks to return in one call.
            default: 10
            type: integer
          in: query
        - name: lastId
          schema:
            description: >-
              Determines the current position of the pagination cursor. When
              used, the resulting 

              return set will contain networks whose network id's are greater
              (non-inclusive) then the value provided. 

              If combined with a `order` value of "desc" the return will be
              networks whose ids are less then (non-inclusive) the value
              provided.


              A value of -1 (Default) will return the start or end of the
              dataset depending on the value of the `order` parameter
            default: -1
            type: integer
          in: query
        - name: expandNodes
          schema:
            description: >-
              If true, will also return an array of all nodes belonging to this
              network under the 'nodes' key.
            default: false
            type: boolean
          in: query
        - name: order
          schema:
            description: >-
              Determines the sorting order of the returned result. This param
              accepts a string value of either "asc" or "desc". The default
              behavior if omitted is "asc".
            default: asc
            type: string
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MotionNetwork'
          description: OK.
        '404':
          description: Motion network was not found.
  /manage/execute:
    post:
      tags:
        - Management
      parameters:
        - name: id
          schema:
            description: id of action to (re-)execute
            type: integer
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/POST_manage-execute_200'
          description: OK.
        '404':
          description: Node could not be found.
      operationId: POST_manage-execute
      summary: Execute management command
  /network/{network_id}/motion/history/density:
    get:
      tags:
        - Motion History
      summary: Network motion-density history
      description: >-
        Retrieve time series array of motion-density values across the whole
        network.
      operationId: GET_network-network_id-motion-history-density
      parameters:
        - name: from
          schema:
            description: >-
              The UTC timestamp of the oldest report client already has in
              seconds
            type: integer
          in: query
        - name: to
          schema:
            description: >-
              The UTC timestamp of the latest report client is interested in,
              current time will be used if not provided
            type: integer
          in: query
        - name: bucket
          schema:
            description: >-
              The number of seconds in density calculation window; returned data
              points represent % of non-zero intensity values in the window.
            default: 3600
            type: integer
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MotionHistoryDensity'
          description: OK
        '404':
          description: Motion network was not found.
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /manage/list:
    get:
      tags:
        - Management
      parameters:
        - name: id
          schema:
            description: Query by action ID
            type: integer
          in: query
        - name: node_id
          schema:
            description: Query by node
            type: integer
          in: query
        - name: network_id
          schema:
            description: Query by network
            type: integer
          in: query
        - name: batch_id
          schema:
            description: Query by batch_id
            type: integer
          in: query
        - name: trigger_id
          schema:
            description: Query by trigger_id
            type: integer
          in: query
        - name: count
          schema:
            description: Maximum number of entries to return
            default: 10
            type: integer
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ManagementAction'
          description: ''
        '404':
          description: no management actions matching query were found
      operationId: GET_manage-list
      summary: List management commands
  /network/{network_id}/location/history:
    get:
      tags:
        - Location Data
      description: >-
        History of device motion density over a requested time window. Provides
        the `friendly_name` and / or `location` fields when they are set.
        Indicates whether the device is a `NODE` or `LEAF`. The results always
        include the mac address of the device.
      parameters:
        - name: from
          schema:
            description: >-
              UTC unix timestamp to search motion from. Defaults to 1 hour ago
              from a provided 'to'.
            type: integer
          in: query
        - name: to
          schema:
            description: UTC unix timestamp to query motion until. Defaults to now.
            type: integer
          in: query
        - name: bucket
          schema:
            description: Bucket size. Recommended use is 60.
            default: 60
            minimum: 5
            type: integer
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationHistory'
          description: Device location history of a motion network.
        '404':
          description: Motion network was not found.
      operationId: GET_network-network_id-location-history
      summary: '[BETA] Device Motion Location History'
    parameters:
      - name: network_id
        schema:
          description: Motion Network ID
          type: integer
        in: path
        required: true
  /network/{network_id}/motion/history/state_blocks:
    get:
      tags:
        - Motion Data
      parameters:
        - name: from
          schema:
            description: UTC unix timestamp to search motion from.
            type: integer
          in: query
        - name: to
          schema:
            description: UTC unix timestamp to query motion until.
            type: integer
          in: query
        - name: density_bucket
          schema:
            description: Bucket size of the returned motion block segments in seconds.
            default: 120
            minimum: 5
            type: integer
          in: query
        - name: state_bucket
          schema:
            description: >-
              Bucket size for motion state values. Larger sizes will tend to
              ignore shorter periods of lesser states.
            default: 1800
            minimum: 5
            type: integer
          in: query
        - name: states
          schema:
            description: >-
              Which states to include, values are any combination of [0,1,2,3].
              Response will return blocks of single state, i.e. continuous
              motion while moving from 2 to 3, will result in motion blocks for
              2 and for 3 individually.
            default:
              - 2
            enum:
              - 0
              - 1
              - 2
              - 3
            type: integer
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                $ref: '#/components/schemas/MotionStateBlocks'
          description: >-
            Returns any array of motion blocks. Each block summarizes locations
            and devices seen, as well as the time range and motion_state of the
            block. For each density_bucket sized time period, a breakdown of
            location and density is listed. The breakdown is captured in three
            parallel lists of locations, devices and densities. Friendly names
            for locations and devices are used when available, defaulting to MAC
            addresses (without the ":" when not available.
        '404':
          description: Motion network was not found.
      operationId: GET_network-network_id-motion-history-state-blocks
      summary: '[BETA] Motion Blocks'
    parameters:
      - name: network_id
        schema:
          description: Motion Network ID
          type: integer
        in: path
        required: true
  /gatekeeper/network:
    put:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MotionNetwork'
      tags:
        - Debug
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MotionNetwork'
          description: ''
        '404':
          description: Not found
      operationId: PUT_gatekeeper-network
      summary: '*DEBUG ONLY* Create network'
  /manage/batch:
    post:
      tags:
        - Management
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/POST_manage-batch_200'
          description: OK.
        '404':
          description: Node could not be found.
      operationId: POST_manage-batch
      summary: Create a batch
      description: >-
        A batch is a group of related management commands that can be monitored
        using a single WebSocket.
  /network/{network_id}/config/update:
    post:
      tags:
        - Config
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessMessage'
          description: OK.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
          description: Motion network was not found.
      operationId: POST_network-network_id-config-update
      summary: Propagate Network Configuration
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/{network_id}/topology:
    get:
      tags:
        - Network Status
      summary: Network topology
      operationId: GET_network-network_id-topology
      parameters:
        - name: offline
          schema:
            description: >-
              When true, returns offline devices (they will have online=false in
              their device description).
            default: false
            type: boolean
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MotionNetworkTopology'
          description: OK
        '404':
          description: Motion network was not found.
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/{network_id}/edit:
    delete:
      tags:
        - Network Status
      summary: Delete network
      operationId: DELETE_network-network_id-edit
      parameters:
        - name: annihilate
          schema:
            description: If true, all nodes belonging to this network will also be deleted.
            type: boolean
          in: query
      responses:
        '200':
          description: OK.
        '404':
          description: Motion network was not found.
    patch:
      tags:
        - Debug
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MotionNetwork'
          description: OK.
        '404':
          description: Motion network was not found.
      operationId: PATCH_network-network_id-edit
      summary: '*DEBUG ONLY* Modify network'
      description: >-
        Returns the latest GuardianStatusReport from Motion Network with
        provided network_id
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /node/find/device/{deviceid}:
    get:
      tags:
        - Node
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MotionNetworkRadarNode'
          description: OK.
        '404':
          description: Node could not be found.
        '500':
          description: Something went wrong.
      operationId: GET_node-find-device-deviceid
      summary: Find by Node deviceId
    parameters:
      - name: deviceid
        schema:
          type: string
        in: path
        required: true
  /node/find/mac/{bssid}:
    get:
      tags:
        - Node
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MotionNetworkRadarNode'
          description: OK.
        '404':
          description: Node could not be found.
        '500':
          description: Something went wrong.
      operationId: GET_node-find-mac-bssid
      summary: Find by BSSID
      description: 'Checks all of: 2.4ghz AP BSSID, 5ghz AP BSSID, mesh BSSID, p2p BSSID'
    parameters:
      - name: bssid
        schema:
          description: Locate node by Mesh peer BSSID
          type: integer
        in: path
        required: true
  /node/find/networkid/{network_id}:
    get:
      tags:
        - Node
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MotionNetworkRadarNode'
          description: OK.
        '404':
          description: Node could not be found.
        '500':
          description: Something went wrong.
      operationId: GET_node-find-networkid-networkid
      summary: Find (all) by Network ID
      description: Unlike the other Find by endpoints, this one returns an array.
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/{network_id}/status:
    get:
      tags:
        - Network Status
      summary: Network status
      description: Returns the most recent GuardianStatusReport from the network.
      operationId: GET_network-network_id-status
      parameters:
        - name: key
          schema:
            description: Comma seperated list of keys to filter response on
            type: string
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuardianStatusReport'
          description: OK.
        '404':
          description: Motion network was not found.
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /manage/create:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManagementAction'
        required: true
      tags:
        - Management
      parameters:
        - name: createBatch
          schema:
            description: If true, a new batch will be created for this action.
            default: false
            type: boolean
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementAction'
          description: OK.
        '404':
          description: Node could not be found.
      operationId: POST_manage-create
      summary: Queue management command
      description: >-
        If executeNow is true, default state will be either 002 (waiting for
        online) or 011 (sent command one time).


        If trigger_id is null, default state will be 000 (pending)


        If trigger_id is not null, default state will be 001 (waiting for
        trigger)
  /network/{network_id}/events/live:
    get:
      tags:
        - Events
      summary: Live event stream
      description: >-
        Opens a connection to stream live events from the network. The websocket
        will stream any new events from the network until closed. Will contain
        LinkEvent, NetworkEvent and MotionEvents unless filtered.
      operationId: GET_network-network_id-events-live
      parameters:
        - name: filter
          schema:
            description: >-
              Only subscribe to a particular type of event: Link, Network,
              Motion
            type: string
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuardianEvent'
          description: >-
            OK, WebSocket will return events as they are generated by the
            network.
        '404':
          description: Motion network was not found.
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /gatekeeper:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GatekeeperQuery'
        required: true
      tags:
        - Gatekeeper
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatekeeperResponse'
          description: OK - See body for more information
        '201':
          description: Try again later
        '429':
          description: The system is temporarily overloaded, try again later
        '500':
          description: Internal Server Error prevented call from completing.
      operationId: POST_gatekeeper
      summary: Gatekeeper
      description: >-
        This is the entry point for new devices that are unable to discover an
        existing local Motion Network


        Note that this endpoint does not require authentication even if it's
        otherwise configured.
  /network/{network_id}/motion/live:
    get:
      tags:
        - Live Motion
      summary: Detailed live motion
      description: >-
        Opens connection to stream live motion data from the network. The
        websocket will stream motion data updates live from the network until
        closed.
      operationId: GET_network-network_id-motion-live
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MotionMatrixReport'
          description: OK.
        '404':
          description: Motion network was not found.
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/{network_id}/events/tag:
    post:
      tags:
        - Events
      summary: Event tagging
      description: >-
        Adds a string based tag to an event. Tags greater than 10 characters are
        truncated.
      operationId: POST_network-network_id-events-tag
      parameters:
        - name: eventid
          schema:
            type: string
          in: query
        - name: tag
          schema:
            type: string
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuardianEvent'
          description: Event stored OK
        '404':
          description: Motion network was not found.
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/{network_id}/events/create:
    post:
      tags:
        - Events
      summary: Event creation
      description: >-
        Creates a new event, which must have all fields in the event schema
        populated. Note that the `tag` attribute will be ignored if provided. 
        Tags can be applied after the event has been created.
      operationId: POST_network-network_id-events-create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/POST_events_create'
      responses:
        '200':
          description: Event stored OK
        '404':
          description: Motion network was not found.
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/{network_id}/config/reset:
    post:
      tags:
        - Config
      parameters:
        - name: keepRadar
          description: Do not reset radar configuration
          schema:
            description: If set to true, radar_config will not be reset
            type: boolean
          in: query
        - name: keepGuardian
          description: Do not reset guardian configuration
          schema:
            description: If set to true, guardian_config will not be reset
            type: boolean
          in: query
        - name: keepMeta
          description: List of meta keys to not reset
          schema:
            description: >-
              Use this parameter to specify meta top-level key names that should
              not be reset.  It may be specified multiple times to keep multiple
              keys.
            default: dwm, guardian_env, neuron_env
            type: string
          in: query
        - name: update
          description: Propagate this reset to device firmware
          schema:
            description: >-
              If set to true, an update event will be propagated after the
              network is reset.
            type: boolean
          in: query
        - name: keepStatus
          description: Do not reset topology
          schema:
            type: boolean
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MotionNetwork'
          description: OK.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
          description: Motion network was not found.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
          description: Reset failure
      operationId: POST_network-network_id-config-reset
      summary: Reset Network
      description: >-
        Resets  configuration for the given network back to defaults.  Clears
        any saved guardian status (which resets topology).
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/{network_id}/motion/pubnub:
    post:
      tags:
        - Live Motion
      summary: PubNub start
      operationId: POST_network-network_id-motion-pubnub
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshLivePubnub'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessMessage'
          description: OK.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
          description: Not all required parameters were provided
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
          description: Motion Network was not found
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/{network_id}/motion/refresh:
    post:
      tags:
        - Live Motion
      summary: Motion stream start
      operationId: POST_network-network_id-motion-live
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/refreshlive'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessMessage'
          description: OK.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
          description: Not all required parameters were provided
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
          description: Motion Network was not found
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/{network_id}/config/guardian:
    get:
      tags:
        - Config
      parameters:
        - name: key
          schema:
            description: >-
              If provided, all operations will be relative to this top-level
              key.
            type: string
          in: query
          required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuardianConfig'
          description: OK.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
          description: Motion network was not found.
      operationId: GET_network-network_id-config-guardian
      summary: Get Guardian configuration
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuardianConfig'
      tags:
        - Config
      parameters:
        - name: key
          schema:
            description: >-
              If provided, all operations will be relative to this top-level
              key.
            type: string
          in: query
        - name: update
          schema:
            description: >-
              When true the new configuration is immediately propagated to the
              network.
            default: false
            type: boolean
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuardianConfig'
          description: OK.
        '404':
          description: Motion network was not found.
      operationId: POST_network-network_id-config-guardian
      summary: Set Guardian configuration
    patch:
      tags:
        - Config
      parameters:
        - name: key
          schema:
            description: >-
              If provided, all operations will be relative to this top-level
              key.
            type: string
          in: query
        - name: update
          schema:
            description: >-
              When true a configuration update is sent to the network
              immediately.
            type: boolean
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuardianConfig'
          description: OK.
        '404':
          description: Motion network was not found.
      operationId: PATCH_network-network_id-config-guardian
      summary: Update Guardian configuration
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/{network_id}/config/radar:
    get:
      tags:
        - Config
      parameters:
        - name: key
          schema:
            description: >-
              If provided, all operations will be relative to this top-level
              key.
            type: string
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RadarConfig'
          description: OK.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
          description: Motion network was not found.
      operationId: GET_network-network_id-config-radar
      summary: Get Motion-Radar configuration
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RadarConfig'
      tags:
        - Config
      parameters:
        - name: update
          schema:
            description: Propagate configuration change to device.
            default: false
            type: boolean
          in: query
        - name: key
          schema:
            description: >-
              If provided, all operations will be relative to this top-level
              key.
            type: string
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RadarConfig'
          description: OK.
        '404':
          description: Motion network was not found.
      operationId: POST_network-network_id-config-radar
      summary: Set Motion-Radar configuration
    patch:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RadarConfig'
      tags:
        - Config
      parameters:
        - name: update
          schema:
            description: Propagate configuration change to device.
            type: boolean
          in: query
        - name: key
          schema:
            description: >-
              If provided, all operations will be relative to this top-level
              key.
            type: string
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RadarConfig'
          description: OK.
        '404':
          description: Motion network was not found.
      operationId: PATCH_network-network_id-config-radar
      summary: Update Motion-Radar configuration
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /insights/version:
    get:
      tags:
        - Insights
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: string
              examples:
                Insights Version:
                  value: v1-4-0
        '404':
          description: Not found
      operationId: GET_insights-version
      summary: Version
      description: |-
        Returns version information of the home-insights microservice.

        If 404, the service has not been enabled.
  /manage/monitor:
    get:
      tags:
        - Management
      parameters:
        - name: id
          schema:
            description: batch_id to be monitored on this WebSocket
            type: number
          in: query
          required: true
      responses:
        '200':
          description: WebSocket of ManageAction updates
        '400':
          description: Batch or Network not found
      operationId: GET_manage-monitor
      summary: Monitor a batch of actions (WebSocket)
      description: >-
        This websocket will produce a stream of updates as actions with the
        provided batch_id execute.
  /insights/sleepTimes:
    get:
      tags:
        - Insights
      parameters:
        - name: networkId
          schema:
            description: Motion Network ID (returned as 'id' by Find API calls)
            type: integer
          in: query
          required: true
        - name: afrom
          schema:
            description: Starting time for report
            default: now-1d
            type: string
          in: query
          required: false
        - name: ato
          schema:
            description: Ending time of report
            default: now
            type: string
          in: query
          required: false
        - name: timeZone
          schema:
            description: 'IANA String for time Zone (Ex: America/Toronto, America/New_York)'
            type: string
          in: query
          required: true
        - name: png
          schema:
            description: When set to 1 will return PNG plot instead of json (debug)
            default: 0
            type: integer
          in: query
          required: false
        - name: fetchAll
          schema:
            description: >-
              When set to 1 will return all candidates instead of just top
              (debug)
            default: 0
            type: integer
          in: query
          required: false
        - name: sleepTime
          schema:
            description: 'Expected sleep hour in 24h time (ex: 0 for midnight)'
            maximum: 23
            minimum: 0
            type: integer
          in: query
          required: true
        - name: wakeTime
          schema:
            description: 'Expected wake time in 24h time (ex: 8 for 8am)'
            maximum: 23
            minimum: 0
            type: integer
          in: query
          required: true
        - name: duration
          schema:
            description: >-
              When set to 1 will return newer Sleep Duration structure including
              stats and string format times
            default: 1
            type: integer
          in: query
          required: false
        - name: interruption
          schema:
            description: >-
              (BETA) When set to 1 will augment Sleep Duration structure with
              counts for Interruptions. Requires duration=1
            default: 0
            type: integer
          in: query
          required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsightsSleepTimes'
          description: Sleep times (duration=1 format)
        '404':
          description: Network not found
      operationId: GET_insights-sleepTimes
      summary: Sleep and Wake Times
  /insights/activity:
    get:
      tags:
        - Insights
      parameters:
        - name: networkId
          schema:
            description: Motion Network ID (returned as 'id' by Find API calls)
            type: integer
          in: query
          required: true
        - name: afrom
          schema:
            description: >-
              Starting time for report.  This can be an epoch value, or can be
              in the form of `now-1d`. Do not use quotation marks within this
              field.
            default: now-1d
            type: string
          in: query
          required: false
        - name: ato
          schema:
            description: >-
              Ending time of report.  This can be an epoch value, or can be in
              the form of `now`. Do not use quotation marks within this field.
            default: now
            type: string
          in: query
          required: false
        - name: timeZone
          schema:
            description: >-
              IANA String for time Zone (Ex: America/Toronto,
              America/New_York).  Do not use quotation marks within this field.
            type: string
          in: query
          required: true
        - name: png
          schema:
            description: When set to 1 will return PNG plot instead of json (debug)
            default: 0
            type: integer
          in: query
          required: false
        - name: goal
          schema:
            description: >-
              (BETA) Control for enabling response of different Goal
              calculations. Each considers the current day's activity relative
              to the rest of the query window, providing the window average and
              current delta activity values. The different integer modes [1,2,3]
              select the aggregations of 'day' as: today so far, Last 24hr
              block, Last Full calendar day. [0] for all and [-1] for none.
            maximum: 3
            minimum: -1
            default: 0
            type: integer
          in: query
          deprecated: true
          required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsightsActivity'
          description: Daily Activity. [percent active, epoch unix timestamp]
        '404':
          description: Network not found
      operationId: GET_insights-activity
      summary: Daily Activity
  /insights/v2/{network_id}/sleep:
    get:
      tags:
        - Insights v2
      summary: '[BETA] Sleep Insights'
      description: >-
        [BETA] Sleep Insights provides you sleep related data, including the
        number of interruptions that have occurred and the sleep and wake times.
      operationId: get_nights_insights_v2__network_id__sleep_get
      responses:
        '200':
          description: 200 - OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsightsV2SleepResponse'
        '422':
          description: 422 - Unprocessable Entity
          content:
            application/json:
              schema:
                title: '422'
                description: Unprocessable Entity
                format: object
                items:
                  type: object
                  properties:
                    type:
                      description: Type of Error that occurred.
                      type: string
                    loc:
                      description: Location where the error occurred.
                      type: array
                    msg:
                      description: Additional details related to the error that occurred.
                      type: string
                    input:
                      description: The value that was entered into the field.
                      type: string
                    ctx:
                      description: ''
                      type: object
                      properties:
                        error:
                          description: ''
                          type: string
              example:
                detail:
                  - type: value_error
                    loc:
                      - query
                      - end_date
                    msg: >-
                      Value error, Unable to parse string ["Two thousand
                      twenty-five"]
                    input: '"Two thousand twenty-five"'
                    ctx:
                      error: {}
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
      - $ref: '#/components/parameters/start_date'
      - $ref: '#/components/parameters/end_date'
      - $ref: '#/components/parameters/timezone'
  /insights/v2/{network_id}/activity/daily:
    get:
      tags:
        - Insights v2
      summary: '[BETA] Activity Insights'
      description: >-
        [BETA] Provides a percentage of daily activity for the queried days. 
        Please allow for a warmup period of between 2 and 4 hours after first
        being activated.
      operationId: get_activity_insights_v2__network_id__activity_daily_get
      responses:
        '200':
          description: 200 - OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsightsV2ActivityResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema: {}
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
      - $ref: '#/components/parameters/start_date'
      - $ref: '#/components/parameters/end_date'
      - $ref: '#/components/parameters/timezone'
  /network/{network_id}/meta:
    get:
      tags:
        - Network Meta
      summary: Obtain Network Metadata
      operationId: GET_network-network_id-meta
      parameters:
        - name: key
          schema:
            description: >-
              If provided, all operations will be relative to this top-level
              key.
            type: string
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaConfig'
          description: Network meta config
        '404':
          description: Network not found
    post:
      tags:
        - Network Meta
      summary: Set Network metadata
      operationId: POST_network-network_id-meta
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetaConfig'
      parameters:
        - name: key
          schema:
            description: >-
              If provided, all operations will be relative to this top-level
              key.
            type: string
          in: query
        - name: update
          schema:
            description: >-
              When true the new configuration is immediately propagated to the
              network.
            default: false
            type: boolean
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaConfig'
          description: Network meta config
        '404':
          description: Network not found
    patch:
      tags:
        - Network Meta
      summary: Update Network Metadata
      operationId: PATCH_network-network_id-meta
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetaConfig'
      parameters:
        - name: key
          schema:
            description: >-
              If provided, all operations will be relative to this top-level
              key.
            type: string
          in: query
        - name: update
          schema:
            description: >-
              When true the new configuration is immediately propagated to the
              network.
            default: false
            type: boolean
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaConfig'
          description: Network meta config
        '404':
          description: Network not found
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /node/{nodeid}/meta:
    get:
      tags:
        - Node
      parameters:
        - name: key
          schema:
            description: >-
              If provided, all operations will be relative to this top-level
              key.
            type: string
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeMetaConfig'
          description: Node metadata
        '405':
          description: Only GET, POST and PATCH methods are currently supported
      operationId: GET_node-nodeid-meta
      summary: Retrieve node meta-data
    post:
      tags:
        - Node
      parameters:
        - name: key
          schema:
            description: >-
              If provided, all operations will be relative to this top-level
              key.
            type: string
          in: query
        - name: update
          schema:
            description: >-
              When true the new configuration is immediately propagated to the
              network this node is part of.
            default: false
            type: boolean
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeMetaConfig'
          description: Node metadata
        '400':
          description: Payload must be an object
        '405':
          description: Only GET, POST and PATCH methods are currently supported
      operationId: POST_node-nodeid-meta
      summary: Set (replace) node meta-data
    patch:
      tags:
        - Node
      parameters:
        - name: key
          schema:
            description: >-
              If provided, all operations will be relative to this top-level
              key.
            type: string
          in: query
        - name: update
          schema:
            description: >-
              When true the new configuration is immediately propagated to the
              network this node is part of.
            default: false
            type: boolean
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeMetaConfig'
          description: Node metadata
        '404':
          description: Network not found
      operationId: PATCH_node-nodeid-meta
      summary: Update node meta-data
    parameters:
      - name: nodeid
        schema:
          description: Node ID
          type: integer
        in: path
        required: true
  /network/{network_id}/sounding:
    get:
      deprecated: true
      tags:
        - Network Status
      parameters:
        - name: mac
          schema:
            description: If provided, only the state of the given MAC will be returned.
            default: ''
            type: string
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LeafSoundingState'
          description: OK.
        '404':
          description: Motion network was not found.
      operationId: GET_network-network_id-sounding
      summary: Get current Leaf Sounding State
      description: 'Deprecated, see Network Settings: Get Client State'
    patch:
      deprecated: true
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/LeafSoundingState'
      tags:
        - Network Status
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessMessage'
          description: OK.
        '404':
          description: Network not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
          description: Motion network was not found.
      operationId: PATCH_network-network_id-sounding
      summary: Modify Leaf Sounding State
      description: 'Deprecated, see Network Settings: Set Client Config'
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
      - name: update
        schema:
          description: >-
            When true the new configuration is immediately propagated to the
            network this node is part of.

             If this value is false, the change will be propagated to edge either when the device is rebooted or an update is triggered.
          default: false
          type: boolean
        in: query
        required: false
  /network/{network_id}/sounding/settings:
    summary: ''
    description: ''
    get:
      tags:
        - Network Settings
      summary: Retrieve Global Settings
      description: Retrieve global network configurations.
      operationId: GET_sounding-settings
      responses:
        '200':
          description: 200 - OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSoundingSettingsConfig'
        '404':
          description: 404 - Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundMessage'
    patch:
      tags:
        - Network Settings
      summary: Update Global Settings
      description: Update global network configurations.
      operationId: PATCH_sounding-settings
      parameters:
        - name: update
          schema:
            description: >-
              When true the new configuration is immediately propagated to the
              network this node is part of.

               If this value is false, the change will be propagated to edge either when the device is rebooted or an update is triggered.
            default: false
            type: boolean
          in: query
          required: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchSoundingSettingsConfig'
            example:
              cooldown: 20
              leafblower_cutoff: -1.1
      responses:
        '200':
          description: 200 - OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoundingSettingsConfigReturn'
        '400':
          description: 400 - Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '404':
          description: 404 - Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundMessage'
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/{network_id}/sounding/clients:
    get:
      tags:
        - Network Settings
      summary: Retrieve Client Configuration
      description: Retrieve sounding clients and configurations.
      operationId: GET_sounding-clients
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoundingClientStatus'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundMessage'
          description: Motion network was not found.
    patch:
      tags:
        - Network Settings
      summary: Update Client Configuration
      description: Update sounding client[s] configuration.
      operationId: PATCH_sounding-clients
      parameters:
        - name: update
          schema:
            description: >-
              When true the new configuration is immediately propagated to the
              network this node is part of.

               If this value is false, the change will be propagated to edge either when the device is rebooted or an update is triggered.
            default: false
            type: boolean
          in: query
          required: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SoundingClientConfig'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoundingClientConfigReturn'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: Validation error.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundMessage'
          description: Motion network was not found.
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
  /network/{network_id}/events/pairs:
    get:
      tags:
        - Events
      summary: Motion event pairs
      description: >-
        Fetch motion event pairs, which will be a pair of MotionDetectedEvent
        and MotionStoppedEvent events.
      operationId: GET_event_pairs
      parameters:
        - name: from
          description: UTC timestamp
          schema:
            type: integer
          in: query
          required: false
        - name: to
          description: UTC timestamp.
          schema:
            type: integer
          in: query
        - name: last
          description: n events to pair from. Defaults to 50.
          schema:
            type: integer
          in: query
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MotionEventPairResponse'
          description: OK
        '404':
          description: Network not found
        '500':
          description: ''
    parameters:
      - $ref: '#/components/parameters/NetworkIdPathParam'
components:
  parameters:
    NetworkIdPathParam:
      name: network_id
      schema:
        description: Motion Network ID (returned as 'id' by Find API calls)
        type: integer
      in: path
      required: true
    start_date:
      name: start_date
      in: query
      description: The first date to include within the results.
      required: true
      schema:
        title: Start Date
        description: Date - Combination Number + Character
        type: string
        format: date
      example: '2025-03-20'
    end_date:
      name: end_date
      in: query
      description: The last date to include within the results.
      required: true
      schema:
        title: End Date
        description: Date - Combination Number + Character
        type: string
        format: date
      example: '2025-04-24'
    timezone:
      name: timezone
      in: query
      description: >-
        `Optional` If set, the provided value will be used to perform end of day
        calculations.
      required: false
      schema:
        title: timezone
        description: Timezone
        format: string
        type: string
      example: America/Toronto
  schemas:
    UniversalAlertResponse200:
      title: Root Type for GET_universal_alert_200
      description: ''
      type: object
      properties:
        alerts:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              uuid:
                type: string
              enabled:
                type: boolean
              alert_name:
                type: string
              external_id:
                type: integer
              rrule:
                type: string
              monitor:
                type: object
                properties:
                  monitor_mode:
                    type: string
                  duration_minutes:
                    type: integer
              meta:
                type: object
                properties:
                  alert_type:
                    type: string
              analytics_tag:
                type: string
              no_motion_actions:
                type: array
                items:
                  type: object
                  properties:
                    action:
                      type: string
                    payload:
                      type: object
                    user_ids:
                      type: array
                      items: {}
              motion_actions:
                type: array
                items:
                  type: object
                  properties:
                    action:
                      type: string
                    payload:
                      type: object
                    user_ids:
                      type: array
                      items: {}
              unknown_actions:
                type: array
                items: {}
              error_actions:
                type: array
                items: {}
              timezone:
                type: string
              target:
                type: string
              window_end:
                type: integer
              options:
                type: object
                properties:
                  timeout:
                    type: integer
                  attempts:
                    type: integer
                  removeOnComplete:
                    type: boolean
                  delay:
                    type: integer
                  timestamp:
                    type: integer
      example:
        alerts:
          - uuid: 16cd9560-0f13-4ffe-b9b4-127bd0bfaf1d
            enabled: false
            alert_name: Preset Rise and Shine
            external_id: 14
            rrule: "DTSTART;TZID=Europe/London:20220101T100000\r\nRRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU\r\n"
            monitor:
              monitor_mode: SIMPLE
              duration_minutes: 240
              repeat_monitoring: true
            meta:
              alert_type: RISE_AND_SHINE_PRESET
            analytics_tag: riseAndShinePreset
            no_motion_actions:
              - action: fcm_push
                payload: {}
                user_ids: []
            motion_actions:
              - action: fcm_push
                payload: {}
                user_ids: []
            unknown_actions: []
            error_actions: []
            timezone: Europe/London
            target: 3/3/2022, 10:00:00 AM - Europe/London
            window_end: 1646301600000
            window_start: 1645301600000
            id: '10'
    UniversalAlertStatusResponse200:
      title: Root Type for GET_universal_alert_status
      description: ''
      type: object
      properties:
        alerts:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              data:
                type: object
                properties:
                  uuid:
                    type: string
                  enabled:
                    type: boolean
                  alert_name:
                    type: string
                  external_id:
                    type: integer
                  rrule:
                    type: string
                  monitor:
                    type: object
                    properties:
                      monitor_mode:
                        type: string
                      duration_minutes:
                        type: integer
                  meta:
                    type: object
                    properties:
                      alert_type:
                        type: string
                  analytics_tag:
                    type: string
                  no_motion_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        action:
                          type: string
                        payload:
                          type: object
                          properties:
                            data:
                              type: object
                              properties:
                                title:
                                  type: string
                                body:
                                  type: string
                                click_action:
                                  type: string
                                sound:
                                  type: string
                            apns:
                              type: object
                              properties:
                                headers:
                                  type: object
                                  properties:
                                    apns-push-type:
                                      type: string
                                    apns-topic:
                                      type: string
                                payload:
                                  type: object
                                  properties:
                                    aps:
                                      type: object
                                      properties:
                                        alert:
                                          type: object
                                          properties:
                                            title:
                                              type: string
                                            body:
                                              type: string
                                        sound:
                                          type: string
                                        category:
                                          type: string
                        user_ids:
                          type: array
                          items: {}
                  motion_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        action:
                          type: string
                        payload:
                          type: object
                          properties:
                            data:
                              type: object
                              properties:
                                title:
                                  type: string
                                body:
                                  type: string
                                click_action:
                                  type: string
                                sound:
                                  type: string
                            apns:
                              type: object
                              properties:
                                headers:
                                  type: object
                                  properties:
                                    apns-push-type:
                                      type: string
                                    apns-topic:
                                      type: string
                                payload:
                                  type: object
                                  properties:
                                    aps:
                                      type: object
                                      properties:
                                        alert:
                                          type: object
                                          properties:
                                            title:
                                              type: string
                                            body:
                                              type: string
                                        sound:
                                          type: string
                                        category:
                                          type: string
                        user_ids:
                          type: array
                          items: {}
                  unknown_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        action:
                          type: string
                        payload:
                          type: object
                          properties:
                            data:
                              type: object
                              properties:
                                title:
                                  type: string
                                body:
                                  type: string
                                click_action:
                                  type: string
                                sound:
                                  type: string
                            apns:
                              type: object
                              properties:
                                headers:
                                  type: object
                                  properties:
                                    apns-push-type:
                                      type: string
                                    apns-topic:
                                      type: string
                                payload:
                                  type: object
                                  properties:
                                    aps:
                                      type: object
                                      properties:
                                        alert:
                                          type: object
                                          properties:
                                            title:
                                              type: string
                                            body:
                                              type: string
                                        sound:
                                          type: string
                                        category:
                                          type: string
                        user_ids:
                          type: array
                          items: {}
                  error_actions:
                    type: array
                    items: {}
                  timezone:
                    type: string
                  target:
                    type: string
                  window_end:
                    type: integer
              progress:
                type: integer
              attemptsMade:
                type: integer
              failedReason:
                type: string
              status:
                type: string
              stacktrace:
                type: array
                items: {}
              timestamp:
                type: integer
              returnValue:
                type: string
              finishedOn:
                type: string
              processedOn:
                type: string
              processingTime:
                type: integer
              name:
                type: string
              opts:
                type: object
                properties:
                  timeout:
                    type: integer
                  attempts:
                    type: integer
                  removeOnComplete:
                    type: boolean
                  delay:
                    type: integer
                  timestamp:
                    type: integer
              delay:
                type: integer
      example:
        alerts:
          - id: '14'
            data:
              uuid: eecc4727-707d-48f2-b5e4-3c6aa6745aec
              enabled: true
              alert_name: Preset Rise and Shine
              external_id: 14
              rrule: "DTSTART;TZID=Europe/London:20220101T080000\r\nRRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU\r\n"
              monitor:
                monitor_mode: SIMPLE
                duration_minutes: 120
              meta:
                alert_type: RISE_AND_SHINE_PRESET
              analytics_tag: riseAndShinePreset
              no_motion_actions:
                - action: fcm_push
                  payload:
                    data:
                      title: Rise and Shine
                      body: Your loved one has not begun their day
                      click_action: CustomAlertEvent
                      sound: Aura_Push_Final.wav
                    apns:
                      headers:
                        apns-push-type: alert
                        apns-topic: com.csc.HaloHome
                      payload:
                        aps:
                          alert:
                            title: Rise and Shine
                            body: Your loved one has not begun their day
                          sound: Aura_Push_Final.wav
                          category: CustomAlertEvent
                  user_ids: []
                - action: custom_event
                  payload:
                    data:
                      title: Rise and Shine
                      body: Your loved one has not begun their day
                  user_ids: []
              motion_actions:
                - action: fcm_push
                  payload:
                    data:
                      title: Rise and Shine
                      body: Your loved one has begun their day
                      click_action: CustomAlertEvent
                      sound: Aura_Push_Final.wav
                    apns:
                      headers:
                        apns-push-type: alert
                        apns-topic: com.csc.HaloHome
                      payload:
                        aps:
                          alert:
                            title: Rise and Shine
                            body: Your loved one has begun their day
                          sound: Aura_Push_Final.wav
                          category: CustomAlertEvent
                  user_ids: []
                - action: custom_event
                  payload:
                    data:
                      title: Rise and Shine
                      body: Your loved one has begun their day
                  user_ids: []
              unknown_actions:
                - action: fcm_push
                  payload:
                    data:
                      title: Rise and Shine
                      body: Caregiver Aware could not determine motion in your home
                      click_action: CustomAlertEvent
                      sound: Aura_Push_Final.wav
                    apns:
                      headers:
                        apns-push-type: alert
                        apns-topic: com.csc.HaloHome
                      payload:
                        aps:
                          alert:
                            title: Rise and Shine
                            body: >-
                              Caregiver Aware could not determine motion in your
                              home
                          sound: Aura_Push_Final.wav
                          category: CustomAlertEvent
                  user_ids: []
                - action: custom_event
                  payload:
                    data:
                      title: Rise and Shine
                      body: Caregiver Aware could not determine motion in your home
                  user_ids: []
              error_actions: []
              timezone: Europe/London
              target: 3/10/2022, 8:00:00 AM - Europe/London
              window_end: 1646899200000
            progress: 0
            attemptsMade: 0
            status: delayed
            stacktrace: []
            timestamp: 1646861001684
            processingTime: 0
            name: __default__
            opts:
              timeout: 3000
              attempts: 3
              removeOnComplete: true
              delay: 38198317
              timestamp: 1646861001684
            delay: 38198317
    UniversalAlertUUIDResponse201:
      title: Root Type for DELETE_universal_alert
      description: ''
      type: object
      properties:
        uuid:
          type: string
        enabled:
          type: boolean
        alert_name:
          type: string
        external_id:
          type: integer
        rrule:
          type: string
        monitor:
          type: object
          properties:
            monitor_mode:
              type: string
            duration_minutes:
              type: integer
        meta:
          type: object
          properties:
            alert_type:
              type: string
        analytics_tag:
          type: string
        no_motion_actions:
          type: array
          items:
            type: object
            properties:
              action:
                type: string
              payload:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      title:
                        type: string
                      body:
                        type: string
                      click_action:
                        type: string
                      sound:
                        type: string
                  apns:
                    type: object
                    properties:
                      headers:
                        type: object
                        properties:
                          apns-push-type:
                            type: string
                          apns-topic:
                            type: string
                      payload:
                        type: object
                        properties:
                          aps:
                            type: object
                            properties:
                              alert:
                                type: object
                                properties:
                                  title:
                                    type: string
                                  body:
                                    type: string
                              sound:
                                type: string
                              category:
                                type: string
              user_ids:
                type: array
                items: {}
        motion_actions:
          type: array
          items:
            type: object
            properties:
              action:
                type: string
              payload:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      title:
                        type: string
                      body:
                        type: string
                      click_action:
                        type: string
                      sound:
                        type: string
                  apns:
                    type: object
                    properties:
                      headers:
                        type: object
                        properties:
                          apns-push-type:
                            type: string
                          apns-topic:
                            type: string
                      payload:
                        type: object
                        properties:
                          aps:
                            type: object
                            properties:
                              alert:
                                type: object
                                properties:
                                  title:
                                    type: string
                                  body:
                                    type: string
                              sound:
                                type: string
                              category:
                                type: string
              user_ids:
                type: array
                items: {}
        unknown_actions:
          type: array
          items:
            type: object
            properties:
              action:
                type: string
              payload:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      title:
                        type: string
                      body:
                        type: string
                      click_action:
                        type: string
                      sound:
                        type: string
                  apns:
                    type: object
                    properties:
                      headers:
                        type: object
                        properties:
                          apns-push-type:
                            type: string
                          apns-topic:
                            type: string
                      payload:
                        type: object
                        properties:
                          aps:
                            type: object
                            properties:
                              alert:
                                type: object
                                properties:
                                  title:
                                    type: string
                                  body:
                                    type: string
                              sound:
                                type: string
                              category:
                                type: string
              user_ids:
                type: array
                items: {}
        error_actions:
          type: array
          items: {}
        timezone:
          type: string
        target:
          type: string
        window_end:
          type: integer
        id:
          $ref: '#/components/schemas/null'
      example:
        uuid: a93a9c7d-ce5e-4ec7-be6f-8795c68c1930
        enabled: true
        alert_name: Outing
        external_id: 14
        rrule: |-
          DTSTART;TZID=America/New_York:20220318T200000
          RRULE:FREQ=WEEKLY;COUNT=1;INTERVAL=1;WKST=MO
        monitor:
          monitor_mode: SIMPLE
          duration_minutes: 120
        meta:
          alert_type: OUTING_PRESET
        analytics_tag: outingsPreset
        no_motion_actions:
          - action: fcm_push
            payload:
              data:
                title: Friday Bowling
                body: No motion at home 6pm - 8pm
                click_action: CustomAlertEvent
                sound: Aura_Push_Final.wav
              apns:
                headers:
                  apns-push-type: alert
                  apns-topic: com.csc.HaloHome
                payload:
                  aps:
                    alert:
                      title: Friday Bowling
                      body: No motion at home from 6pm - 8pm
                    sound: Aura_Push_Final.wav
                    category: CustomAlertEvent
            user_ids: []
          - action: custom_event
            payload:
              data:
                title: Friday Bowling
                body: No motion at home from 6pm - 8pm
            user_ids: []
        motion_actions:
          - action: fcm_push
            payload:
              data:
                title: Friday Bowling
                body: Your loved one stayed home
                click_action: CustomAlertEvent
                sound: Aura_Push_Final.wav
              apns:
                headers:
                  apns-push-type: alert
                  apns-topic: com.csc.HaloHome
                payload:
                  aps:
                    alert:
                      title: Friday Bowling
                      body: Your loved one stayed home
                    sound: Aura_Push_Final.wav
                    category: CustomAlertEvent
            user_ids: []
          - action: custom_event
            payload:
              data:
                title: Friday Bowling
                body: Your loved one stayed home
            user_ids: []
        unknown_actions:
          - action: fcm_push
            payload:
              data:
                title: Friday Bowling
                body: Caregiver Aware could not determine motion in the home
                click_action: CustomAlertEvent
                sound: Aura_Push_Final.wav
              apns:
                headers:
                  apns-push-type: alert
                  apns-topic: com.csc.HaloHome
                payload:
                  aps:
                    alert:
                      title: Friday Bowling
                      body: Caregiver Aware could not determine motion in the home
                    sound: Aura_Push_Final.wav
                    category: CustomAlertEvent
            user_ids: []
          - action: custom_event
            payload:
              data:
                title: Friday Bowling
                body: Caregiver Aware could not determine motion in the home
            user_ids: []
        error_actions: []
        timezone: America/New_York
        target: 3/18/2022, 8:00:00 PM - America/New_York
        window_end: 1647648000000
    UniversalAlertUUIDResponse200:
      required:
        - enabled
      type: object
      properties:
        id:
          description: internal unique identifier of the alert
          type: string
        enabled:
          description: the active status of the alert
          type: boolean
        target:
          description: Date string of next notification
          type: string
        timezone:
          description: ''
          type: string
        alert_name:
          type: string
        rrule:
          type: string
        monitor:
          type: object
          properties:
            monitor_mode:
              type: string
            duration_minutes:
              type: integer
            inactive_minutes:
              type: integer
            repeat_monitoring:
              type: boolean
        meta:
          type: object
          properties:
            anything:
              type: string
        analytics_tag:
          type: string
        no_motion_actions:
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
        motion_actions:
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
        unknown_actions:
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
        error_actions:
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
        uuid:
          description: Unique id
          type: string
        external_id:
          description: External network id
          type: string
        window_end:
          description: ''
          type: number
        window_start:
          description: Timestamp showing when monitoring will start
          type: integer
        created_at:
          description: Alert creation timestamp
          type: integer
        next_run:
          description: >-
            Timestamp of the next alert trigger. Can be used to monitor the
            execution of alerts inside the inactivity window.
      example:
        uuid: Unique alert identifier
        enabled: true
        target: '2021-12-13T16:00:00.000+00:00'
        timezone: America/New_York
        alert_name: client decided label
        rrule: |-
          DTSTART;TZID=America/New_York:20211201T163000
          RRULE:FREQ=WEEKLY;COUNT=30;INTERVAL=1;WKST=MO
        monitor:
          monitor_mode: INACTIVITY
          duration_minutes: 10
          inactive_minutes: 2
          repeat_monitoring: true
        meta:
          anything: client controlled writable space
        analytics_tag: caregiver_alert_trace
        no_motion_actions:
          - action: fcm_push
            user_ids:
              - 5
              - 9
            payload:
              apns:
                headers:
                  apns-push-type: alert
                  apns-topic: com.csc.HaloHome
                payload:
                  aps:
                    alert:
                      title: no motion
                      body: '123'
                    sound: Aura_Push_Final.wav
                    category: User
        motion_actions:
          - action: fcm_push
            payload:
              data:
                click_action: CustomAlertEvent
                title: NO Motion Ua
                body: No Motion was detected during Now
                sound: Aura_Push_Final.wav
              apns:
                headers:
                  apns-push-type: alert
                  apns-topic: com.csc.HaloHome
                payload:
                  aps:
                    alert:
                      title: motion
                      body: '123'
                    sound: Aura_Push_Final.wav
                    category: User
        unknown_actions: []
        error_actions: []
        id: 2255
    UniversalAlertUUIDRequestBody:
      title: Root Type for 201_PATCH_UNIVERSAL_ALERT
      description: ''
      required:
        - monitor
        - enabled
      type: object
      properties:
        alert_name:
          description: "Default: \"\"\r\nDefaults to an empty string if no value is provided."
          type: string
        enabled:
          type: boolean
        rrule:
          description: "The RRULE string which can be generated here: https://jakubroztocil.github.io/rrule/\r\n\r\nNote that new lines must be explicitly escaped with \\n. COUNT will always internally converted to 1 since computing every possible alert is not required. The cloud needs only to know when the single next alert is.\r\n\r\nExample: DTSTART;TZID=America/New_York:20211201T163000\\nRRULE:FREQ=WEEKLY;COUNT=30;INTERVAL=1;WKST=MO"
          type: string
        analytics_tag:
          description: "Default: \"\"\r\nAny string that can be used for analytics tracing. Defaults to \"\" if the field is not included."
          type: string
        monitor:
          description: This object defines the conditions and type of the motion monitor.
          type: object
          properties:
            monitor_mode:
              enum:
                - NONE
                - SIMPLE
                - INACTIVITY
              type: string
            duration_minutes:
              description: >-
                The length of time in minutes of the monitored duration. The
                cloud will determine the start time per the timezone in the
                rrule field by subtracting this from the targeted time of the
                monitor completion (in which the result is sent).
              type: integer
            inactive_minutes:
              description: Required if the `monitor_mode` is "INACTIVITY"
              type: integer
            repeat_monitoring:
              description: >-
                If the `monitor_mode` is "INACTIVITY", this boolean determines
                if the alert should continue monitoring if inactivity is
                detected.
              type: boolean
            stop_event_filter:
              description: >-
                Not yet supported - 1/1/2022


                The keys of the object will compare to keys of MQTT events as
                they are from core. All key value pairs placed in this object
                will be expected on the event from core. 
              default: {}
              type: object
        meta:
          description: >-
            The contents of this object is fully decided by the client and will
            not persist anywhere if the alert is deleted.
          type: object
          properties:
            alert_type:
              type: string
        motion_actions:
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
        no_motion_actions:
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
        unknown_actions:
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
        error_actions:
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
      example:
        alert_name: Change
        enabled: false
        rrule: "DTSTART;TZID=Europe/London:20220101T080000\r\nRRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU\r\n"
        analytics_tag: riseAndShinePreset
        monitor:
          monitor_mode: SIMPLE
          duration_minutes: 120
        meta:
          alert_type: RISE_AND_SHINE_PRESET
        motion_actions:
          - user_ids: []
            action: fcm_push
            payload:
              data:
                title: Rise and Shine
                body: Your loved one has begun their day
                click_action: CustomAlertEvent
                sound: Aura_Push_Final.wav
              apns:
                headers:
                  apns-push-type: alert
                  apns-topic: com.csc.HaloHome
                payload:
                  aps:
                    alert:
                      title: Rise and Shine
                      body: Your loved one has begun their day
                    sound: Aura_Push_Final.wav
                    category: CustomAlertEvent
          - user_ids: []
            action: custom_event
            payload:
              data:
                title: Rise and Shine
                body: Your loved one has begun their day
        no_motion_actions:
          - user_ids: []
            action: fcm_push
            payload:
              data:
                title: Rise and Shine
                body: Your loved one has not begun their day
                click_action: CustomAlertEvent
                sound: Aura_Push_Final.wav
              apns:
                headers:
                  apns-push-type: alert
                  apns-topic: com.csc.HaloHome
                payload:
                  aps:
                    alert:
                      title: Rise and Shine
                      body: Your loved one has not begun their day
                    sound: Aura_Push_Final.wav
                    category: CustomAlertEvent
          - action: custom_event
            payload:
              data:
                title: Rise and Shine
                body: Your loved one has not begun their day
        unknown_actions:
          - user_ids: []
            action: fcm_push
            payload:
              data:
                title: Rise and Shine
                body: Caregiver Aware could not determine motion in your home
                click_action: CustomAlertEvent
                sound: Aura_Push_Final.wav
              apns:
                headers:
                  apns-push-type: alert
                  apns-topic: com.csc.HaloHome
                payload:
                  aps:
                    alert:
                      title: Rise and Shine
                      body: Caregiver Aware could not determine motion in your home
                    sound: Aura_Push_Final.wav
                    category: CustomAlertEvent
          - action: custom_event
            payload:
              data:
                title: Rise and Shine
                body: Caregiver Aware could not determine motion in your home
        error_actions:
          type: Array
          Items:
            user_ids: []
            action: fcm_push
            payload:
              data:
                title: Rise and Shine
                body: Caregiver Aware could not determine motion in your home
                click_action: CustomAlertEvent
                sound: Aura_Push_Final.wav
              apns:
                headers:
                  apns-push-type: alert
                  apns-topic: com.csc.HaloHome
                payload:
                  aps:
                    alert:
                      title: Rise and Shine
                      body: Caregiver Aware could not determine motion in your home
                    sound: Aura_Push_Final.wav
                    category: CustomAlertEvent
    UniversalAlertingBulkRequestBody:
      title: Root Type for POST_universal-alert-bulk
      description: ''
      type: array
      items:
        $ref: '#/components/schemas/PATCH_universal-alert-object-inner'
      example:
        - uuid: 7b532ceb-2937-4f0e-8b0f-0a332883a202
          enabled: true
        - uuid: 93f3557e-734c-4bb9-8be3-53014c68642a
          enabled: true
    UniversalAlertResponse201:
      required:
        - enabled
      type: object
      properties:
        id:
          description: internal unique identifier of the alert
          type: string
        enabled:
          description: the active status of the alert
          type: boolean
        target:
          description: Date string of next notification
          type: string
        timezone:
          description: ''
          type: string
        alert_name:
          type: string
        rrule:
          type: string
        monitor:
          type: object
          properties:
            monitor_mode:
              type: string
            duration_minutes:
              type: integer
            inactive_minutes:
              type: integer
            repeat_monitoring:
              type: boolean
        meta:
          type: object
          properties:
            anything:
              type: string
        analytics_tag:
          type: string
        no_motion_actions:
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
        motion_actions:
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
        unknown_actions:
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
        error_actions:
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
        uuid:
          description: Unique id
          type: string
        external_id:
          description: External network id
          type: string
        window_end:
          description: ''
          type: number
        window_start:
          description: Timestamp showing when monitoring will start
          type: integer
        created_at:
          description: Alert creation timestamp
          type: integer
        next_run:
          description: >-
            Timestamp of the next alert trigger. Can be used to monitor the
            execution of alerts inside the inactivity window.
      example:
        uuid: Unique alert identifier
        enabled: true
        target: '2021-12-13T16:00:00.000+00:00'
        timezone: America/New_York
        alert_name: client decided label
        rrule: |-
          DTSTART;TZID=America/New_York:20211201T163000
          RRULE:FREQ=WEEKLY;COUNT=30;INTERVAL=1;WKST=MO
        monitor:
          monitor_mode: INACTIVITY
          duration_minutes: 10
          inactive_minutes: 2
          repeat_monitoring: true
        meta:
          anything: client controlled writable space
        analytics_tag: caregiver_alert_trace
        no_motion_actions:
          - action: fcm_push
            user_ids:
              - 5
              - 9
            payload:
              apns:
                headers:
                  apns-push-type: alert
                  apns-topic: com.csc.HaloHome
                payload:
                  aps:
                    alert:
                      title: no motion
                      body: '123'
                    sound: Aura_Push_Final.wav
                    category: User
        motion_actions:
          - action: fcm_push
            payload:
              data:
                click_action: CustomAlertEvent
                title: NO Motion Ua
                body: No Motion was detected during Now
                sound: Aura_Push_Final.wav
              apns:
                headers:
                  apns-push-type: alert
                  apns-topic: com.csc.HaloHome
                payload:
                  aps:
                    alert:
                      title: motion
                      body: '123'
                    sound: Aura_Push_Final.wav
                    category: User
        unknown_actions: []
        error_actions: []
        id: 2255
    UniversalAlertRequestBody:
      required:
        - monitor
      type: object
      properties:
        enabled:
          type: boolean
        alert_name:
          description: Defaults to an empty string if no value is provided.
          default: ''
          type: string
        rrule:
          description: >-
            The RRULE string which can be generated here:

            https://jakubroztocil.github.io/rrule/


            Note that new lines must be explicitly escaped with `\n`. Note that
            providing the RRULE string without the RRULE will result in a yearly
            alert. For a single occurrence, COUNT=1 must be provided


            Example:

            `DTSTART;TZID=America/New_York:20211201T163000\nRRULE:FREQ=WEEKLY;COUNT=30;INTERVAL=1;WKST=MO`
          default: ''
          type: string
        monitor:
          description: >-
            Motion monitor object. `monitor_mode` Specifies the type of
            monitoring. 

             `NONE`: Ignore motion and triggers actions at specified time.

             `SIMPLE`: Checks period between alert trigger and `duration_minutes`. 

             `INACTIVITY`: checks for inactivity in the given period. `inactive_minutes` specifies the length of the inactivity. `repeat_monitoring` specifies if the alert should continue after inactivity was detected
          type: object
          properties:
            monitor_mode:
              enum:
                - NONE
                - SIMPLE
                - INACTIVITY
              type: string
            duration_minutes:
              description: >-
                The length of time in minutes of the monitored duration. The
                cloud will determine the start time per the timezone in the
                rrule field by subtracting this from the targeted time of the
                monitor completion (in which the result is sent).
              type: integer
            inactive_minutes:
              description: Required if the `monitor_mode` is "INACTIVITY"
              type: integer
            repeat_monitoring:
              description: >-
                If the `monitor_mode` is "INACTIVITY", this boolean determines
                if the alert should continue monitoring if inactivity is
                detected. Defaults to true
              type: boolean
            stop_event_filter:
              description: >-
                Not yet supported - 1/1/2022


                The keys of the object will compare to keys of MQTT events as
                they are from core. All key value pairs placed in this object
                will be expected on the event from core. 
              default: {}
              type: object
        meta:
          description: >-
            The contents of this object are decided by the client and will not
            persist if the alert is deleted. 
          type: object
        analytics_tag:
          description: >-
            Any string that can be used for analytics tracing. Defaults to "" if
            the field is not included. 
          default: ''
          type: string
        no_motion_actions:
          description: Actions to perform when no motion is detected
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
        motion_actions:
          description: Actions to perform when motion is detected
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
        unknown_actions:
          description: >-
            Actions to perform when there is no record of past motion on the
            network
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
        error_actions:
          description: 'Actions to perform when an error occurs '
          type: array
          items:
            $ref: '#/components/schemas/UniversalAlertActions'
    LeafSoundingState:
      title: LeafSoundingState
      type: object
      properties:
        auto:
          description: >-
            (Control) When set to false, sounding of this device will never
            occur.
          default: true
          type: boolean
        enable:
          description: (Feedback) Current sounding state for this device
          type: boolean
        mac:
          $ref: '#/components/schemas/MachineAddress'
    POST_events_create:
      title: CreateEvents
      required:
        - ts
        - network_id
        - category
        - event
      type: object
      properties:
        ts:
          format: float
          description: UTC timestamp
          type: number
        guardian_id:
          description: Guardian deviceId
          type: string
        network_id:
          description: Guardian network_id
          type: integer
        category:
          description: Event category (for filtering)
          enum:
            - Link
            - Network
            - Motion
            - System
            - User
            - Device
            - Internal
          type: string
        event:
          description: Event identifier
          enum:
            - MotionDetectedEvent
            - MotionStoppedEvent
            - LinkConnectedEvent
            - LinkDisconnectedEvent
            - LinkLowThroughputEvent
            - LinkCreatedEvent
            - MemberArrivedEvent
            - MemberLeftEvent
            - MemberJoinedEvent
            - MemberRemovedEvent
            - UserClaimedNetworkEvent
            - SceneChangedToAwayEvent
            - SceneChangedToHomeEvent
            - SceneChangedToExcessiveMotionEvent
            - SceneChangedToGuardianEvent
            - NetworkDestroyedEvent
            - NetworkCreatedEvent
            - NetworkResetEvent
            - NetworkRadarConnectedEvent
            - NetworkRadarDisconnectedEvent
            - NetworkMotionConfigChangedEvent
            - NetworkSceneConfigChangedEvent
            - NetworkChangedEvent
            - SystemConnectedEvent
            - SystemDisconnectedEvent
            - DeviceConnectedEvent
            - DeviceDisconnectedEvent
            - DeviceTimedOutEvent
            - CustomAlertEvent
            - VaultFlushRequest
            - VaultFlushResponse
          type: string
        deviceId:
          description: Device identification, such as mac address
          type: string
    TopologyDevice:
      title: TopologyDevice
      type: object
      properties:
        id:
          description: Unique device identifier
          type: integer
        name:
          description: Device identifier
          type: string
        ip:
          description: Device local IP
          type: string
        is_mesh_sounding:
          description: Boolean if device is mesh sounding
          type: boolean
        friendly_name:
          description: Device friendly name
          type: string
        node_name:
          description: Name of AP this device is connected to
          type: string
        location:
          description: Device location
          type: string
        type:
          $ref: '#/components/schemas/TopologyDeviceType'
        device_info:
          $ref: '#/components/schemas/DeviceInfo'
        hw_platform:
          description: Device hardware platform
          type: string
        macs:
          description: List of MACs belonging to this device
          type: array
          items:
            $ref: '#/components/schemas/MachineAddress'
        icon:
          enum:
            - DEFAULT
            - ORBI
            - GWIFI
            - NEST
            - TPLINK
            - LEAF
          type: string
        online:
          description: true if the device is currently online
          type: boolean
        mobile:
          description: true if the device is presumed mobile
          type: boolean
        is_static:
          description: Link fixed vs mobile detection state
          enum:
            - UNKNOWN
            - MOBILE
            - STATIC_NEW
            - STATIC
          type: string
        tx_enable:
          description: |-
            Keys are leaf macs, value is:
            "" - automatic sounding
            "1" - sounding forced enabled
            "0" - disabled
          type: string
        sounding_state:
          $ref: '#/components/schemas/LinkSoundingState'
    TopologyLink:
      title: TopologyLink
      type: object
      properties:
        src_id:
          description: Unique device identifier of link source
          type: integer
        dst_id:
          description: Unique device identifier of link destination
          type: integer
        motion_enabled:
          type: boolean
        detail:
          $ref: '#/components/schemas/RadarNetworkLink'
        sounding_state:
          $ref: '#/components/schemas/LinkSoundingState'
    MotionHistoryState:
      title: MotionHistoryState
      description: |-
        Provides the Motion History State at a specific date and time.  

        State values indicate the following:

        - `0` Not armed and not tripped

        - `1` Not armed and tripped

         - `2` Armed and not tripped

        - `3` Armed and tripped
      type: array
      items:
        allOf:
          - type: array
            items:
              allOf:
                - title: State
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                  type: integer
                  description: |-


                    State values indicate the following:

                    - `0` Not armed and not tripped

                    - `1` Not armed and tripped

                     - `2` Armed and not tripped

                    - `3` Armed and tripped
                  nullable: true
                - title: Epoch Time
                  description: Date and time in Epoch format
                  type: integer
      example:
        - - 0
          - 1709316000
        - - 1
          - 1709319600
        - - 1
          - 1709323200
        - - 2
          - 1709326800
        - - 3
          - 1709330400
        - - 4
          - 1709334000
    MotionNetworkTopology:
      title: MotionNetworkTopology
      required:
        - devices
        - links
      type: object
      properties:
        ts:
          format: float
          description: UTC timestamp report was produced
          type: number
        devices:
          description: Device list
          type: array
          items:
            $ref: '#/components/schemas/TopologyDevice'
        links:
          description: Device interconnect
          type: array
          items:
            $ref: '#/components/schemas/TopologyLink'
    TopologyDeviceType:
      title: TopologyDeviceType
      enum:
        - MESH_ROOT
        - MESH_NODE
        - LEAF
        - CLIENT
      type: string
    RefreshLivePubnub:
      title: LiveRefreshPubnub
      required:
        - subscribeKey
        - publishKey
        - authKey
        - channel
      type: object
      properties:
        subscribeKey:
          type: string
        publishKey:
          type: string
        authKey:
          type: string
        channel:
          description: ''
          type: string
        ttl:
          description: >-
            If not refreshed after this many seconds the publishing will
            automatically cease.
          default: 300
          type: integer
    refreshlive:
      title: LiveRefresh
      type: object
      properties:
        ttl:
          description: >-
            If not refreshed after this many seconds the publishing will
            automatically cease.
          default: 120
          type: integer
    MotionHistoryDataPoint:
      title: MotionHistoryDataPoint
      description: |-
        A single data point of motion history

        [value, ts]
      type: array
      items:
        anyOf:
          - type: number
            format: timestamp
          - type: number
            format: float
          - type: number
            format: integer
          - type: number
            format: 'null'
      minItems: 2
      maxItems: 2
      example:
        - - 0.57
          - 1709870400
        - - 0.89
          - 1709874000
        - - 0.63
          - 1709877600
        - - 0
          - 1709906400
        - - 0
          - 1709910000
        - - null
          - 1709910000
    LocationHistoryByDevice:
      title: LocationHistoryByDevice
      description: ''
      type: object
      properties:
        mac:
          description: >-
            Assigned friendly name of device if provided. May be the device id
            in the case of the sounding device being a mesh node.
          $ref: '#/components/schemas/MachineAddress'
        friendly_name:
          description: Assigned friendly name of device if provided
          type: string
          nullable: true
        type:
          description: One of "LEAF", "MESH_NODE" or "MESH_ROOT"
          type: string
          nullable: true
        location:
          description: >-
            Location name that the device was assigned. Where location is not
            assigned, or in the case of an extender, this may be the mac address
            of the device, or the identifier of a node in a mesh network.
          type: string
        data:
          description: >-
            Array of data points of location history for requested time window,
            with each item in the array as a data point: `[motion_density_value,
            ts]`.
          type: array
    LocationHistogramEntry:
      title: LocationHistogramEntry
      required:
        - mac
        - density
      type: object
      properties:
        mac:
          description: Last 6 digits of hex mac
          type: string
        density:
          description: Density of this device (0-1)
          type: number
        id:
          description: node_id
          type: integer
        icon:
          description: icon
          type: string
        name:
          description: Device (friendly) name
          type: string
        type:
          $ref: '#/components/schemas/TopologyDeviceType'
        location:
          description: Device location
          type: string
        mobile:
          description: Device mobile
          type: boolean
    MotionHistoryDensity:
      title: MotionHistoryDensity
      description: >-
        [val,ts] pairs of motion density values.  Density is a % normalized
        between 0.0 - 1.0
      type: array
      items:
        $ref: '#/components/schemas/MotionHistoryDataPoint'
    MotionHistoryIntensity:
      title: MotionHistoryIntensity
      description: >-
        [val,ts] pairs of motion intensity values.  Intensity has a soft limit
        at 1.0, but this is a raw measurement and may sometimes exceed this
        value.
      type: array
      items:
        $ref: '#/components/schemas/MotionHistoryDataPoint'
    MotionStateBlocks:
      title: MotionStateBlocks
      type: array
      example:
        - devices:
            - Amazon Flex
            - Amazon Flex Blue
            - Plume SP
          location_history:
            - densities:
                - 0.16666666666666669
              devices:
                - Amazon Flex
              friendly_name:
                - Amazon Flex
              locations:
                - Upstairs Hallway
              macs:
                - 140ac50fd49c
              start: 1708632120
              stop: 1708632240
            - densities:
                - 0.1125
                - 0.11833333333333335
                - 0.38416666666666666
                - 0.23166666666666666
              devices:
                - Amazon Flex
                - Amazon Flex
                - Amazon Flex Blue
                - Plume SP
              friendly_name:
                - Amazon Flex
                - Amazon Flex
                - Amazon Flex Blue
                - Plume SP
              locations:
                - Upstairs Hallway
                - Dining Room
                - Family Room
                - Basement
              macs:
                - 140ac50fd49c
                - 140ac5ee7dae
                - 40a2dbbac5e8
                - 4H8030274F
              start: 1708632240
              stop: 1708632360
            - densities:
                - 0.26249999999999996
                - 0.2875
              devices:
                - Amazon Flex
                - Amazon Flex Blue
              friendly_name:
                - Amazon Flex
                - Amazon Flex Blue
              locations:
                - Dining Room
                - Family Room
              macs:
                - 140ac5ee7dae
                - 40a2dbbac5e8
              start: 1708632360
              stop: 1708632480
            - densities:
                - 0.12083333333333332
                - 0.19583333333333336
              devices:
                - Amazon Flex
                - Amazon Flex Blue
              friendly_name:
                - Amazon Flex
                - Amazon Flex Blue
              locations:
                - Dining Room
                - Family Room
              macs:
                - 140ac5ee7dae
                - 40a2dbbac5e8
              start: 1708632480
              stop: 1708632600
            - densities:
                - 0.15999999999999998
                - 0.095
              devices:
                - Amazon Flex
                - Amazon Flex Blue
              friendly_name:
                - Amazon Flex
                - Amazon Flex Blue
              locations:
                - Dining Room
                - Family Room
              macs:
                - 140ac5ee7dae
                - 40a2dbbac5e8
              start: 1708632600
              stop: 1708632720
            - densities:
                - 0.0875
              devices:
                - Amazon Flex Blue
              friendly_name:
                - Amazon Flex Blue
              locations:
                - Family Room
              macs:
                - 40a2dbbac5e8
              start: 1708632720
              stop: 1708632840
          locations:
            - Upstairs Hallway
            - Dining Room
            - Family Room
            - Basement
          start: 1708632120
          state: 0
          stop: 1708632960
    LocationHistory:
      title: LocationHistory
      type: object
      properties:
        locations:
          type: array
          items:
            $ref: '#/components/schemas/LocationHistoryByDevice'
      example:
        locations:
          - mac: 083a88d3556b
            friendly_name: HT-A9 Sony
            type: LEAF
            location: Living Room
            data:
              - - null
                - 1707150060
          - mac: 0c8063935f87
            friendly_name: Dinette Switch
            type: LEAF
            location: Living Room
            data:
              - - 0.011111111111111112
                - 1707142260
              - - 0
                - 1707142320
              - - 0.3
                - 1707142380
              - - 0.55
                - 1707142440
              - - 0.05
                - 1707142560
              - - 0.041666666666666664
                - 1707142620
              - - 0
                - 1707142680
              - - 0.06666666666666667
                - 1707142740
              - - 0.43333333333333335
                - 1707142800
              - - 0.10833333333333334
                - 1707142860
              - - 0.041666666666666664
                - 1707142920
              - - 0
                - 1707142980
              - - 0.05833333333333333
                - 1707143040
              - - 0.08333333333333333
                - 1707143100
              - - 0.1125
                - 1707143160
              - - 0.03333333333333333
                - 1707143220
              - - 0
                - 1707143280
              - - 0
                - 1707143340
              - - 0
                - 1707143400
              - - 0
                - 1707143460
              - - null
                - 1707150060
          - mac: 0c80639418d0
            friendly_name: Kitchen Switch
            type: LEAF
            location: Living Room
            data:
              - - 0.16999999999999998
                - 1707142200
              - - 0.3333333333333333
                - 1707142260
              - - 0.03333333333333333
                - 1707142320
              - - 0
                - 1707142380
              - - 0.19999999999999998
                - 1707143340
              - - 0.09166666666666667
                - 1707143400
              - - 0
                - 1707143460
              - - null
                - 1707150060
          - mac: 0c80639a8459
            friendly_name: Office Switch
            type: LEAF
            location: Basement
            data:
              - - 0.06666666666666667
                - 1707143400
              - - 0
                - 1707143460
              - - null
                - 1707150060
          - mac: 342fbd2c3469
            friendly_name: Nintendo Switch
            type: LEAF
            location: Living Room
            data:
              - - null
                - 1707150060
          - mac: 3868a40c0b06
            friendly_name: The Frame TV
            type: LEAF
            location: Living Room
            data:
              - - null
                - 1707150060
          - mac: 3c22fb9c4836
            friendly_name: null
            type: null
            location: 3c22fb9c4836
            data:
              - - null
                - 1707150060
          - mac: 3c8d2040cb1c
            friendly_name: Chromecast
            type: LEAF
            location: Living Room
            data:
              - - null
                - 1707150060
          - mac: 446132bc0b51
            friendly_name: 'Thermostat '
            type: LEAF
            location: Hallway
            data:
              - - 0.25
                - 1707142020
              - - 0.24285714285714288
                - 1707142080
              - - 0.049999999999999996
                - 1707142140
              - - 0
                - 1707142200
              - - 0
                - 1707142260
              - - 0
                - 1707142320
              - - 0
                - 1707142380
              - - 0.1125
                - 1707143340
              - - 0
                - 1707143400
              - - 0
                - 1707143460
              - - null
                - 1707150060
          - mac: 4C72400F5E
            friendly_name: SuperPod
            type: MESH_ROOT
            location: Utility Room
            data:
              - - 0.7666666666666666
                - 1707141900
              - - 0.4
                - 1707141960
              - - 0.75
                - 1707142020
              - - 0.5916666666666667
                - 1707142080
              - - 0.19166666666666665
                - 1707142140
              - - 0.09999999999999999
                - 1707142200
              - - 0
                - 1707142260
              - - 0
                - 1707142320
              - - 0.06666666666666667
                - 1707142380
              - - 0.6599999999999999
                - 1707142440
              - - 0.42500000000000004
                - 1707142500
              - - 0.5727272727272728
                - 1707142560
              - - 0.08333333333333333
                - 1707142620
              - - 0
                - 1707142680
              - - 0
                - 1707142740
              - - 0.008333333333333333
                - 1707142800
              - - 0.58
                - 1707142860
              - - 0.29999999999999993
                - 1707142920
              - - 0.09999999999999999
                - 1707142980
              - - 0.5
                - 1707143040
              - - 0.3666666666666667
                - 1707143100
              - - 0.3499999999999999
                - 1707143160
              - - 0
                - 1707143220
              - - 0.09166666666666667
                - 1707143280
              - - 0.016666666666666666
                - 1707143340
              - - 0.16666666666666666
                - 1707143400
              - - 0
                - 1707143460
              - - null
                - 1707150060
          - mac: 4C724011DB
            friendly_name: SuperPod
            type: MESH_NODE
            location: Living Room
            data:
              - - 0.55
                - 1707141900
              - - 0.9428571428571428
                - 1707142140
              - - 0.6916666666666665
                - 1707142200
              - - 0.26666666666666666
                - 1707142260
              - - 0.08333333333333333
                - 1707142320
              - - 0.06
                - 1707142380
              - - 0.3
                - 1707142440
              - - 0.76
                - 1707142500
              - - 0.2
                - 1707142560
              - - 0.016666666666666666
                - 1707142620
              - - 0.016666666666666666
                - 1707142680
              - - 0.11666666666666668
                - 1707142740
              - - 0.06666666666666667
                - 1707142800
              - - 0.125
                - 1707142860
              - - 0.39166666666666666
                - 1707142920
              - - 0.008333333333333333
                - 1707142980
              - - 0.075
                - 1707143040
              - - 0.1416666666666667
                - 1707143100
              - - 0.12
                - 1707143160
              - - 0.1
                - 1707143220
              - - 0.06666666666666667
                - 1707143280
              - - 0.36666666666666664
                - 1707143340
              - - 0.09999999999999999
                - 1707143400
              - - 0
                - 1707143460
              - - null
                - 1707150060
          - mac: 4C724011FA
            friendly_name: SuperPod
            type: MESH_NODE
            location: Basement
            data:
              - - 0.4000000000000001
                - 1707141900
              - - 0.15000000000000002
                - 1707141960
              - - 0.6333333333333334
                - 1707142020
              - - 0.6
                - 1707142380
              - - 0.35
                - 1707142440
              - - 0.5666666666666667
                - 1707142500
              - - 0.07142857142857142
                - 1707142560
              - - 0
                - 1707142620
              - - 0
                - 1707142680
              - - 0
                - 1707142740
              - - 0.008333333333333333
                - 1707142800
              - - 0.02
                - 1707142860
              - - 0.7
                - 1707142920
              - - 0.11666666666666665
                - 1707142980
              - - 0.18333333333333335
                - 1707143040
              - - 0
                - 1707143100
              - - 0
                - 1707143160
              - - 0.4800000000000001
                - 1707143280
              - - 0.016666666666666666
                - 1707143340
              - - 0
                - 1707143400
              - - 0
                - 1707143460
              - - null
                - 1707150060
          - mac: 60b4f7f146ee
            friendly_name: null
            type: null
            location: 60b4f7f146ee
            data:
              - - null
                - 1707150060
          - mac: 60b4f7f147a6
            friendly_name: null
            type: null
            location: 60b4f7f147a6
            data:
              - - null
                - 1707150060
          - mac: 60b4f7f147a8
            friendly_name: null
            type: null
            location: 60b4f7f147a8
            data:
              - - null
                - 1707150060
          - mac: 64166679e0cb
            friendly_name: Google Doorbell
            type: LEAF
            location: Living Room
            data:
              - - 0.13333333333333333
                - 1707143400
              - - 0
                - 1707143460
              - - null
                - 1707150060
          - mac: a483e7dd04e3
            friendly_name: MacMini
            type: LEAF
            location: Living Room
            data:
              - - null
                - 1707150060
          - mac: cc9ea260a297
            friendly_name: Echo Dot
            type: LEAF
            location: Kitchen
            data:
              - - 0.11428571428571428
                - 1707142260
              - - 0.4333333333333333
                - 1707142320
              - - 0.10909090909090911
                - 1707142380
              - - 0.3
                - 1707142440
              - - 0.6499999999999999
                - 1707142500
              - - 0.15000000000000002
                - 1707142560
              - - 0.20000000000000004
                - 1707142620
              - - 0.4166666666666667
                - 1707142680
              - - 0.3166666666666667
                - 1707142740
              - - 0.049999999999999996
                - 1707142800
              - - 0.32999999999999996
                - 1707142860
              - - 0.225
                - 1707142920
              - - 0.2833333333333333
                - 1707142980
              - - 0.08333333333333333
                - 1707143040
              - - 0.25
                - 1707143100
              - - 0.25
                - 1707143160
              - - 0.25
                - 1707143220
              - - 0.03333333333333333
                - 1707143280
              - - 0.008333333333333333
                - 1707143340
              - - 0.11666666666666665
                - 1707143400
              - - 0
                - 1707143460
              - - null
                - 1707150060
    GatekeeperResponse:
      title: GatekeeperResponse
      required:
        - result
      type: object
      properties:
        local_config:
          $ref: '#/components/schemas/LocalConfig'
        message:
          description: When result is TRYAGAIN, this field contains an explanation.
          type: string
        result:
          description: >-
            This node's role in wifi motion network:


            MASTER - This node will be the master


            RADAR - This node will be a slave


            TRYAGAIN - Role cannot be determined at this time (see message for
            reason why)


            UNAUTHORIZED - Node is not authorized
          enum:
            - MASTER
            - RADAR
            - TRYAGAIN
            - UNAUTHORIZED
          type: string
      x-tagGroup: EDGE CONFIG
    RadarNetworkLink:
      title: RadarNetworkLink
      required:
        - mac
        - if_name
        - wifi_protocol
      type: object
      properties:
        ip:
          description: Local IP of link endpoint (from DHCP or ARP)
          type: string
        ht_capabilities:
          format: int32
          description: >-
            (Deprecated) HT Capability Transmit Beamforming Capabilities 32-bit
            field as defined in IEEE802.11-2017 section 9.4.2.56.6
          deprecated: true
          type: string
        implicit_measurements:
          description: Number of motion beacons on this link
          type: string
        serial_number:
          description: ''
          type: string
        connected_time:
          description: Connected time (sec) from ifconfig
          type: string
        vht_capabilities:
          format: int32
          description: >-
            (Deprecated) VHT Capabilities information 32-bit field as defined in
            IEEE802.11-2017 section 9.4.2.158.2
          deprecated: true
          type: string
        max_rx_streams:
          description: Maximum MIMO capability from motion80211
          type: string
        uptime:
          description: Connected time (ms) from motion80211
          type: string
        motion_state:
          description: Motion state from motion80211
          type: string
        tx_bitrate:
          description: TX Bitrate
          deprecated: true
          type: string
        tx_retries:
          description: Number of TX retries from PHY
          deprecated: true
          type: string
        fw_rssi:
          description: Received Signal Strength on this link (dBm) from motion80211
          deprecated: true
          type: integer
        peer_type:
          description: motion80211 peer_type
          type: string
        hostname:
          description: Hostname of link endpoints (from DHCP)
          type: string
        tx_failed:
          description: Number of TX failures from PHY
          deprecated: true
          type: string
        rx_bitrate:
          description: RX Bitrate
          deprecated: true
          type: string
        motion_type:
          description: Indicates what type of motion, if any, this link is capable of
          enum:
            - MOTION_NONE
            - MOTION_CSI
            - MOTION_CV
            - MOTION_CFR
          type: string
        mac:
          $ref: '#/components/schemas/MachineAddress'
        last_heard:
          format: float
          description: Milliseconds elapsed since last communication on this link
          type: string
        if_name:
          description: Interface name
          type: string
        ifname:
          description: Deprecated, use if_name.
          deprecated: true
          type: string
        if_mac:
          nullable: true
          $ref: '#/components/schemas/MachineAddress'
        if_type:
          description: Interface type
          type: string
          enum:
            - MESH
            - WIFI_AP
            - CLIENT
            - UNKNOWN
        if_ch:
          description: Interface channel
          type: integer
          nullable: true
        aid:
          description: Access point ID from motion80211
          deprecated: true
          type: string
        tx_bytes:
          deprecated: true
          description: TX Bytes sent
          anyOf:
            - type: string
            - type: integer
        rx_bytes:
          deprecated: true
          description: RX Bytes in
          anyOf:
            - type: string
            - type: integer
        wifi_protocol:
          description: Wifi Protocol Level
          enum:
            - WIRED
            - 802_11BG
            - 802_11N
            - 802_11AC
            - '802_11'
            - dhcp
          type: string
        sounding_rate:
          description: Motion beacon sounding period (ms)
          type: string
        node:
          description: Device name of radar node this link is connected to
          type: string
        rssi:
          description: Received Signal Strength on this link (dBm) from ifconfig
          anyOf:
            - type: string
            - type: number
              format: float
        rssi_db:
          description: Received Signal Strength on this link (dBm) from ifconfig
          deprecated: true
          type: string
        implicit_error_count:
          description: Motion beacon error counter
          type: string
        csi_report_count:
          deprecated: true
          type: string
        v_matrix_report_count:
          deprecated: true
          type: string
        cv_matrix_report_count:
          deprecated: true
          type: string
        mconf_zero_count:
          type: integer
        phy:
          type: string
        implicit_bw_downgrades:
          type: string
        implicit_dsss:
          deprecated: true
          type: string
        implicit_legacy_20:
          deprecated: true
          type: string
        implicit_legacy_40:
          deprecated: true
          type: string
        implicit_legacy_80_80:
          deprecated: true
          type: string
        implicit_legacy_80:
          deprecated: true
          type: string
        implicit_legacy_160:
          deprecated: true
          type: string
        implicit_cck:
          deprecated: true
          type: string
        dhcp_id:
          deprecated: true
          type: string
        dhcp_expire:
          deprecated: true
          type: string
        ht_supported:
          deprecated: true
          type: string
        vht_supported:
          deprecated: true
          type: string
        rate_ms:
          deprecated: true
          type: string
        wifi_txpwr:
          deprecated: true
          type: string
      x-tagGroup: EDGE INTERNAL
    GuardianEvent:
      title: GuardianEvent
      required:
        - ts
        - guardian_id
        - network_id
        - category
        - event
      type: object
      properties:
        _id:
          description: Event uuid (for tagging)
          type: string
        category:
          description: Event category (for filtering)
          enum:
            - Link
            - Network
            - Motion
            - System
          type: string
        loc:
          description: Event location
          type: array
          items: {}
        detail:
          description: Event detail k/v pairs
          type: object
          additionalProperties:
            type: string
        link_dst_name:
          description: Link destination friendly name
          type: string
        network_id:
          description: Guardian network_id
          type: integer
        ts:
          format: float
          description: UTC timestamp
          type: number
        evt_detected_ts:
          format: float
          description: >-
            Present in MotionStoppedEvent. References the UTC timestamp of
            preceding MotionDetectedEvent.
          type: number
        intensity_window:
          type: array
          description: >-
            Array of float, of length
            guardian_config.motion_events.density_window -1  (Nominally len 7).
            Corresponds to the motion intensity values in the integration buffer
            at the time of the DetectedEvent.
          items:
            type: number
            format: float
        link_id:
          $ref: '#/components/schemas/LinkId'
        loc_name:
          description: First location friendly name
          type: string
        tag:
          description: >-
            Event tag.  Note that this field is always space-padded to 10
            characters.
          type: string
        link_src_name:
          description: Link source friendly name
          type: string
        guardian_id:
          description: Guardian deviceId
          type: string
        node_id:
          description: Database id of this node that generate the event
          type: integer
        deviceId:
          description: Device identification, such as mac address
          type: string
        node_name:
          description: >-
            Alternative device identification, that can be used by vendor from
            deviceId
          type: string
        debug:
          $ref: '#/components/schemas/MotionStoppedEventDebug'
        armed:
          description: >-
            Feedback of armed from GuardianConfig.motion_events


            If 0, this event will not be stored in history or pushed to the
            user.
          type: integer
        event:
          description: Event identifier
          enum:
            - MotionDetectedEvent
            - MotionStoppedEvent
            - LinkConnectedEvent
            - LinkDisconnectedEvent
            - LinkLowThroughputEvent
            - LinkCreatedEvent
            - MemberArrivedEvent
            - MemberLeftEvent
            - MemberJoinedEvent
            - MemberRemovedEvent
            - UserClaimedNetworkEvent
            - SceneChangedToAwayEvent
            - SceneChangedToHomeEvent
            - SceneChangedToExcessiveMotionEvent
            - SceneChangedToGuardianEvent
            - NetworkDestroyedEvent
            - NetworkCreatedEvent
            - NetworkResetEvent
            - NetworkRadarConnectedEvent
            - NetworkRadarDisconnectedEvent
            - NetworkMotionConfigChangedEvent
            - NetworkSceneConfigChangedEvent
            - NetworkChangedEvent
            - SystemConnectedEvent
            - SystemDisconnectedEvent
            - DeviceConnectedEvent
            - DeviceDisconnectedEvent
            - DeviceTimedOutEvent
            - CustomAlertEvent
            - VaultFlushRequest
            - VaultFlushResponse
          type: string
        _consumer:
          description: The consumer for Custom Alerts.
          type: string
        data:
          description: Data from Custom Alerts.
          type: object
          properties:
            title:
              description: Title
              type: string
            uuid:
              description: UUID id
              type: string
            id:
              description: User id
              type: integer
            first_name:
              description: F Name
              type: string
            last_name:
              description: L Name
              type: string
            sub:
              description: Unique identifier from Cognito SSO provider.
              type: string
            user:
              description: User data
              type: object
              properties:
                id:
                  description: User id
                  type: integer
                first_name:
                  description: F Name
                  type: string
                last_name:
                  description: L Name
                  type: string
      x-tagGroup: EDGE REPORTS
    MotionEventPair:
      title: Root Type for MotionEventPair
      description: A view of a combined MotionDetected and MotionStopped event.
      type: object
      properties:
        _id:
          description: 'Dot seperated id''s of paired events. '
          type: string
        event:
          description: '`MotionEventPair`'
          type: string
        ts:
          description: UTC timestamp of MotionEventPair generation.
          type: integer
        guardian_id:
          description: Unique network identifier.
          type: string
        link_id:
          description: Identifiers for link causing MotionDetectedEvent.
          type: string
        intensity_window:
          type: array
          items:
            type: number
        loc_name:
          description: Location string
          type: string
        link_dst_name:
          description: Link Node identifier.
          type: string
        link_src_name:
          description: Link Lead identifier.
          type: string
        evt_detected_ts:
          description: UTC timestamp of MotionDetectedEvent.
          type: integer
        evt_stopped_ts:
          description: UTC timestamp of MotionStoppedEvent.
          type: integer
        debug:
          $ref: '#/components/schemas/MotionStoppedEventDebug'
        network_id:
          description: Unique numerical network identifier.
          type: integer
        tag:
          description: 'User set event tag. '
          type: string
      example:
        _id: 64adc55a8d4288001b9c8e34.64adc5508d4288001b9c8e31
        event: MotionEventPair
        ts: 1699112349
        guardian_id: 5dc5cfe59b12797e2e3e362f
        link_id: 4C72900A6B.30894ab76326
        intensity_window:
          - 0.3
          - 0.56
          - 0.43
          - 0.27
          - 0.13
          - 0
          - 0.04
        loc_name: ''
        link_dst_name: 4C72900A6B
        link_src_name: 30894ab76326
        evt_detected_ts: 1689109839
        evt_stopped_ts: 1689109850
        debug:
          linkSens: {}
          msad:
            - 187.22
          links:
            - 4C72900A6B.30894ab76326
          mconf:
            - 80
          sens: 1
        network_id: 156
        tag: '          '
      x-tagGroup: Smart Sensitivity
    MotionStoppedEventDebug:
      title: Root Type for MotionStoppedEventDebug
      description: >-
        Motion detection parameters from event generator. Used for debug and
        sensitivity calibration purposes. Present in MotionStoppedEvent on newer
        firmware.
      type: object
      properties:
        linkSens:
          description: Object containing per-link sensitivity values.
          type: object
        msad:
          description: >-
            Array of msad values corresponding to the peak observed from each
            link.
          type: array
          items:
            type: number
            format: float
        links:
          description: Array of links involved in MotionDetectedEvent trigger.
          type: array
          items:
            type: string
        mconf:
          description: Array of mconf values causing event to trigger.
          type: array
          items:
            type: number
        sens:
          description: Sensitivity value of the network observed at MotionStoppedEvent
          type: number
          format: float
      example:
        linkSens: {}
        msad:
          - 187.22
        links:
          - 4C72900A6B.30894ab76326
        mconf:
          - 80
        sens: 1
      x-tagGroup: Smart Sensitivity
    ManagementAction:
      title: ManagementAction
      required:
        - trigger_id
        - command_id
        - node_id
        - payload
      type: object
      properties:
        network_id:
          description: Target node's network_id
          type: integer
        created_at:
          description: Timestamp the action was created at
          type: number
        updated_at:
          description: Timestamp the action was last updated
          type: number
        trigger_id:
          description: >-
            If not null, the execution of this action will be delayed until this
            trigger action has completed successfully (status=2xx).


            If the trigger action fails (status=4xx), this action will fail with
            the same status.
          type: integer
          nullable: true
        payload:
          type: object
          additionalProperties:
            type: string
        state:
          description: |-
            000 - Pending start

            001 - Waiting for action with trigger_id

            002 - Waiting for device to come online

            01x - Command was attempted "x" times

            100 - Device acknowledged, action started

            1xx - command_id specific progress codes

            200 - Completed (Success)

            4xx - Completed (Failed)
          type: integer
        node_id:
          description: Target node ID
          type: integer
        batch_id:
          description: >-
            Optional batch group identifier for this action.  If null then
            websocket-based monitoring of this action will not be possible.
          type: integer
          nullable: true
        response:
          type: object
          additionalProperties:
            type: string
        id:
          description: Auto-generated action ID
          type: integer
        command_id:
          description: |-
            0 - system_exec

            1 - factory_reset

            2 - firmware_update

            3 - reboot
          type: integer
      x-tagGroup: CORE INTERNAL
    ManagementResponse:
      title: ManagementResponse
      type: object
      properties:
        state:
          type: integer
        id:
          type: string
        response:
          type: object
      x-tagGroup: CORE INTERNAL
    MetaConfig:
      title: MetaConfig
      description: Network metadata storage.
      type: object
      properties:
        dwm:
          description: value mapping used for fleet's organization
          type: object
          properties:
            groupId:
              description: (internal) group ID numbering for the network
              anyOf:
                - type: string
                - type: integer
            systemName:
              description: (internal) system friendly used for labelling and organization
              type: string
            systemType:
              description: (internal) system type used for labelling and organization
              type: string
            systemOwner:
              description: (internal) system owner used for labelling and organization
              type: string
            configurationType:
              description: >-
                (internal) configuration type (mesh or single AP) used for
                labelling and organization
              type: string
        home:
          description: mobile client state
          type: object
          properties:
            sens:
              description: (internal) sensitivity level
              type: integer
            cooldown:
              description: (internal) cooldown time
              type: integer
            sensitivity_level:
              description: 'sensitivity level: high, normal, low'
              type: string
        location:
          description: >-
            location indicator leafs, key is leaf mac and value is location
            string
          type: object
          additionalProperties:
            type: string
        neuron_env:
          description: >-
            neuron environment to be used with this network (only current dev is
            supported)
          type: string
          nullable: true
        mqSecureRadarPort:
          description: >-
            Advanced - Network level overwrite of gatekeeper's `mqSecurePort`
            response.
          type: number
          nullable: true
        auto_segment:
          description: (internal) value for internal Vision project
          type: integer
        guardian_env:
          description: >-
            value env to indicate where fusion happens (only local is currently
            supported)
          type: string
        friendly_name:
          description: >-
            friendly name for leafs, key is leaf mac and value is friendly name
            string
          type: object
          additionalProperties:
            type: string
        new_network_id:
          description: >-
            (internal) used to indicate if there is older network id assigned to
            this network
          type: integer
        old_network_id:
          description: >-
            (internal) used to indicate if the old network id assigned to this
            network
          type: integer
        new_guardian_id:
          description: >-
            (internal) used to indicate if there is older guardian id assigned
            to this network
          type: string
        gatekeeper_redirect:
          description: >-
            Full URL of target gatekeeper (move this network to another
            instance)
          type: string
      additionalProperties:
        type: string
      x-tagGroup: MetaConfig
    GuardianStatusReport:
      title: GuardianStatusReport
      description: >-
        Status report emitted by the network on a regular interval. Contains
        information on the network's topology, health and motion detection
        metrics.
      type: object
      required:
        - ts
      properties:
        leafblower:
          description: Leafblower Link Stats object, key is mac address
          type: object
          additionalProperties:
            $ref: '#/components/schemas/LeafblowerLinkStats'
        network_id:
          description: Network numeric ID
          type: integer
        shard_id:
          description: Network shard
          type: string
        radars:
          description: map of radar id to radar status reports
          type: object
          additionalProperties:
            $ref: '#/components/schemas/RadarStatusReport'
        ts:
          format: float
          description: UTC timestamp
          type: number
        last_motion:
          nullable: true
          format: float
          description: UTC timestamp of last motion refresh time
          type: number
        motion_tripped:
          description: Motion detector current state (1 - tripped, 0 - no motion)
          type: integer
        startup:
          description: Is this the first report after startup
          type: boolean
        version:
          description: Component version inside Guardian
          type: object
          additionalProperties:
            type: string
        health:
          description: network and radar health
          type: object
          properties:
            nodes:
              description: Health score at node level
              type: object
              additionalProperties:
                type: number
            network:
              description: Health score at network level
              type: number
        capabilities:
          description: (alpha) list of device capabilities to unlock specify cloud options
          type: array
          items:
            type: string
        coverage:
          description: >-
            Leafblower room coverage per node, key is node id, value is coverage
            array
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        guardian_id:
          description: Network guardian_id
          type: string
        dhcp:
          description: map of dhcp mac address and dhcp stats object - fused across all AP
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DHCPStats'
        motion_enabled:
          description: Motion event generation state (1 - on, 0 - off)
          type: integer
        armed:
          description: Motion armed state (1 - on, 0 - off)
          type: integer
      nullable: true
      x-tagGroup: EDGE REPORTS
    MotionNetwork:
      title: MotionNetwork
      required:
        - id
        - shard_id
        - created_at
        - updated_at
        - guardian_type
        - guardian_id
        - master_node_id
      type: object
      properties:
        last_guardian_status:
          $ref: '#/components/schemas/GuardianStatusReport'
        radar_config:
          $ref: '#/components/schemas/RadarConfig'
        guardian_config:
          $ref: '#/components/schemas/GuardianConfig'
        created_at:
          format: float
          description: UTC second timestamp of network creation.
          type: number
        updated_at:
          format: float
          description: UTC second timestamp of last configuration update.
          type: number
        guardian_id:
          description: >-
            Unique network identifier. Populated by `location_id` on network
            creation.
          type: string
        last_heard:
          format: float
          description: UTC timestamp of last `guardian-status` message.
          type: number
        meta:
          $ref: '#/components/schemas/MetaConfig'
        master_node_id:
          description: Unique ID of gateway or mesh root node.
          type: integer
        shard_id:
          description: Identifies the shard the network is stored in.
          type: integer
        guardian_type:
          description: String representation of network's shard in shard-`shard-id` format.
          type: string
        disconnected_at:
          description: UTC second timestamp of recorded disconnection.
          type: number
          format: float
        nodes:
          description: >-
            When expandNodes=true or in a configuration update context, the
            nodes part of this network are returned in this array.
          type: array
          items:
            $ref: '#/components/schemas/MotionNetworkRadarNode'
        id:
          format: int64
          description: Unique network integer identifier.
          type: integer
        connection_status:
          description: Current connection status (null if has never been connected).
          type: boolean
          nullable: true
        connection_report:
          $ref: '#/components/schemas/GuardianEvent'
          nullable: true
        device_info:
          description: Mac-address keyed device info for all clients in this network.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DeviceInfo'
      x-tagGroup: CORE INTERNAL
    RadarConfig:
      title: RadarConfig
      description: Configuration that's shared by all Nodes in this Motion Network.
      type: object
      properties:
        dynamic_sensitivity:
          description: Dynamic sensitivity enable (for development only)
          type: string
        bridge:
          type: object
          properties:
            statusInterval:
              description: Period (in seconds) of status report generation
              default: 60
              type: integer
            zmqPort:
              format: int32
              description: Userspace ZMQ server port
              default: 6969
              type: integer
            loglevel:
              description: syslog output verbosity level
              default: info
              enum:
                - debug
                - info
                - error
              type: string
            zmqHost:
              description: Userspace ZMQ server hostname
              default: 127.0.0.1
              type: string
            linkExpiry:
              format: int32
              description: >-
                After how many seconds of inactivity is the CFR state for that
                link de-allocated.
              default: 120
              type: integer
            debug:
              format: int32
              description: >-
                When set to 1 application will output additional debug fields in
                the motion-mesh reports.
              default: 1
              type: integer
            debug_status:
              format: int32
              description: >-
                When set to 1 application will output additional debug fields in
                radar status reports.
              default: 0
              type: integer
            vault:
              format: int32
              description: >-
                When set to 1 application will output motion-raw radio debug
                reports.
              default: 0
              type: integer
        motion80211:
          type: object
          properties:
            txEnable:
              description: |-
                Key is leaf MAC, value is one of:
                "" - automatic (default)
                "1" - force sounding
                "0" - disable sounding
              type: object
              additionalProperties:
                anyOf:
                  - type: integer
                  - type: string
            linkSens:
              description: Key is a link ID, value is sensitivity delta for this link
              default: 1
              type: object
              additionalProperties:
                type: number
            hyperSensOverride:
              description: >-
                A list of device IDs for which hyper_sensitive omot mode is
                enabled regardless of platform
              type: array
              items:
                type: string
            noise_ctrl:
              description: >-
                Noise adaptation mode (0-2). 0- normal threshold, 1- less
                sensitive threshold, 2- no threshold applied (unsupported demo
                mode)
              default: 0
              type: integer
            cfrMode:
              description: >-
                Motion detection algorithm switch (legacy), no other value is
                supported
              default: o
              type: string
            period:
              format: int32
              description: Nominal Beacon/Solicitation Period (ms)
              type: integer
            meshAutoDisable:
              description: Mesh sounding auto disable at registration time
              type: integer
            meshSoundingDisabled:
              description: A list of device IDs for which mesh sounding is disabled
              type: array
              items:
                type: string
            sens:
              description: >-
                Motion Detection Sensitivity (1.0 - high, 2.0 - medium, 3.0 -
                low, generally bigger => less motion)
              default: 1
              type: number
            forceTxEnable:
              description: >-
                If set to 1 will disable leafblower controller and sound all
                available leaf links at all times.
              default: 0
              type: integer
            pingerEnable:
              description: |-
                Key is leaf MAC, value is one of:
                "" - automatic (default)
                "1" - force ping
                "0" - disable pinging
              type: object
              additionalProperties:
                anyOf:
                  - type: integer
                  - type: string
            ping_rate:
              description: The rate in milliseconds for ping period for all macs
              default: 100
              type: integer
            optmode:
              description: >-
                Key is leaf MAC, value is integer, allows for custom mode of
                motion algorithm, default is empty string. Supported after
                motion algo 4.3.1
              type: object
              additionalProperties:
                anyOf:
                  - type: integer
                  - type: string
            mpdf_threshold:
              description: >-
                Key is leaf MAC, value is number float threshold, default is
                empty string. Supported after motion algo 4.3.1
              type: object
              additionalProperties:
                anyOf:
                  - type: number
                  - type: string
      x-tagGroup: EDGE CONFIG
    MachineAddress:
      title: MachineAddress
      description: MAC in 00:11:22:33:44:55 format
      type: string
      x-tagGroup: DATA TYPES
    MotionMatrixReport:
      title: MotionMatrixReport
      description: >-
        A MotionMatrixReport contains one or more time-aligned grids of samples
        from all connected Radar Nodes, forming a view of the entire Motion
        Network. Systems in debug mode will produce all 4 data metrics (in
        addition to an additional report type carrying algorithm-specific debug
        data), while systems in normal mode produce only mkai and throughput.
      type: object
      properties:
        count:
          description: >-
            Number of samples (number of strides in the  inner data dimension) -
            always 1
          type: number
        loc:
          description: >-
            The first entry is a string representing the MAC addresses near
            which motion has been localized.  If present, the second entry is
            p_confidence a float representing how sure the algorithm is of its
            decision.
          type: array
        loc_name:
          description: >-
            User indicated location of the device being localized to in loc
            field (if provided, empty string otherwise)
          type: string
        loc_conf:
          description: >-
            The location confidence information as an array of number (float)
            for the corresponding loc output index. Available as debug output
            values when Guardian Config -> live_motion -> loc_conf_enable = 1.
            Supported as of GuardianCore = 0.7.2
          type: array
          items:
            type: number
        links:
          description: Array of link IDs (outer data dimension). Format is dst_mac-src_mac
          type: array
          items:
            $ref: '#/components/schemas/LinkId'
        interval:
          description: >-
            Milliseconds/sample (stride time of inner data dimension) - always
            500ms
          type: number
        ts:
          format: float
          description: >-
            Timestamp of the first sample in the stream (start time of inner
            data dimension)
          type: number
        last_motion:
          format: float
          description: UTC timestamp
          type: number
        data:
          description: Data fields as 2D arrays
          type: object
          properties:
            mkai:
              description: Average Motion Intensity - Links Dimension
              type: array
              items:
                description: Average Motion Intensity - Time dimension
                format: float
                type: number
            throughput:
              description: Normalized throughput for this sample - Links Dimension
              type: array
              items:
                description: Normalized throughput for this sample - Time dimension
                type: number
            mconf:
              description: Motion level confidence threshold - Links Dimension
              type: array
              items:
                description: Motion level confidence threshold - Time dimension
                format: float
                type: number
            msad:
              description: Un-gated average SAD - Links Dimension
              type: array
              items:
                description: Un-gated average SAD - Time dimension
                format: float
                type: number
            lraw:
              description: Unadjusted motion intensity - Links Dimension
              type: array
              items:
                description: Unadjusted motion intensity - Links Dimension
                format: float
                type: number
            o.rst:
              description: >-
                (debug-only) motion detection internal reset flag indicator -
                Links Dimension
              type: array
              items:
                description: >-
                  (debug-only) motion detection internal reset flag indicator -
                  Time Dimension
                type: number
                format: float
                nullable: true
            o.bw:
              description: >-
                (debug-only) motion detection internal rejection reason - Links
                Dimension
              type: array
              items:
                description: >-
                  (debug-only) motion detection internal rejection reason - Time
                  Dimension
                type: integer
                nullable: true
            o.snr:
              description: >-
                (debug-only) motion detection internal rejection reason - Links
                Dimension
              type: array
              items:
                description: >-
                  (debug-only) motion detection internal rejection reason - Time
                  Dimension
                type: integer
                nullable: true
            o.nse:
              description: >-
                (debug-only) motion detection internal rejection reason - Links
                Dimension
              type: array
              items:
                description: >-
                  (debug-only) motion detection internal rejection reason - Time
                  Dimension
                type: integer
                nullable: true
            o.pwr:
              description: >-
                (debug-only) motion detection internal rejection reason - Links
                Dimension
              type: array
              items:
                description: >-
                  (debug-only) motion detection internal rejection reason - Time
                  Dimension
                type: integer
                nullable: true
            o.dsnr:
              description: >-
                (debug-only) motion detection internal rejection reason - Links
                Dimension
              type: array
              items:
                description: >-
                  (debug-only) motion detection internal rejection reason - Time
                  Dimension
                type: integer
                nullable: true
            o.dsne:
              description: >-
                (debug-only) motion detection internal rejection reason - Links
                Dimension
              type: array
              items:
                description: >-
                  (debug-only) motion detection internal rejection reason - Time
                  Dimension
                type: integer
                nullable: true
            o.dpwr:
              description: >-
                (debug-only) motion detection internal rejection reason - Links
                Dimension
              type: array
              items:
                description: >-
                  (debug-only) motion detection internal rejection reason - Time
                  Dimension
                type: integer
                nullable: true
            snr:
              description: (debug-only) motion snr value - Links Dimension
              type: array
              items:
                description: (debug-only) motion snr value - Time Dimension
                type: number
                format: float
                nullable: true
            jconf:
              description: >-
                (debug-only) Secondary gate internal motion threshold - Links
                Dimension
              type: array
              items:
                description: >-
                  (debug-only) Secondary gate internal motion threshold - Time
                  Dimension
                type: number
                format: float
                nullable: true
            jraw:
              description: >-
                (debug-only) Secondary ungated internal motion value - Links
                Dimension
              type: array
              items:
                description: >-
                  (debug-only) Secondary ungated internal motion value - Time
                  Dimension
                type: number
                format: float
                nullable: true
            jtype:
              description: (debug-only) Secondary internal motion type - Links Dimension
              type: array
              items:
                description: (debug-only) Secondary internal motion type - Time Dimension
                type: number
                format: float
                nullable: true
            zzscore:
              description: >-
                (debug-only) Metric indicator for csi stability, available in
                newer omot 4x
              type: array
              items:
                description: >-
                  (debug-only) Secondary internal metric indicator for csi
                  stability - Time Dimension
                type: number
                format: float
                nullable: true
            debug:
              description: (debug-only) Array of numbers of motion debug values
              type: array
              items:
                description: >-
                  (debug-only) Secondary internal motion debug values - Time
                  Dimension
                type: array
                items:
                  type: number
                  nullable: true
      x-tagGroup: EDGE REPORTS
    GuardianConfig:
      title: GuardianConfig
      description: Configuration for gateway or mesh root.
      type: object
      properties:
        history_motion:
          type: object
          properties:
            count:
              description: Number of values per report
              default: 60
              type: integer
            enable:
              default: 1
              type: integer
            interval:
              description: Sample period (milliseconds) per value
              default: 5000
              type: integer
            flush_interval:
              description: >-
                Specifies the number of 500ms ticks to wait after a
                `MotionDetectedEvent`, before sending an early `motion-history`
                message.
              default: 300
              type: integer
        device_events:
          type: object
          properties:
            enable:
              description: Cloud only. Specifies if Device Events feature is enabled.
              default: 0
              type: integer
        live_motion:
          type: object
          properties:
            enable:
              description: Live motion (#model:PMznYr2J4pFFyKg4h) enable
              default: 1
              type: integer
            force_enable:
              description: Live motion enable override
              default: 0
              type: integer
            interval:
              description: Live motion sample period
              default: 500
              type: integer
            loc_conf_enable:
              description: >-
                This toggles the location confidence value by setting
                loc_conf_enable=1. This data will appear in the motion matrix if
                the firmware supports it.
              default: 0
              type: integer
        link_events:
          type: object
          properties:
            enable:
              description: When set to 1, enables the Link event generator
              type: integer
            throughput_threshold:
              description: >-
                The minimum throughput required to NOT issue a
                LinkLowThroughputEvent
              type: number
            idle_link_timeout:
              description: >-
                How long (sec) must a link have zero throughput before a
                LinkIdleEvent is issued
              type: integer
            throughput_cooldown:
              description: The minimum interval (sec) between two LinkLowThroughputEvents
              type: integer
            noise_duration:
              description: >-
                How long (sec) the noise level must exceed noise_threshold to
                issue a LinkHighNoiseEvent
              type: integer
            noise_cooldown:
              description: The minimum interval (sec) between two LinkHighNoiseEvents
              type: integer
            noise_threshold:
              description: The noise level required to issue a LinkHighNoiseEvent
              type: integer
            throughput_duration:
              description: >-
                How long (sec) must the throughput be under throughput_threshold
                to issue a LinkLowThroughputEvent
              type: integer
        leafblower:
          type: object
          properties:
            cutoff:
              format: float
              description: Minimum score for leafblower to sound a client device
              default: 0
              type: number
            blower_size:
              description: Maximum number of entries in the system leafblower table
              default: 60
              type: integer
            log_debug:
              description: Sets the debug logging inside leafblower
              default: 0
              type: integer
            link_expiry:
              description: >-
                Reset link history after this many inactive cycles (default is 1
                week)
              default: 1008
              type: integer
            sneaky_cutoff:
              format: float
              description: Minimum score for leafblower to sneaky sound device (alpha)
              default: -1.1
              type: number
            sneaky_link_limit:
              description: Number of maximum devices to be sneaky sounded (alpha)
              default: 0
              type: integer
            whitelist:
              description: >-
                Key is MAC, value 0 is same as absent all other values mean
                enabled.
              type: object
              additionalProperties:
                anyOf:
                  - type: integer
                  - type: boolean
            link_limit:
              description: Target number of leaf sounding links per AP
              default: 3
              type: integer
            whitelist_enable:
              description: When enabled, only leaf MACs in whitelist will be sounded.
              default: 0
              type: integer
            cycle_count:
              description: Evaluation cycle time (in radar status rate)
              default: 10
              type: integer
            cycle_time:
              description: Deprecated, do not use.
              deprecated: true
              type: integer
        debug:
          type: object
          properties:
            status:
              description: Force status fusion every 1min (disables heartbeats) when 1
              type: integer
            leafblower:
              description: Send additional leafblower debug reports when 1
              type: integer
            gateway:
              description: >-
                Enable debug gateway mode (forward all reports from nodes to
                cloud)
              type: integer
            zilker:
              description: Enable Zilker testing mode.
              type: integer
        user_priority:
          description: The list of user priority rooms in order from highest to lowest
          type: array
          items:
            type: string
        motion_events:
          type: object
          additionalProperties:
            type: number
          properties:
            enable:
              description: Enable motion event generation.
              default: 1
              type: integer
            threshold:
              description: This value is subtracted from all per-link motion
              default: 0
              type: number
            pet_mode:
              description: >-
                Controls the guardian pet mode settings, indicates the size in
                pounds for largest pet in the house. Overrides density_thres and
                min_duration locally
              default: 0
              type: integer
            cooldown:
              description: Minimum period between successive MotionDetectedEvent (sec)
              type: integer
            excessive_mins:
              description: >-
                If not 0, a MotionExcessiveEvent will be fired when
                excessive_mins minutes of motion are detected over an
                excessive_mins/excessive_density minute window.
              default: 0
              type: integer
            excessive_density:
              description: Normalized motion density that's considered excessive
              default: 0.7
              type: number
            armed:
              description: >-
                Controls reporting of motion events to user and storing them to
                history
              default: 1
              type: integer
            override:
              description: Advanced controls for QA/R&D only
              type: object
              properties:
                min_duration:
                  description: >-
                    How long the intensity or desnity level must exceed
                    thresholds to issue a MotionDetectedEvent (sec)
                  type: number
                density_window:
                  description: Number of 500ms samples to integrate density across
                  type: integer
                density_thres:
                  description: >-
                    The minimum motion density (sum of intensity in a 5s?
                    window) to consider sending a MotionDetectedEvent
                  type: number
                intensity_thres:
                  description: >-
                    The motion intensity level required to consider sending a
                    MotionDetectedEvent
                  type: number
      x-tagGroup: EDGE CONFIG
    GatekeeperQuery:
      title: GatekeeperQuery
      required:
        - radar_status
        - factory_reset
        - master_failed
        - standalone
      type: object
      properties:
        standalone:
          description: Stand-alone mode (legacy, should always be set to true)
          type: boolean
        factory_reset:
          description: If True indicates that the device has been freshly factory reset
          type: boolean
        capabilities:
          description: Report the device platform capabilities
          type: array
          items:
            type: string
        radar_status:
          $ref: '#/components/schemas/RadarStatusReport'
        master_failed:
          description: >-
            If True indicates that the device was unable to contact the local
            master
          type: boolean
        debug:
          description: Extra debug fields to understand delays in gatekeeper startup
          type: object
          additionalProperties:
            type: string
      x-tagGroup: EDGE CONFIG
    RadarStatusReport:
      title: RadarStatusReport
      type: object
      properties:
        load:
          description: Device load averages (1min, 5min, 15min)
          type: array
          items:
            type: string
        bridge_uptime:
          description: Duration of bridge process uptime in seconds
          type: number
        links:
          description: Details on all active motion links
          type: array
          items:
            $ref: '#/components/schemas/RadarNetworkLink'
        p2p_bssid:
          $ref: '#/components/schemas/MachineAddress'
        ap_bssid_5ghz:
          $ref: '#/components/schemas/MachineAddress'
        fw_version:
          description: Halo Edge Firmware version
          type: string
        root_mode:
          description: |-
            This device's role in the wifi mesh network topology:
            0 - unknown, 1 - slave, 2 - master
          default: 0
          enum:
            - 0
            - 1
            - 2
          type: number
        hw_id:
          description: Hardware platform identifier
          type: string
        uptime:
          description: Device uptime (seconds)
          type: string
        location_id:
          description: OVSDB location id
          type: string
        mem_stats:
          description: >-
            measured memory usage inside the device per process, key is process
            name and value is process memory usage
          type: object
          additionalProperties:
            type: string
        ts:
          format: float
          description: UTC timestamp
          type: number
        zmq_restart_count:
          description: (Deprecated) Number of restart count for nng socket
          deprecated: true
          type: integer
        version:
          description: Radar components version
          type: object
        status_time:
          description: >-
            Duration of time it took to generate this status report on device
            (sec)
          type: number
        gw_ip_change:
          description: ''
          type: boolean
        ap_bssid_6ghz:
          description: ''
          type: string
        base_image_version:
          description: ''
          type: string
          nullable: true
        updated:
          description: flag indicator that link stats have changed since the last status
          type: boolean
        blower_time:
          description: >-
            Duration of time it took to generate this leafblower report on
            device (sec)
          type: number
        UdiStatsReport:
          title: UdiStatsReport
          type: object
          properties:
            start_epoch_ms:
              description: Epoch time when stats generation began
              type: integer
            start_mac_tsf:
              description: Mac tsf when stats generation began
              type: integer
            count:
              description: Total number of samples used to compute stats
              type: integer
            bw:
              description: Counters for [20MHz, 40MHz, 80MHz, 160MHz, 80+80MHz]
              type: array
              items:
                description: Counter for [20MHz, 40MHz, 80MHz, 160MHz, 80+80MHz]
                format: float
                type: number
            downgrades:
              description: Total number of bandwidth downgrades
              type: integer
            invalid:
              description: Total number of invalid captures
              type: integer
            Tmax_ms:
              description: CSI Period max
              type: number
              format: float
            Tmin_ms:
              description: CSI Period min
              type: number
              format: float
            Tmean_ms:
              description: CSI Period mean
              type: number
              format: float
            Tstd_ms:
              description: CSI Period std-dev
              type: number
              format: float
            udi_error:
              description: ' CSI packets error count'
              type: number
              format: float
            dbg_pe_cnt:
              description: >-
                Counters for payload decode error type [ERROR_FORMAT,
                ERROR_LENGTH, ERROR_NOSUPPORT, ERROR_NOPAYLOAD, ERROR_PARAMETER]
              type: array
              items:
                type: integer
              example:
                - 0
                - 0
                - 0
                - 0
                - 0
        mem:
          description: Device memory usage diagnostics
          type: object
          properties:
            avail:
              description: Available memory (kB)
              type: string
            total:
              description: Total memory (kB)
              type: string
            free:
              description: Free memory (kB)
              type: string
        interfaces:
          description: Details on all available network interfaces
          type: array
          items:
            $ref: '#/components/schemas/RadarNetworkInterface'
        node_id:
          description: OVSDB node id
          type: string
        deviceId:
          description: radar_deviceId from Gatekeeper
          type: string
        gateway_bssid:
          $ref: '#/components/schemas/MachineAddress'
        _age:
          description: last status cycle the radar was seen
          type: integer
        cpu_stats:
          description: >-
            measured CPU usage inside the device per process, key is process
            name and value is process cpu usage
          type: object
          additionalProperties:
            type: number
          nullable: true
        ap_bssid_2ghz:
          $ref: '#/components/schemas/MachineAddress'
        hw_version:
          description: Hardware platform version
          type: string
        mesh_bssid:
          $ref: '#/components/schemas/MachineAddress'
        dhcp:
          description: map of dhcp mac address and dhcp stats object
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DHCPStats'
        hw_variant:
          description: OVSDB model variant
          type: string
        meta_location_id:
          description: ''
          type: string
      x-tagGroup: EDGE REPORTS
    IoTConnectionStatus:
      title: IoTConnectionStatus
      type: object
      properties:
        ClientAddr:
          description: IP Address
          type: string
        Protocol:
          default: mqtt4
          type: string
        Durable:
          type: boolean
        ClientID:
          description: Format is d:org:deviceType:deviceId
          type: string
        Time:
          type: string
        Action:
          enum:
            - Connect
            - Disconnect
          type: string
        Port:
          type: integer
      x-tagGroup: CORE INTERNAL
    GetSoundingSettingsConfig:
      title: GetSoundingSettingsConfig
      description: Global Sounding Settings
      type: object
      properties:
        zone_priority_list:
          description: Locations the device selection algorithm will prioritize.
          type: array
          items:
            type: string
        motion_events_enabled:
          description: >-
            Enable motion events. On detected motion, the network emits a
            `MotionDetectedEvent`.
          enum:
            - 0
            - 1
          type: integer
        device_events:
          description: |-
            Enable Device Connection Events. 

             Requires global `sounding_mode` to equal `deny` and individual devices' `sounding_mode` to equal `allow`. When the connection state of device changes, an event is emitted. Possible events are: `DeviceConnectedEvent`, `DeviceDisconnectedEvent` and `DeviceTimedOutEvent`
          enum:
            - 0
            - 1
          type: integer
        motion_history_enabled:
          description: >-
            Enable historical motion data from the network. The data can be
            queried through the Motion History APIs.
          enum:
            - 0
            - 1
          type: number
        mesh_auto_disable:
          description: Disable motion detection on all current and added mesh nodes.
          enum:
            - 0
            - 1
          type: integer
        mesh_sounding_disabled:
          description: >-
            Mesh nodes that are disabled for motion detection. To alter this
            array, set `sounding_mesh` on the clients API or enable
            `mesh_auto_disable`
          type: array
          items:
            type: string
        motion_events_armed:
          description: >-
            Enable storage of motion events. Requires `motion_events_enabled` to
            be enabled. The stored events can be queried through the Events
            APIs.
          enum:
            - 0
            - 1
          type: integer
        motion_paused:
          description: >-
            Pauses all motion detection. While paused, the network can't receive
            setting changes.
          enum:
            - 0
            - 1
          type: integer
        leafblower_cutoff:
          description: |-
            Advanced - Minimum score for device selection algorithm.
             -1.1 ignores the device's quality, and always uses them for motion detection. This feature should be used in conjunction with the `sounding_mode` features.
          type: number
          format: float
          minimum: -1.1
          maximum: 1
        link_limit:
          description: >-
            Maximum number of motion-detecting devices per access point or mesh
            node
          minimum: 0
          maximum: 10
          type: number
        pet_mode:
          description: >-
            When enabled, pet motion is less likely to generate a
            `MotionDetectedEvent`. Can only be used when global `sensitivity` is
            set to high (1.0) and all clients' `sensitivity_mode` is `global`.
          enum:
            - 0
            - 1
          type: integer
        cooldown:
          description: >-
            Represents the duration of inactivity following a
            `MotionDetectedEvent`, that the network keeps monitoring for motion.
            Once inactivity is observed, the network emits a
            `MotionStoppedEvent` and concludes the event window.
          type: integer
          format: seconds
        sensitivity:
          description: >-
            Global motion detection sensitivity (1.0 - high, 2.0 - medium, 3.0 -
            low, 7.0 - very-low)
          type: number
          format: float
        sounding_mode:
          description: >-
            This parameter controls the default device selection policy for the
            network, the two policy modes are allow and deny.


            Allow mode: devices will be selected as best determined by the
            device selection algorithm. Devices can be blocked from selection by
            setting txenble=0 for that leaf(s).


            Deny mode: devices that are not explicitly listed via a whitelist
            will be disallowed from sounding.

             Note switching this mode will clear any existing device device availability settings and all devices will revert to available for `allow` mode or unavailable for `deny` mode.
          enum:
            - allow
            - deny
          type: string
      example:
        motion_paused: 0
        motion_events_enabled: 1
        motion_events_armed: 1
        motion_history_enabled: 1
        mesh_auto_disable: 0
        mesh_sounding_disabled: []
        sounding_mode: allow
        leafblower_cutoff: 0
        zone_priority_list:
          - Kitchen
        sensitivity: 1
        pet_mode: 0
        cooldown: 120
    PatchSoundingSettingsConfig:
      title: PatchSoundingSettingsConfig
      description: Global Sounding Settings
      type: object
      properties:
        zone_priority_list:
          description: >-
            Locations the device selection algorithm will prioritize. Setting
            this parameter to [] will turn off prioritization. Updates require
            the complete array to be included in the request.
          type: array
          items:
            type: string
        motion_events_enabled:
          description: >-
            Enable motion events. On detected motion, the network emits a
            `MotionDetectedEvent`.
          enum:
            - 0
            - 1
          type: integer
        device_events:
          description: |-
            Enable Device Connection Events. 

             Requires global `sounding_mode` to equal `deny` and individual devices' `sounding_mode` to equal `allow`. When the connection state of device changes, an event is emitted. Possible events are: `DeviceConnectedEvent`, `DeviceDisconnectedEvent` and `DeviceTimedOutEvent`
          enum:
            - 0
            - 1
          type: integer
        motion_history_enabled:
          description: >-
            Enable historical motion data from the network. The data can be
            queried through the Motion History APIs.
          enum:
            - 0
            - 1
          type: number
        mesh_auto_disable:
          description: Disable motion detection on all current and added mesh nodes.
          enum:
            - 0
            - 1
          type: integer
        motion_events_armed:
          description: >-
            Enable storage of motion events. Requires `motion_events_enabled` to
            be enabled. The stored events can be queried through the Events
            APIs.
          enum:
            - 0
            - 1
          type: integer
        motion_paused:
          description: >-
            Pauses all motion detection. While paused, the network can't receive
            setting changes.
          enum:
            - 0
            - 1
          type: integer
        leafblower_cutoff:
          description: |-
            Advanced - Minimum score for device selection algorithm.
             Set to -1.1 to ignore device quality, and always use them for motion detection. This feature should be used in conjunction with the `sounding_mode` features.
          type: number
          format: float
          minimum: -1.1
          maximum: 1
        link_limit:
          description: >-
            Maximum number of motion-detecting devices per access point or mesh
            node
          minimum: 0
          maximum: 10
          type: number
        pet_mode:
          description: >-
            When enabled, pet motion is less likely to generate a
            `MotionDetectedEvent`. Can only be used when global `sensitivity` is
            set to high (1.0) and all clients' `sensitivity_mode` is `global`.
          enum:
            - 0
            - 1
          type: integer
        cooldown:
          description: >-
            Represents the duration of inactivity following a
            `MotionDetectedEvent`, that the network keeps monitoring for motion.
            Once inactivity is observed, the network emits a
            `MotionStoppedEvent` and concludes the event window.
          type: integer
          format: seconds
        sensitivity:
          description: >-
            Global motion detection sensitivity (1.0 - high, 2.0 - medium, 3.0 -
            low, 7.0 - very-low)
          type: number
          format: float
        sounding_mode:
          description: >-
            This parameter controls the default leaf selection policy for the
            network, the two policy modes are allow and deny.


            Allow mode: leafs will be selected as best determined by leaf
            blower. Leaf(s) can be blocked from selection by setting txenble=0
            for that leaf(s).


            Deny mode: leafs that are not explicitly listed via a whitelist will
            be disallowed from sounding.

             Note switching this mode will clear any existing device device availability settings and all devices will revert to available for `allow` mode or unavailable for `deny` mode.
          enum:
            - allow
            - deny
          type: string
    SoundingSettingsConfigReturn:
      type: object
      properties:
        status:
          description: |-
            0 failure

            1 full success

            2 some changes failed

            3 an IoT update was requested but network has not yet started up
          type: integer
        success:
          description: 1 if the operation was successful, 0 otherwise
          type: integer
        details:
          $ref: '#/components/schemas/WarningErrors'
          description: >-
            The list of warnings or errors that occurred during processing of
            this request.
      x-tagGroup: Sounding v2
    SoundingClientDeviceStatus:
      title: SoundingClientDeviceStatus
      description: Sounding client current status
      type: object
      properties:
        device_id:
          description: >-
            When `is_node` is true, this is the serial number of the AP.   When
            `is_extender` is true, this is the serialNumber of the extender
            device (or Masked-Mac if unavailable). 

             Nodes & Extenders only
          type: string
        device_info:
          $ref: '#/components/schemas/DeviceInfo'
        friendly_name:
          description: Human readable name assigned to the leaf of Node.
          type: string
        id:
          description: >-
            If is_node is true, this value will be >0 and is the node_id of the
            AP.

             Nodes only
          type: integer
        is_extender:
          description: >-
            When `is_node` is true, indicates if this device is an extender (not
            full node).
          type: boolean
        is_node:
          description: >-
            Indicates if the device is a mesh participant (true) or a client
            device (false).
          type: boolean
        is_online:
          description: true if the device is currently online
          type: boolean
        omot_version:
          description: Algorithm version
          type: string
          nullable: true
        is_root:
          description: |-
            When `is_node` is true, indicates if this device is the root master.

             Nodes only
          type: boolean
        location:
          description: Device location name.
          type: string
        sensitivity:
          description: Current sensitivity of the device.
          type: number
        sensitivity_mode:
          description: >-
            indicates whether the device is using the global sensitivity setting
            or is being overridden at the device level.
          enum:
            - override
            - global
          type: string
        sounding_mode:
          description: |-
            Indicates if this device can be used for sounding.

             Leafs & Extenders only
          enum:
            - allow
            - deny
          type: string
        sounding_mesh:
          description: >-
            Indicates if this device can be used for mesh link sounding.


            If set to deny the Node in question will refuse mesh sounding
            connections

             Nodes only
          enum:
            - allow
            - deny
          type: string
        mac:
          description: |-
            This is the MAC address of the client device.

             Leafs & Extenders only
          type: string
        sounding_status:
          description: Indicates if the device is currently actively sounding.
          type: boolean
        sounding_status_reason:
          description: >-
            The reason code related to the selection choice determined by
            leafblower
          enum:
            - N/A
            - NO_DATA
            - NOT_SOUNDED
            - PASS
            - NOT_PRESENT
            - SLEEPING
            - NOISY
            - BROKEN
          type: string
        sounding_status_score:
          description: 'The last score that leafblower assigned to this device.  '
          type: number
        sounding_warmup:
          description: >-
            Leafblower is currently determining the quality of the sounding
            state of the device.


            Please note that the sounding_score is not considered stable until
            this is false.
          type: boolean
          nullable: true
        links:
          description: Low-level information on active sounding links
          type: array
          items:
            $ref: '#/components/schemas/SoundingClientDeviceLinkStatus'
        sounding_history:
          description: Object containing per-link historical sounding state
          type: object
          nullable: true
          properties:
            '0':
              description: NOT_SOUNDED
              type: integer
            '1':
              description: PASS
              type: integer
            '2':
              description: NOT_PRESENT
              type: integer
            '3':
              description: SLEEPING
              type: integer
            '4':
              description: NOISY
              type: integer
            '5':
              description: BROKEN
              type: integer
            '-1':
              description: NO DATA
              type: integer
      x-tagGroup: Sounding v2
    SoundingClientStatus:
      title: SoundingClientStatus
      description: Status of all known devices.
      type: object
      properties:
        devices:
          type: array
          items:
            $ref: '#/components/schemas/SoundingClientDeviceStatus'
      x-tagGroup: Sounding v2
    SoundingClientDeviceConfig:
      title: SoundingClientDeviceConfig
      description: Sounding client configuration change. All fields are optional.
      type: object
      properties:
        mac:
          description: >-
            Mac address of the target device, either this or `id` must be
            provided.
          type: string
        id:
          description: >-
            Internal node_id of the target node, either this or `mac` must be
            provided.
          type: string
        friendly_name:
          description: >-
            Human readable name assigned to the Device or Node.  Maximum of 256
            characters, supporting letters, spaces, digits, with only the
            following special characters: `=`, `+`, `-`, `_`, `@`, `!`. Supports
            base64 encoding. Can also be an empty string.
          type: string
        location:
          description: >-
            Device location name assigned to the Device or Node. Maximum of 256
            characters, supporting letters, spaces, digits, with only the
            following special characters: `=`, `+`, `-`, `_`, `@`, `!`. Supports
            base64 encoding. Can also be an empty string. 
          type: string
        sensitivity_mode:
          description: >-
            Indicates whether the device is using the global sensitivity setting
            or is being overridden at the device level.
          enum:
            - override
            - global
          type: string
        sensitivity:
          description: >-
            Current sensitivity of the device


            Only valid when sensitivity_mode = override, otherwise an error will
            be returned.
          type: number
        sounding_mode:
          description: Controls if the device can be used for sounding.
          enum:
            - allow
            - deny
          type: string
        sounding_mesh:
          description: >-
            Applicable only to nodes. Controls if the node will accept or reject
            sounding on mesh links.
          enum:
            - allow
            - deny
          type: string
      example:
        mac: 22:33:44:ff:ee:dd
        friendly_name: name
        location: location
        sounding_mode: allow
      x-tagGroup: Sounding v2
    SoundingClientConfig:
      title: SoundingClientConfig
      description: Configure sounding of multiple clients.
      type: object
      required:
        - devices
      properties:
        devices:
          type: array
          items:
            $ref: '#/components/schemas/SoundingClientDeviceConfig'
      example:
        devices:
          - id: 0
            location: LocationA
          - mac: '00:11:22:33:44:55'
            sensitivity: 1
            sounding_mode: allow
      x-tagGroup: Sounding v2
    SoundingClientConfigReturn:
      type: object
      properties:
        status:
          description: |-
            0 failure

            1 full success

            2 some changes failed

            3 an IoT update was requested but network has not yet started up
          type: integer
        success:
          description: 1 if the operation was successful, 0 otherwise
          type: integer
        details:
          $ref: '#/components/schemas/WarningErrors'
          description: >-
            The list of warnings or errors that occurred during processing of
            this request.
      x-tagGroup: Sounding v2
    WarningErrors:
      title: Root Type for WarningErrors
      description: ''
      type: object
      properties:
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/WarningWarnings'
        errors:
          type: array
          items: {}
      example:
        warnings: []
        errors: []
      x-tagGroup: Sounding v2
    ValidationError:
      title: ValidationError
      description: >-
        Error messages that covers any failures in input validation for sounding
        configurations.
      type: object
      properties:
        error:
          description: Error Type
          type: string
        message:
          description: Reason for failure
          type: string
        statusCode:
          description: HTTP Status code for the given error.
          type: integer
        validation:
          description: object containing the items that failed validation.
          type: object
      example:
        error: Bad Request
        message: child `update` fails because [`update` must be one of [true, false]]
        statusCode: 400
        validation:
          keys: '[`update`]'
          source: query
      x-tagGroup: Sounding v2
    LinkSoundingState:
      title: LinkSoundingState
      description: Link sounding state
      enum:
        - NONE
        - ACTIVE
        - SNEAKY
      type: string
      x-tagGroup: DATA TYPES
    DeviceInfo:
      title: Root Type for DeviceInfo
      description: Device info record
      type: object
      properties:
        device_type:
          description: Human-readable identification string for this device
          type: string
        hostname:
          description: Device hostname (if available)
          type: string
        mac:
          description: Device MAC address
          type: string
        os:
          description: Operating System
          type: string
        name:
          description: Device name
          type: string
        category:
          description: Device category
          type: string
        brand:
          description: Brand name
          type: string
        model:
          description: Model name
          type: string
        modelNumber:
          description: Model number
          type: string
        ts:
          description: Timestamp of last identification
          type: number
      example:
        device_type: Google Streaming Dongle Chromecast
        hostname: Google-Home-Mini
        mac: f0:ef:86:63:03:73
      x-tagGroup: CORE INTERNAL
    MotionNetworkRadarNode:
      title: MotionNetworkRadarNode
      description: The high-level representation of a Radar Node
      required:
        - id
        - network_id
        - shard_id
        - deviceid
        - devicetype
        - token
      type: object
      properties:
        id:
          format: int64
          type: integer
        network_id:
          format: int64
          type: integer
        shard_id:
          format: int64
          type: integer
        created_at:
          format: float
          description: UTC timestamp
          type: number
        updated_at:
          format: float
          description: UTC timestamp
          type: number
        ap_bssid_2ghz:
          $ref: '#/components/schemas/MachineAddress'
        ap_bssid_5ghz:
          $ref: '#/components/schemas/MachineAddress'
        mesh_bssid:
          $ref: '#/components/schemas/MachineAddress'
        gateway_bssid:
          $ref: '#/components/schemas/MachineAddress'
        p2p_bssid:
          $ref: '#/components/schemas/MachineAddress'
        deviceid:
          description: IoT device name of Node
          type: string
        devicetype:
          description: IoT device type of Node
          type: string
        token:
          description: IoT access token
          type: string
        last_heard:
          format: float
          description: UTC timestamp
          type: number
        last_status:
          nullable: true
          description: Last node status (deprecated)
          type: object
        connection_status:
          enum:
            - OFFLINE
            - ONLINE
          type: string
        connection_report:
          $ref: '#/components/schemas/IoTConnectionStatus'
        meta:
          $ref: '#/components/schemas/NodeMetaConfig'
    ApplicationConfigurations:
      title: DebugLogReport
      description: Edge agent debug log message
      type: object
      properties:
        timezone:
          description: Timezone configuration
          type: string
        enabled:
          description: Sleep settings enasbled or desabled
          type: boolean
        sleep_hour:
          description: Sleep hour in sleep settings
          type: integer
        sleep_minute:
          description: Sleep minute in sleep settings
          type: integer
        wake_hour:
          description: Wake hour in sleep settings
          type: integer
        wake_minute:
          description: Wake minute in sleep settings
          type: integer
      x-tagGroup: CORE INTERNAL
    NodeMetaConfig:
      title: Root Type for NodeMetaConfig
      description: Additional meta-data attached to this radar node (friendly name, etc..)
      type: object
      additionalProperties:
        type: string
      example: {}
    POST_manage-execute_200:
      required:
        - success
      type: object
      properties:
        success:
          description: false if the command could not be executed
          type: boolean
        message:
          description: Reason for failure
          type: string
        status:
          description: New status of specified command
          type: integer
    POST_manage-batch_200:
      type: object
      properties:
        batch_id:
          description: Newly created batch_id
          type: integer
    ErrorMessage:
      title: Root Type for ErrorMessage
      description: ''
      type: object
      properties:
        error:
          description: Error message
          type: string
      example:
        error: something went wrong
    NotFoundMessage:
      title: Root Type for NotFoundMessage
      description: ''
      type: object
      properties:
        error:
          description: network not found
          type: string
      example:
        error: something went wrong
    SuccessMessage:
      type: object
      properties:
        status:
          description: ''
          type: integer
        success:
          description: ''
          type: integer
    InsightsSleepTimes:
      description: Sleep times (duration=1 format)
      type: array
      example:
        - avg_sleep_str: '00:58'
          avg_wake_str: '08:30'
          duration_avg_s: 27257
          duration_avg_str: 7h34m
          qry_days: 7
        - - duration_seconds: 33300
            duration_string: 9h15m
            house_day: 19945
            sleep_ToD: 5400
            sleep_ToD_str: '01:30'
            sleep_ts: 1723267800
            sleep_weight: 0.991444861
            wake_ToD: 38700
            wake_ToD_str: '10:45'
            wake_ts: 1723301100
            wake_weight: 0.751839807
          - duration_seconds: 29700
            duration_string: 8h15m
            house_day: 19946
            sleep_ToD: 6300
            sleep_ToD_str: '01:45'
            sleep_ts: 1723355100
            sleep_weight: 0.98078528
            wake_ToD: 36000
            wake_ToD_str: '10:00'
            wake_ts: 1723384800
            wake_weight: 0.866025404
          - duration_seconds: 24300
            duration_string: 6h45m
            house_day: 19947
            sleep_ToD: 4500
            sleep_ToD_str: '01:15'
            sleep_ts: 1723439700
            sleep_weight: 0.997858923
            wake_ToD: 28800
            wake_ToD_str: '08:00'
            wake_ts: 1723464000
            wake_weight: 1
          - duration_seconds: 25200
            duration_string: 7h00m
            house_day: 19948
            sleep_ToD: 2700
            sleep_ToD_str: '00:45'
            sleep_ts: 1723524300
            sleep_weight: 0.997858923
            wake_ToD: 27900
            wake_ToD_str: '07:45'
            wake_ts: 1723549500
            wake_weight: 0.997858923
          - duration_seconds: 24300
            duration_string: 6h45m
            house_day: 19949
            sleep_ToD: 3600
            sleep_ToD_str: '01:00'
            sleep_ts: 1723611600
            sleep_weight: 1
            wake_ToD: 27900
            wake_ToD_str: '07:45'
            wake_ts: 1723635900
            wake_weight: 0.997858923
          - duration_seconds: 24300
            duration_string: 6h45m
            house_day: 19950
            sleep_ToD: 3600
            sleep_ToD_str: '01:00'
            sleep_ts: 1723698000
            sleep_weight: 1
            wake_ToD: 27900
            wake_ToD_str: '07:45'
            wake_ts: 1723722300
            wake_weight: 0.997858923
          - duration_seconds: 29700
            duration_string: 8h15m
            house_day: 19951
            sleep_ToD: 84600
            sleep_ToD_str: '23:30'
            sleep_ts: 1723779000
            sleep_weight: 0
            wake_ToD: 27900
            wake_ToD_str: '07:45'
            wake_ts: 1723808700
            wake_weight: 0
    InsightsActivity:
      description: Daily Activity. [percent active,epoch unix timestamp]
      type: array
      example:
        - qry_days: 7.010416666666667
        - - - 0.28984953703703703
            - 1723262400
          - - 0.34396990740740735
            - 1723348800
          - - 0.4098263888888889
            - 1723435200
          - - 0.20531249999999998
            - 1723521600
          - - 0.19784722222222226
            - 1723608000
          - - 0.16393518518518516
            - 1723694400
          - - 0.1258564814814815
            - 1723780800
    InsightsV2SleepResponse:
      format: array
      items:
        type: object
        properties:
          hst_interruptions:
            description: >-
              Household Sleep Time (HST) interruptions indicates the number of
              interruptions that had occurred during the sleep time.
            type: integer
            example: 3
          sleep_time:
            description: >-
              The timestamp that indicates when the the household is considered
              to be asleep.
            type: string
            format: date-time
            example: '2025-03-19T22:00:00-04:00'
          wake_time:
            description: >-
              The timestamp that indicates when the household is considered to
              be awake.
            type: string
            format: date-time
            example: '2025-03-20T09:15:00-04:00'
          timezone:
            description: Timezone used by the sleep and wake times.
            type: string
            example: America/Toronto
          house_day:
            description: >-
              A counter that tracks the day that is specific to the WiFi
              Motion&trade; network.
            type: integer
            example: 20166
      example:
        - hst_interruptions: 3
          sleep_time: '2025-03-19T22:00:00-04:00'
          wake_time: '2025-03-20T09:15:00-04:00'
          timezone: America/Toronto
          house_day: 20166
        - hst_interruptions: 0
          sleep_time: '2025-03-20T22:00:00-04:00'
          wake_time: '2025-03-21T08:15:00-04:00'
          timezone: America/Toronto
          house_day: 20167
        - hst_interruptions: 0
          sleep_time: '2025-03-21T22:00:00-04:00'
          wake_time: '2025-03-22T09:00:00-04:00'
          timezone: America/Toronto
          house_day: 20168
        - hst_interruptions: 0
          sleep_time: '2025-03-22T22:30:00-04:00'
          wake_time: '2025-03-23T09:30:00-04:00'
          timezone: America/Toronto
          house_day: 20169
        - hst_interruptions: 0
          sleep_time: '2025-03-23T23:15:00-04:00'
          wake_time: '2025-03-24T07:30:00-04:00'
          timezone: America/Toronto
          house_day: 20170
    InsightsV2ActivityResponse:
      title: ''
      description: Activity Insights
      format: string
      type: array
      items:
        type: object
        properties:
          date:
            description: Date that the results are related to.
            type: string
          percent_active:
            description: Percentage of time that activity occurred within the sample.
            format: float
            type: number
          ts:
            description: Epoch timestamp.
            type: integer
      example:
        - date: '2025-03-19'
          percent_active: 0.10266202688217163
          ts: 1742356800
        - date: '2025-03-20'
          percent_active: 0.19775460163752237
          ts: 1742443200
        - date: '2025-03-21'
          percent_active: 0.21174768606821695
          ts: 1742529600
        - date: '2025-03-22'
          percent_active: 0.1452083388964335
          ts: 1742616000
    MotionEventPairResponse:
      description: ''
      type: object
      properties:
        pairs:
          description: Array of MotionDetectedEvent & MotionStoppedEvent pairs.
          type: array
          items:
            $ref: '#/components/schemas/MotionEventPair'
        status:
          description: >-
            Integer showing success code of pairing. `0` means complete failure,
            `1` means success, `2` means partial success. 
          type: number
        failures:
          description: Array of pairing failures.
          type: array
          items:
            $ref: '#/components/schemas/MotionEventPairFailure'
    MotionEventPairFailure:
      title: Root Type for MotionEventPairFailure
      description: ''
      type: object
      properties:
        _id:
          description: 'Event ID. '
          type: string
        event:
          description: Event name.
          type: string
        ts:
          format: double
          description: Timestamp of the event.
          type: number
        failed_reason:
          description: >-
            Reason for pairing failure. NOTE: failures are often caused by old
            firmware.
          type: string
      example:
        _id: 64de6bbde5b9e4001b6aafba
        event: MotionDetectedEvent
        ts: 1692298172.06
        failed_reason: '"mconf" must contain at least 1 items'
    UniversalAlertActions:
      title: Root Type for POST_universal_alerts_actions
      description: Alert action object
      required:
        - action
      type: object
      properties:
        action:
          description: Supported actions are `custom_event` `fcm_push`
          type: string
        user_ids:
          description: Array of user ids
          type: array
          items:
            type: integer
        payload:
          description: >-
            Payload to add to the action.


            `custom_event`

            Data in payload should match API input for MNS
            /network/{network_id}/events/create


            `fcm_push`

            Data in payload should match API input for FireBase push API
          type: object
    'null':
      description: ''
      type: object
    PATCH_universal-alert-object-inner:
      title: Root Type for PATCH_universal-alert-object-inner
      description: ''
      type: object
      properties:
        uuid:
          type: string
        enabled:
          type: boolean
      example:
        uuid: 93f3557e-734c-4bb9-8be3-53014c68642a
        enabled: true
    LeafblowerLinkStats:
      title: LeafblowerLinkStats
      type: object
      properties:
        leaf:
          type: object
          properties:
            mac:
              $ref: '#/components/schemas/MachineAddress'
            peer_type:
              description: >-
                the types of connected peer mac devices, 2 is client and 7 is
                mesh device
              type: string
            vht_capabilities:
              description: >-
                (Deprecated) VHT Capabilities information 32-bit field as
                defined in IEEE802.11-2017 section 9.4.2.158.2
              deprecated: true
              type: string
            ht_capabilities:
              description: >-
                (Deprecated) HT Capability Transmit Beamforming Capabilities
                32-bit field as defined in IEEE802.11-2017 section 9.4.2.56.6
              deprecated: true
              type: string
            if_name:
              description: Interface name
              type: string
            if_index:
              description: Indicates the interface that has last connected.
              type: integer
            hostname:
              description: Hostname of link endpoints (from DHCP)
              type: string
            ip:
              description: An IP Address may be required in certain situations.
              type: string
              nullable: true
        is_static:
          description: Link fixed vs mobile detection state
          enum:
            - UNKNOWN
            - MOBILE
            - STATIC_NEW
            - STATIC
          type: string
        radar_stats:
          type: object
          description: >-
            This field is only presented when the Guardian Config Debug Status
            is set to 1 (enabled).  This is useful when performing debugging
            because it saves the information from multiple access points rather
            than just a single one.
          properties:
            is_static:
              description: Link fixed vs mobile detection state
              enum:
                - UNKNOWN
                - MOBILE
                - STATIC_NEW
                - STATIC
              type: string
            ap:
              description: leafblower score per AP
              type: object
              additionalProperties:
                format: float
                type: number
            device:
              description: A unique identifier that identifies an Access Point (AP).
              type: string
            sounding:
              description: sounding decision that leafblower made
              type: boolean
              nullable: true
            ping:
              description: Whether or not, the device is being pinged
              type: boolean
            is_sneaky:
              description: (alpha) Whether or not, the device is being sneaky sounded
              type: boolean
              nullable: true
            oldest:
              description: >-
                how many leafblower cycle ago was the oldest sample captured,
                increments when the device is newly connected (warmup) or device
                is disconnected, stagnates at 72 when buffer is full
              type: integer
            states:
              description: >-
                dictionary-encoded histogram of all 72 states. keys are states,
                values are counts.
              type: object
              additionalProperties:
                format: float
                type: number
            age:
              description: >-
                how many leafblower cycles ago was the most recent sample
                captured, 1 means it is connected, increments per cycle as
                device is disconnected
              type: integer
            history:
              description: >-
                last 5 leafblower states [oldest.....newest] when the device is
                connected (age=1), otherwise ignore
              type: array
              items:
                type: integer
        is_sneaky:
          description: (alpha) Whether or not, the device is being sneaky sounded
          type: boolean
          nullable: true
        sounding:
          description: sounding decision that leafblower made
          type: boolean
          nullable: true
        ap:
          description: leafblower score per AP
          type: object
          additionalProperties:
            format: float
            type: number
        age:
          description: >-
            how many leafblower cycles ago was the most recent sample captured,
            1 means it is connected, increments per cycle as device is
            disconnected
          type: integer
        oldest:
          description: >-
            how many leafblower cycle ago was the oldest sample captured,
            increments when the device is newly connected (warmup) or device is
            disconnected, stagnates at 72 when buffer is full
          type: integer
        history:
          description: >-
            last 5 leafblower states [oldest.....newest] when the device is
            connected (age=1), otherwise ignore
          type: array
          items:
            type: integer
        states:
          description: >-
            dictionary-encoded histogram of all 72 states. keys are states,
            values are counts.
          type: object
          additionalProperties:
            format: float
            type: number
        ping:
          description: Whether or not, the device is being pinged
          type: boolean
        device:
          description: Indicates the Access Point that reported the listed information.
          type: string
      x-tagGroup: LeafblowerLinkStats
    RadarMeshPathEntry:
      title: RadarMeshPathEntry
      required:
        - target_mac
        - next_hop_mac
        - metric
        - expire_time
      type: object
      properties:
        expire_time:
          type: integer
        metric:
          type: integer
        next_hop_mac:
          $ref: '#/components/schemas/MachineAddress'
        target_mac:
          $ref: '#/components/schemas/MachineAddress'
      example:
        expire_time: -74458377
        metric: -48078158
        next_hop_mac: occaecat
        target_mac: esse enim
      x-tagGroup: EDGE INTERNAL
    RadarNetworkRoute:
      title: RadarNetworkRoute
      required:
        - dst
        - gateway
        - netmask
        - metric
      type: object
      properties:
        dst:
          description: Route destination IP
          default: ''
          type: string
        netmask:
          description: Destination Netmask
          type: string
        metric:
          description: Route metric
          type: string
        gateway:
          description: Route gateway IP
          type: string
      example:
        dst: aute nisi et
        netmask: sit voluptate
        gateway: Excepteur aliquip elit
        metric: -59305236
      x-tagGroup: EDGE INTERNAL
    ConnectionType:
      title: ConnectionType
      enum:
        - ETHERNET
        - WIFI_AP
        - WIFI_CLIENT
        - WIFI_MESH
        - WIFI_P2P_GO
        - WIFI_P2P_CLIENT
        - BRIDGE
      type: string
      x-tagGroup: DATA TYPES
    RadarNetworkInterface:
      title: RadarNetworkInterface
      required:
        - name
        - mac
        - type
      type: object
      properties:
        status:
          description: Connectivity status
          enum:
            - NoMedia
            - Disconnected
            - Established
            - Connected
          type: string
        mesh_paths:
          description: >-
            For type=WIFI_MESH this holds the mesh routing tables for this
            interface
          type: array
          items:
            $ref: '#/components/schemas/RadarMeshPathEntry'
        wifi_txpwr:
          description: WiFi transmit power (dBm)
          type: integer
        name:
          description: Local interface name
          type: string
        ifindex:
          description: >-
            uint32 number from the linux driver that is assigned by the kernel
            to keep track of socket instances
          type: integer
        ipv6:
          description: Local IPV6
          type: string
        bridge_id:
          type: string
        ip:
          description: Local IP
          type: string
        tx_bytes:
          description: TX bytes
          anyOf:
            - type: string
            - type: integer
        rx_bytes:
          description: RX bytes
          anyOf:
            - type: string
            - type: integer
        wifi_bw:
          description: WIFi bandwidth (mhz)
          type: integer
        mac:
          $ref: '#/components/schemas/MachineAddress'
        wifi_channel:
          description: WIFI primary 20 MHz channel number
          type: integer
          nullable: true
        wifi_phy:
          description: WIFI PHY
          type: string
        routes:
          type: array
          items:
            $ref: '#/components/schemas/RadarNetworkRoute'
        motion_enabled:
          type: boolean
        motion_capable:
          description: Indicates if the interface has sensing capabilities
          type: boolean
        type:
          $ref: '#/components/schemas/ConnectionType'
        wifi_ssid:
          description: WiFi SSID
          type: string
        bridge:
          type: string
      example:
        status: NoMedia
        mesh_paths:
          - expire_time: -1801651
            metric: 90041760
            next_hop_mac: f
            target_mac: esse amet nulla eiusmod
          - expire_time: 69043633
            metric: -61487094
            next_hop_mac: in
            target_mac: tempor
        wifi_txpwr: 18535595
        name: minim
        bridge_id: sunt
        ip: fugiat
        wifi_bw: -66349216
        mac: nisi cillum mollit magna voluptate
        wifi_channel: -1399905
        motion_enabled: false
        type: WIFI_CLIENT
        wifi_ssid: ut
      x-tagGroup: EDGE INTERNAL
    DHCPStats:
      title: DHCPStats
      type: object
      properties:
        ip:
          description: IP address of the dhcp client
          type: string
        hostname:
          description: Hostname of the dhcp client
          type: string
        expiry:
          description: DHCP lease expiry time
          type: string
        client_id:
          description: Client id sent by the dhcp client as specified in RFC 2131
          type: string
      x-tagGroup: DHCPStats
    LinkId:
      title: LinkId
      description: >-
        DST_MAC-SRC_MAC using 3 lsbs of each address and without the colons. Ex:
        001122-001133
      type: string
      x-tagGroup: DATA TYPES
    LocalConfig:
      title: LocalConfig
      description: >-
        Node and role-specific credentials and endpoints (provided by
        gatekeeper)
      type: object
      properties:
        guardian_mqtt:
          description: Guardian (master) MQTT endpoint information
          type: object
          properties:
            mqType:
              description: Device type
              default: guardian
              type: string
            network_id:
              description: MNS network_id
              type: integer
            mqToken:
              type: string
            guardian_id:
              description: MNS guardian_id (also MQTT login name)
              type: string
            mqPort:
              default: 1883
              type: integer
            mqServer:
              description: Primary  MQTT endpoint
              default: surmov.messaging.internetofthings.ibmcloud.com
              type: string
        radar_mqtt:
          description: Radar (slave) MQTT and ZMQ endpoint information
          type: object
          properties:
            mqType:
              description: Device type
              default: atheros-csi
              type: string
            mqPrefix:
              description: String pre-pended to all published topics
              type: string
            mqBackupServer:
              description: Secondary MQTT Server
              default: 158.85.80.187
              type: string
            mqDevice:
              description: Device ID
              type: string
            mqPort:
              default: 1883
              type: integer
            mqToken:
              type: string
            mqServer:
              description: Primary  MQTT endpoint
              default: surmov.messaging.internetofthings.ibmcloud.com
              type: string
      x-tagGroup: EDGE CONFIG
    WarningWarnings:
      title: Schema for Warnings found in Sounding Clients
      description: The warnings found within Sounding Client warnings.
      type: object
      properties:
        msg:
          type: string
          description: The message for the warning.
        id:
          type: string
          description: The ID of the error message.
      x-tagGroup: Sounding v2
    SoundingClientDeviceLinkStatus:
      title: SoundingClientDeviceLinkStatus
      description: Sounding client current status
      type: object
      properties:
        src_id:
          description: id of the node sounding this client
          type: integer
        rssi:
          description: Received Signal Strength on this link (dBm) from ifconfig
          type: string
        if_ch:
          description: WiFi Interface channel
          type: integer
          nullable: true
      x-tagGroup: Sounding v2
x-tagGroups:
  - name: API Endpoints
    tags:
      - Network Settings
      - Motion History
      - Live Motion
      - Events
      - Network Status
      - Network Meta
      - Location Data
      - Find
  - name: Advanced API Endpoints
    tags:
      - Config
      - Node
      - Gatekeeper
      - Management
      - Debug
      - Insights
      - Insights v2
      - Universal Alerting
      - Application Settings
