{"id":20833164,"url":"https://github.com/unpoller/unifi","last_synced_at":"2026-05-09T16:22:31.963Z","repository":{"id":47069885,"uuid":"167286522","full_name":"unpoller/unifi","owner":"unpoller","description":"Go Library (w/ structures) to grab data from a Ubiquiti UniFi Controller","archived":false,"fork":false,"pushed_at":"2026-03-24T01:55:10.000Z","size":761,"stargazers_count":143,"open_issues_count":4,"forks_count":32,"subscribers_count":11,"default_branch":"master","last_synced_at":"2026-03-24T22:14:27.945Z","etag":null,"topics":["go-modules","go-unifi","unifi-api","unifi-controller","unifi-poller"],"latest_commit_sha":null,"homepage":"https://golift.io/discord","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unpoller.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-01-24T02:10:27.000Z","updated_at":"2026-03-24T01:53:00.000Z","dependencies_parsed_at":"2026-01-15T02:07:06.398Z","dependency_job_id":null,"html_url":"https://github.com/unpoller/unifi","commit_stats":null,"previous_names":["unifi-poller/unifi","golift/unifi"],"tags_count":71,"template":false,"template_full_name":null,"purl":"pkg:github/unpoller/unifi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unpoller%2Funifi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unpoller%2Funifi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unpoller%2Funifi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unpoller%2Funifi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unpoller","download_url":"https://codeload.github.com/unpoller/unifi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unpoller%2Funifi/sbom","scorecard":{"id":578971,"data":{"date":"2025-08-11","repo":{"name":"github.com/unpoller/unifi","commit":"07e924e3e100653e105ba05119366d95c0ab35a0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/unpoller/unifi/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/unpoller/unifi/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/unpoller/unifi/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/unpoller/unifi/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/unpoller/unifi/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/unpoller/unifi/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/unpoller/unifi/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/unpoller/unifi/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/stale.yaml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/unpoller/unifi/stale.yaml/master?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/build.yml:7","Warn: topLevel 'contents' permission set to 'write': .github/workflows/release.yml:10","Warn: topLevel 'packages' permission set to 'write': .github/workflows/release.yml:11","Warn: no topLevel permission defined: .github/workflows/stale.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:14"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T18:38:33.557Z","repository_id":47069885,"created_at":"2025-08-20T18:38:33.557Z","updated_at":"2025-08-20T18:38:33.557Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31305274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T09:48:21.550Z","status":"ssl_error","status_checked_at":"2026-04-02T09:48:19.196Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go-modules","go-unifi","unifi-api","unifi-controller","unifi-poller"],"created_at":"2024-11-18T00:14:30.524Z","updated_at":"2026-04-02T11:21:24.105Z","avatar_url":"https://github.com/unpoller.png","language":"Go","funding_links":[],"categories":["API Libraries"],"sub_categories":["Go"],"readme":"# Go Library: `unifi`\n\nIt connects to a Unifi Controller, given a url, username and password. Returns\nan authenticated http Client you may use to query the device for data. Also\ncontains some built-in methods for de-serializing common client and device\ndata. The data is provided in a large struct you can consume in your application.\n\nThis library is designed to PULL data FROM the controller. It has no methods that\nupdate settings or change things on the controller.\n[Someone expressed interest](https://github.com/unpoller/unifi/issues/31) in\nadding methods to update data, and I'm okay with that. I'll even help add them.\n[Tell me what you want to do](https://github.com/unpoller/unifi/issues/new), and we'll make it happen.\n\nPull requests, feature requests, code reviews and feedback are welcomed!\n\nHere's a working example:\n```golang\npackage main\n\nimport \"log\"\nimport \"github.com/unpoller/unifi/v5\"\n\nfunc main() {\n\tc := *unifi.Config{\n\t\tUser: \"admin\",\n\t\tPass: \"superSecret1234\",\n\t\tURL:  \"https://127.0.0.1:8443/\",\n\t\t// Log with log.Printf or make your own interface that accepts (msg, fmt)\n\t\tErrorLog: log.Printf,\n\t\tDebugLog: log.Printf,\n\t}\n\tuni, err := unifi.NewUnifi(c)\n\tif err != nil {\n\t\tlog.Fatalln(\"Error:\", err)\n\t}\n\n\tsites, err := uni.GetSites()\n\tif err != nil {\n\t\tlog.Fatalln(\"Error:\", err)\n\t}\n\tclients, err := uni.GetClients(sites)\n\tif err != nil {\n\t\tlog.Fatalln(\"Error:\", err)\n\t}\n\tdevices, err := uni.GetDevices(sites)\n\tif err != nil {\n\t\tlog.Fatalln(\"Error:\", err)\n\t}\n\n\tlog.Println(len(sites), \"Unifi Sites Found: \", sites)\n\tlog.Println(len(clients), \"Clients connected:\")\n\tfor i, client := range clients {\n\t\tlog.Println(i+1, client.ID, client.Hostname, client.IP, client.Name, client.LastSeen)\n\t}\n\n\tlog.Println(len(devices.USWs), \"Unifi Switches Found\")\n\tlog.Println(len(devices.USGs), \"Unifi Gateways Found\")\n\n\tlog.Println(len(devices.UAPs), \"Unifi Wireless APs Found:\")\n\tfor i, uap := range devices.UAPs {\n\t\tlog.Println(i+1, uap.Name, uap.IP)\n\t}\n}\n```\n\n## Endpoint discovery (`--discover`)\n\nThe `main` CLI (in `main/`) supports a **discover** mode that probes known API endpoints on your controller and writes a shareable report. Use the same credentials you use with unpoller (from your config file or env).\n\n**With a config file** (JSON with `url`, `user`, `pass`; optional `api_key`):\n\n```bash\ngo run ./main --discover --config /path/to/unifi-config.json --output api_endpoints_discovery.md\n```\n\n**With environment variables** (same as unpoller: `GOLIFT_UNIFI_URL`, `GOLIFT_UNIFI_USER`, `GOLIFT_UNIFI_PASS`):\n\n```bash\nexport GOLIFT_UNIFI_URL=https://192.168.1.1:8443\nexport GOLIFT_UNIFI_USER=admin\nexport GOLIFT_UNIFI_PASS=yourpassword\ngo run ./main --discover --output api_endpoints_discovery.md\n```\n\nThe report lists each endpoint and its HTTP status (200, 404, etc.). Share the generated file with maintainers when reporting API or 404 issues (e.g. [unpoller#935](https://github.com/unpoller/unpoller/issues/935)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funpoller%2Funifi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funpoller%2Funifi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funpoller%2Funifi/lists"}