{"id":36851845,"url":"https://github.com/brightpuddle/goaci","last_synced_at":"2026-01-12T14:38:11.117Z","repository":{"id":57502130,"uuid":"182004846","full_name":"brightpuddle/goaci","owner":"brightpuddle","description":"Go client library for Cisco ACI","archived":false,"fork":false,"pushed_at":"2022-02-02T23:56:27.000Z","size":723,"stargazers_count":10,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-14T18:55:25.884Z","etag":null,"topics":["aci","cisco","cisco-aci","client-library","devops","go","golang","netops"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brightpuddle.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}},"created_at":"2019-04-18T02:50:07.000Z","updated_at":"2023-02-02T01:34:33.000Z","dependencies_parsed_at":"2022-09-13T08:01:38.499Z","dependency_job_id":null,"html_url":"https://github.com/brightpuddle/goaci","commit_stats":null,"previous_names":["brightpuddle/go-aci","brightpuddle/gaci"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/brightpuddle/goaci","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightpuddle%2Fgoaci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightpuddle%2Fgoaci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightpuddle%2Fgoaci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightpuddle%2Fgoaci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brightpuddle","download_url":"https://codeload.github.com/brightpuddle/goaci/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightpuddle%2Fgoaci/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["aci","cisco","cisco-aci","client-library","devops","go","golang","netops"],"created_at":"2026-01-12T14:38:11.019Z","updated_at":"2026-01-12T14:38:11.096Z","avatar_url":"https://github.com/brightpuddle.png","language":"Go","readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"logo.png\" width=\"600\" height=\"309\" border=\"0\" alt=\"goACI\"\u003e\n\u003cbr/\u003e\nACI client library for Go\n\u003cp\u003e\n\u003chr/\u003e\n\nGoACI is a Go client library for Cisco ACI. It features a simple, extensible API, [advanced JSON manipulation](#result-manipulation), and a [backup\nclient](#backup-client) for running queries against the backup file.\n\n# Getting Started\n\n## Installing\n\nTo start using GoACI, install Go and `go get`:\n\n`$ go get -u github.com/brightpuddle/goaci`\n\n## Basic Usage\n\n```go\npackage main\n\nimport \"github.com/brightpuddle/goaci\"\n\nfunc main() {\n    client, _ := goaci.NewClient(\"1.1.1.1\", \"user\", \"pwd\")\n    if err := client.Login(); err != nil {\n        panic(err)\n    }\n\n    res, _ = client.Get(\"/api/mo/uni/tn-infra\")\n    println(res.Get(\"imdata.0.*.attributes.name\"))\n}\n```\nThis will print:\n```\ninfra\n```\n\n### Result manipulation\n`goaci.Result` uses GJSON to simplify handling JSON results. See the [GJSON](https://github.com/tidwall/gjson) documentation for more detail.\n\n```go\nres, _ := GetClass(\"fvBD\")\nres.Get(\"0.fvBD.attributes.name\").Str // name of first BD\nres.Get(\"0.*.attributes.name\").Str // name of first BD (if you don't know the class)\n\nfor _, bd := range res.Array() {\n    println(res.Get(\"*.attributes|@pretty\")) // pretty print BD attributes\n}\n\nfor _, bd := range res.Get(\"#.fvBD.attributes\").Array() {\n    println(res.Get(\"@pretty\") // pretty print BD attributes\n}\n```\n\n### Helpers for common patterns\n```go\nres, _ := GetDn(\"uni/tn-infra\")\nres, _ := GetClass(\"fvTenant\")\n```\n\n### Query parameters\nPass the `goaci.Query` object to the `Get` request to add query paramters:\n\n```go\nqueryInfra := goaci.Query(\"query-target-filter\", `eq(fvTenant.name,\"infra\")`)\nres, _ := client.GetClass(\"fvTenant\", queryInfra)\n```\n\nPass as many paramters as needed:\n```go\nres, _ := client.GetClass(\"isisRoute\",\n    goaci.Query(\"rsp-subtree-include\", \"relations\"),\n    goaci.Query(\"query-target-filter\", `eq(isisRoute.pfx,\"10.66.0.1/32\")`,\n)\n```\n\n### POST data creation\n`goaci.Body` is a wrapper for [SJSON](https://github.com/tidwall/sjson). SJSON supports a path syntax simplifying JSON creation.\n\n```go\nexampleTenant := goaci.Body{}.Set(\"fvTenant.attributes.name\", \"goaci-example\").Str\nclient.Post(\"/api/mo/uni/tn-goaci-example\", exampleTenant)\n```\n\nThese can be chained:\n```go\ntenantA := goaci.Body{}.\n    Set(\"fvTenant.attributes.name\", \"goaci-example-a\").\n    Set(\"fvTenant.attributes.descr\", \"Example tenant A\")\n```\n\n...or nested:\n```go\nattrs := goaci.Body{}.\n    Set(\"name\", \"goaci-example-b\").\n    Set(\"descr\", \"Example tenant B\").\n    Str\ntenantB := goaaci.Body{}.SetRaw(\"fvTenant.attributes\", attrs).Str\n```\n\n### Token refresh\nToken refresh is handled automatically. The client keeps a timer and checks elapsed time on each request, refreshing the token every 8 minutes. This can be handled manually if desired:\n```go\nres, _ := client.Get(\"/api/...\", goaci.NoRefresh)\nclient.Refresh()\n```\n\n## Backup client\ngoACI also features a backup file client for querying ACI `.tar.gz` backup files. This client partially mirrors the API of the HTTP client. Note that this must be imported separately.\n\n```go\npackage main\n\nimport \"github.com/brightpuddle/goaci/backup\"\n\nfunc main() {\n    client, _ := backup.NewClient(\"config.tar.gz\")\n\n    res, _ := client.GetDn(\"uni/tn-infra\")\n    println(res.Get(\"@pretty\"))\n\n    res, _ = client.GetClass(\"fvBD\")\n    for _, bd := range res.Get(\"#.fvBD.attributes\").Array() {\n        fmt.Priintln(bd)\n    }\n\n}\n```\n\n## Documenatation and examples\nSee [here](https://github.com/brightpuddle/goaci/tree/master/examples) for various examples.\n\nAnd, the [documentation](https://godoc.org/github.com/brightpuddle/goaci) for more details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrightpuddle%2Fgoaci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrightpuddle%2Fgoaci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrightpuddle%2Fgoaci/lists"}