UniFi Developer APIs

website·Indexed 42 days ago

https://developer.ui.com

API specifications and Postman collections for UniFi services, including Network (v10.4.57), Protect (v7.3.56), Mobility (v1.0.0), InnerSpace (v1.3.23), Site Manager (v1.0.0), and Carrier/ISP Fabric Subscriber (v1.0.0) APIs.

Tokens
146.7K
Snippets
1K
Records
1.2K
Agent score
61%

What's inside UniFi

  1. Retrieve detailed information about a host by ID

    v1.0.0
    Use the GET /v1/hosts/:id endpoint to retrieve detailed information about a specific host. The request requires a unique host identifier as a path parameter. Note that the structure of the userData and reportedState fields in the response may vary depending on the UniFi OS or Network Server version (examples are based on UniFi OS 4.1.13).
    curl -X GET "{{baseUrl}}/v1/hosts/{id}" \
      -H "X-API-Key: <API Key>" \
      -H "Accept: application/json"
  2. Retrieve all fobs using the Protect API

    v7.3.56
    Use the GET /v1/fobs endpoint to retrieve detailed information about all fobs. The request requires a consoleId to proxy the request to the correct console.
    curl -X GET "{{baseUrl}}/v1/fobs?consoleId={{consoleId}}" \
         -H "Accept: application/json"
  3. Manage Live Views and Viewers in Protect (v7.3.56)

    v7.3.56

    Configure and retrieve information about viewers and live view layouts:

    • Viewers: GET /v1/viewers (list), GET /v1/viewers/{id} (details), PATCH /v1/viewers/{id} (update settings).
    • Live Views: GET /v1/liveviews (list), POST /v1/liveviews (create), GET /v1/liveviews/{id} (details), PATCH /v1/liveviews/{id} (update configuration).
  4. Retrieve detailed information about a specific relay

    v7.3.56
    Use the GET /v1/relays/:id endpoint to retrieve detailed information about a specific relay. This request requires the primary key of the relay as a path parameter. You can optionally provide a consoleId to proxy the request to a specific console.
    GET {{baseUrl}}/v1/relays/:id
    Accept: application/json
  5. Retrieve NVR details

    v7.3.56
    Get detailed information about the Network Video Recorder (NVR), including model key, name, type, MAC address, doorbell settings, and arm mode status. This request requires a consoleId to proxy the request to the correct console.
    # GET /v1/nvrs
    # Headers: Accept: application/json
    # Query Params: consoleId={{consoleId}}
  6. Understand the alarmHubMotionEvent schema

    v7.3.56
    The alarmHubMotionEvent is triggered when an alarm hub motion input is activated. It provides details about the specific pin channel, the status of the input, and the identity of the alarm hub.
    {
      "type": "alarmHubMotion",
      "start": 1741267544209,
      "end": 1741267554209,
      "device": "deviceId",
      "metadata": {
        "pin": { "text": "0" },
        "status": { "text": "alarm" },
        "deviceId": { "text": "69a83414037dec03e4009a3c" },
        "deviceName": { "text": "Front Door Sensor" }
      }
    }
  7. Retrieve all chimes in Protect API

    v7.3.56
    Get detailed information about all chimes by sending a GET request to the /v1/chimes endpoint. The request requires a consoleId variable to specify the console to proxy requests to.
    # Example Request
    GET {{baseUrl}}/v1/chimes?consoleId={{consoleId}}
    Header: Accept: application/json
  8. Retrieve all lights in Protect API

    v7.3.56
    Get detailed information about all lights associated with the system. The response returns an array of light objects containing state, GUID, MAC address, and current light settings.
    GET {{baseUrl}}/v1/lights?consoleId={{consoleId}}
    Accept: application/json
  9. Retrieve detailed information for a specific alarm hub

    v7.3.56
    Use the GET /v1/alarm-hubs/:id endpoint to retrieve detailed information about a specific alarm hub. The request requires the primary key of the linkStation as the id path parameter and uses the consoleId variable to proxy the request to the correct console.
    GET {{baseUrl}}/v1/alarm-hubs/:id
    Headers:
    Accept: application/json
    
    Query Parameters:
    consoleId: {{consoleId}}
  10. Retrieve all viewers

    v7.3.56
    Get detailed information about all viewers associated with the account by sending a GET request to the viewers endpoint. This request requires the Accept: application/json header.
    GET {{baseUrl}}/v1/viewers
    Accept: application/json