{"id":17617385,"url":"https://github.com/octopusdeploy/go-octopusdeploy","last_synced_at":"2026-02-19T03:06:23.661Z","repository":{"id":37049223,"uuid":"177737944","full_name":"OctopusDeploy/go-octopusdeploy","owner":"OctopusDeploy","description":"| Public |  Go API Client for Octopus Deploy :octopus:","archived":false,"fork":false,"pushed_at":"2026-02-10T01:19:55.000Z","size":6403,"stargazers_count":15,"open_issues_count":33,"forks_count":26,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-02-10T06:45:38.768Z","etag":null,"topics":["go","public"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"MattHodge/go-octopusdeploy","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OctopusDeploy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","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-03-26T07:40:36.000Z","updated_at":"2026-02-04T05:12:06.000Z","dependencies_parsed_at":"2023-10-23T00:26:00.383Z","dependency_job_id":"641101f5-40db-4bb6-9ee7-788dafbab8ed","html_url":"https://github.com/OctopusDeploy/go-octopusdeploy","commit_stats":{"total_commits":1196,"total_committers":41,"mean_commits":"29.170731707317074","dds":0.2976588628762542,"last_synced_commit":"b215307d53a0f4457272ce463fd7dca9271f6a4e"},"previous_names":[],"tags_count":248,"template":false,"template_full_name":null,"purl":"pkg:github/OctopusDeploy/go-octopusdeploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctopusDeploy%2Fgo-octopusdeploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctopusDeploy%2Fgo-octopusdeploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctopusDeploy%2Fgo-octopusdeploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctopusDeploy%2Fgo-octopusdeploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OctopusDeploy","download_url":"https://codeload.github.com/OctopusDeploy/go-octopusdeploy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctopusDeploy%2Fgo-octopusdeploy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29499815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T03:57:51.541Z","status":"ssl_error","status_checked_at":"2026-02-16T03:55:59.854Z","response_time":115,"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":["go","public"],"created_at":"2024-10-22T19:13:23.673Z","updated_at":"2026-02-16T04:05:18.742Z","avatar_url":"https://github.com/OctopusDeploy.png","language":"Go","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"go-octopusdeploy Logo\" src=\"https://user-images.githubusercontent.com/71493/133961475-fd4d769f-dc32-4723-a9bd-5529c5b12faf.png\" height=\"140\" /\u003e\n  \u003ch3 align=\"center\"\u003ego-octopusdeploy\u003c/h3\u003e\n  \u003cp align=\"center\"\u003eGo API Client for \u003ca href=\"https://octopus.com/\"\u003eOctopus Deploy\u003c/a\u003e 🐙\u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/OctopusDeploy/go-octopusdeploy/releases/latest\"\u003e\u003cimg alt=\"GitHub release\" src=\"https://img.shields.io/github/v/release/OctopusDeploy/go-octopusdeploy.svg?logo=github\u0026style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/OctopusDeploy/go-octopusdeploy\"\u003e\u003cimg alt=\"PkgGoDev\" src=\"https://pkg.go.dev/badge/github.com/OctopusDeploy/go-octopusdeploy\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/badge/github.com/OctopusDeploy/go-octopusdeploy\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/OctopusDeploy/go-octopusdeploy\" alt=\"Go Report\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n## Install\n\n```bash\ngo get \"github.com/OctopusDeploy/go-octopusdeploy/v2\"\n```\n\n## Usage\n\n```go\nimport \"github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/client\"\n```\n\nThe [Octopus REST API](https://octopus.com/docs/octopus-rest-api) is exposed through service fields of the client. An API key is required to communicate with the API (see [How to Create an API Key](https://octopus.com/docs/octopus-rest-api/how-to-create-an-api-key) for more information).\n\n```go\napiKey := \"API-YOUR_API_KEY\"\noctopusURL := \"https://your_octopus_url\"\nspaceID := \"space-id\" // can also be blank to assume the default space\n\napiURL, err := url.Parse(octopusURL)\nif err != nil {\n    _ = fmt.Errorf(\"error parsing URL for Octopus API: %v\", err)\n    return\n}\n\n// the first parameter for NewClient can accept a http.Client if you wish to\n// override the default; also, the spaceID may be an empty string (i.e. \"\") if\n// you wish to load the default space\noctopusClient, err := client.NewClient(nil, apiURL, apiKey, spaceID)\nif err != nil {\n    _ = fmt.Errorf(\"error creating API client: %v\", err)\n    return\n}\n```\n\nOnce the client has been initialized, APIs can be targeted through the model and services available:\n\n```go\nusernamePasswordAccount := accounts.NewUsernamePasswordAccount(name)\nusernamePasswordAccount.Username = username\n\ncreatedAccount, err := accounts.Add(octopusClient, usernamePasswordAccount)\nif err != nil {\n    _ = fmt.Errorf(\"error adding account: %v\", err)\n}\n```\n\nOperations like `Add`, `DeleteByID`, `GetByID`, and `Update` are supported by most services that are exposed through the client if not exposed in the package. These operations are configured at runtime since the Octopus REST API is hypermedia-driven.\n\nNumerous code samples that showcase the API and this client are available in the [examples](/examples) directory. There are also many [integration](/test) and unit tests available to examine that demonstrate the capabilities of this API client.\n\n## Testing\n\n### Running Tests Locally using Visual Studio Code\n\n\u003e [!CAUTION]\n\u003e The integration tests will create and delete resources on your instance. Use a dedicated instance to run tests\n\nTo run the tests against an instance of Octopus Deploy, create a `.env` file at the root directory of this repository\n\n```\nOCTOPUS_HOST=http://your-octopus-instance-url\nOCTOPUS_API_KEY=API-YOURAPIKEY\n```\n\nand add a Visual Studio Code workspace setting (`.vscode/settings.json`) for the test environment settings\n\n```\n{\n    \"go.testEnvFile\": \"${workspaceFolder}/.env\"\n}\n```\n\n## 🤝 Contributions\n\nContributions are welcome! :heart: Please read our [Contributing Guide](CONTRIBUTING.md) for information about how to get involved in this project.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctopusdeploy%2Fgo-octopusdeploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctopusdeploy%2Fgo-octopusdeploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctopusdeploy%2Fgo-octopusdeploy/lists"}