whatisgithub

What is udm-pro-api-client?

jsumners/udm-pro-api-client — explained in plain English

Analysis updated 2026-08-03 · repo last pushed 2024-03-30

4GoAudience · ops devopsComplexity · 2/5DormantSetup · moderate

In one sentence

A Go library and command-line tool that talks to a Ubiquiti UDM Pro router to list connected devices, generate a hosts file for local DNS, and remotely restart managed devices like Wi-Fi access points.

Mindmap

mindmap
  root((repo))
    What it does
      Lists connected devices
      Generates hosts file
      Restarts managed devices
    Inputs
      Router address
      Login credentials
      Custom name-IP pairs
    Outputs
      Hosts file for DNS
      Device restart command
    Configuration
      YAML config file
      Environment variables
      Command-line flags
    Audience
      Network tinkerers
      Home-lab enthusiasts
      Small office IT staff

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Generate a hosts file from your router's connected devices and feed it to Dnsmasq for local DNS resolution by device name.

USE CASE 2

Remotely restart a managed Wi-Fi access point from the terminal without logging into the router's web interface.

USE CASE 3

Automate network documentation by pulling device lists programmatically into your own Go application.

USE CASE 4

Keep a local DNS hosts file in sync automatically whenever devices join or change on your network.

What is it built with?

GoYAMLDnsmasq

How does it compare?

jsumners/udm-pro-api-clientaeneasr/github-trendsbxcodec/go-simple-flatbuffer
Stars444
LanguageGoGoGo
Last pushed2024-03-302020-12-182017-06-09
MaintenanceDormantDormantDormant
Setup difficultymoderateeasyeasy
Complexity2/52/52/5
Audienceops devopspm founderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires access to a Ubiquiti UDM Pro router with known credentials and compatible UniFi OS firmware version.

No license information is provided in the repository, so usage rights are unclear and you should contact the author before using it.

So what is it?

The udm-pro-api-client is a tool for talking to a Ubiquiti UDM Pro router, the device that manages a home or small-office network. It lets you programmatically pull information about what's connected to your network and trigger actions like restarting a wireless access point, rather than clicking through the router's web interface every time. The project provides two things: a Go library (for developers who want to build this functionality into their own software) and a command-line tool (for anyone who just wants to run it from a terminal). The CLI currently supports two main actions. The first, get-hosts, retrieves a list of connected devices and generates a hosts file, a plain-text mapping of device names to IP addresses. This file can be fed into Dnsmasq, a common tool that handles local DNS resolution, so you can refer to devices by name instead of remembering IP addresses. The second action, device restart, lets you remotely restart a managed device like a Wi-Fi access point. Configuration is flexible: you can use a YAML file, environment variables, or command-line flags to specify the router's address and your login credentials. You can also add custom name-IP pairs for devices the router doesn't track itself, such as the router's own address. By default, the tool focuses on devices with manually assigned (static) IP addresses, which tends to be the more useful subset for tasks like generating a hosts file. This tool would appeal to network tinkerers, home-lab enthusiasts, or IT staff managing a small office who want to automate network documentation and maintenance. For example, someone running local DNS through Dnsmasq could use this to keep their hosts file in sync whenever devices join or change on the network, without manual updates. The README notes compatibility with specific UniFi OS and Network versions, so users would want to verify it works with their firmware.

Copy-paste prompts

Prompt 1
Write a bash script that runs udm-pro-api-client get-hosts, outputs the hosts file to /etc/dnsmasq.d/network-hosts.conf, and restarts Dnsmasq to apply the changes.
Prompt 2
Show me how to configure udm-pro-api-client using a YAML file with my UDM Pro router address, username, and password, including custom name-IP pairs for untracked devices.
Prompt 3
Write a cron job entry that runs udm-pro-api-client get-hosts every hour and saves the output to a Dnsmasq hosts file for local DNS resolution.
Prompt 4
Help me build a Go program that imports the udm-pro-api-client library to fetch connected devices and restart a specific access point by device ID.

Frequently asked questions

What is udm-pro-api-client?

A Go library and command-line tool that talks to a Ubiquiti UDM Pro router to list connected devices, generate a hosts file for local DNS, and remotely restart managed devices like Wi-Fi access points.

What language is udm-pro-api-client written in?

Mainly Go. The stack also includes Go, YAML, Dnsmasq.

Is udm-pro-api-client actively maintained?

Dormant — no commits in 2+ years (last push 2024-03-30).

What license does udm-pro-api-client use?

No license information is provided in the repository, so usage rights are unclear and you should contact the author before using it.

How hard is udm-pro-api-client to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is udm-pro-api-client for?

Mainly ops devops.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.