{"id":20074162,"url":"https://github.com/juniper/apstra-go-sdk","last_synced_at":"2025-10-07T09:53:34.844Z","repository":{"id":151043075,"uuid":"617117232","full_name":"Juniper/apstra-go-sdk","owner":"Juniper","description":"Go SDK for Apstra","archived":false,"fork":false,"pushed_at":"2025-09-26T20:58:38.000Z","size":3055,"stargazers_count":8,"open_issues_count":57,"forks_count":3,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-09-26T22:27:16.139Z","etag":null,"topics":[],"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/Juniper.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":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-21T18:25:40.000Z","updated_at":"2025-09-19T16:41:23.000Z","dependencies_parsed_at":"2024-01-05T00:56:02.371Z","dependency_job_id":"64d6d9c5-be94-4b96-9a41-e177c254efdd","html_url":"https://github.com/Juniper/apstra-go-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Juniper/apstra-go-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2Fapstra-go-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2Fapstra-go-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2Fapstra-go-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2Fapstra-go-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Juniper","download_url":"https://codeload.github.com/Juniper/apstra-go-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2Fapstra-go-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278755165,"owners_count":26040034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-13T14:49:38.326Z","updated_at":"2025-10-07T09:53:34.827Z","avatar_url":"https://github.com/Juniper.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apstra-go-sdk\n\nThis project aims to be a simple-to-consume client library for Apstra.\n\nIt was initially developed to collect metric/event/anomaly/statistics kinds of\nthings, but could eventually support the whole Apstra API.\n\nIt's only ever been tested against AOS 4.1.0, and 4.1.1, and will complain when\nasked to connect to unsupported versions of AOS.\n\nIt has three major features: Client, TwoStageL3ClosClient, and StreamTarget.\n\n### Client\nThe `Client{}` object has methods closely related to Apstra platform API\nendpoints, and returns data structures which closely resemble the JSON returned\nby the Apstra API.\n\n`Client` forces Apstra into \"full asynchronous\" mode by default to avoid issues\nrelated to \"optimistic\" object ID assignment, where we've got the new object's\nID before it's ready for use. A behind-the-scenes polling function keeps track\nof all outstanding tasks and returns final API results only when they're\ncomplete. It should be safe to run many client tasks concurrently.\n\nLogins are handled automatically.\n\n### TwoStageL3ClosClient\nThe `TwoStageL3ClosClient{}` object is intended for interaction with a single\n*blueprint* of the **Datacenter** reference design type. `TwoStageL3ClosClient`\nhas both a `Client` and a single blueprint ID embedded within.\n\n### StreamTarget\n\n`StreamTarget` is a listener/decoder for Apstra's \"Streaming Receiver\" feature.\n\nIt has Start/Stop (listening) methods and Register/Unregister methods which\nadd Streaming Receiver configurations via the Apstra API.\n\nMessages and Errors are returned to the consuming code via channels.\n\nThe proto file `streaming-telemetry.proto` came from an AOS server. The easiest way to grab\none is probably via the web UI:\n\nClick `platform -\u003e developers` then `Rest API Documentation`.\n\nScroll down to `streaming-telemetry-schema-proto`, click `GET`, `Try it out` and `Execute`\n\nRender the go code by running the following in the main project directory\n```shell\nprotoc --go_out=.      --go_opt=Mapstra/streaming-telemetry.proto=./apstra \\\n       apstra/streaming-telemetry.proto\n```\n\n### Using this library\n\n```go\npackage main\nimport \"github.com/Juniper/apstra-go-sdk\"\nfunc main() {\n  clientCfg := \u0026apstra.ClientCfg{\n\tUrl: \"https://apstra-hostname\",\n    User:      \"admin\",\n    Pass:      \"password\",\n    TlsConfig: \u0026tls.Config{InsecureSkipVerify: true},\n  }\n  client, _ := apstra.NewClient(clientCfg) //error ignored\n  blueprintIds, _ := client.GetAllBlueprintIds(context.TODO()) //error ignored\n}\n```\n\nThere's an example program at `cmd/example_streaming/main.go` which implements\nthe streaming capability.\n\n### Development\n\n1. Copy `pre-push` script to `.git/hooks` to run fast validations on `git push`;\n2. Use `make` targets to build, run tests or static analysis. This requires that\n   your environment has all the necessary tools, if not - use `ci.Dockerfile`\n   docker image.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuniper%2Fapstra-go-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuniper%2Fapstra-go-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuniper%2Fapstra-go-sdk/lists"}