{"id":17287744,"url":"https://github.com/mcuadros/go-octoprint","last_synced_at":"2025-04-14T11:31:46.885Z","repository":{"id":27044756,"uuid":"112258392","full_name":"mcuadros/go-octoprint","owner":"mcuadros","description":"Go library for accessing the OctoPrint's REST API","archived":false,"fork":false,"pushed_at":"2022-08-04T20:35:43.000Z","size":70,"stargazers_count":17,"open_issues_count":1,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T12:36:43.081Z","etag":null,"topics":["3d-printing","go","golang","octoprint","rest-api"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/mcuadros/go-octoprint","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/mcuadros.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":"2017-11-27T22:54:58.000Z","updated_at":"2023-03-15T09:25:14.000Z","dependencies_parsed_at":"2022-08-18T01:05:48.560Z","dependency_job_id":null,"html_url":"https://github.com/mcuadros/go-octoprint","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcuadros%2Fgo-octoprint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcuadros%2Fgo-octoprint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcuadros%2Fgo-octoprint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcuadros%2Fgo-octoprint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcuadros","download_url":"https://codeload.github.com/mcuadros/go-octoprint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248871843,"owners_count":21175302,"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","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":["3d-printing","go","golang","octoprint","rest-api"],"created_at":"2024-10-15T10:06:21.905Z","updated_at":"2025-04-14T11:31:46.859Z","avatar_url":"https://github.com/mcuadros.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"go-octoprint [![Build Status](https://travis-ci.org/mcuadros/go-octoprint.svg?branch=master)](https://travis-ci.org/mcuadros/go-octoprint) [![GoDoc](http://godoc.org/github.com/mcuadros/go-octoprint?status.svg)](http://godoc.org/github.com/mcuadros/go-octoprint)\n==============================\n\nGo library for accessing the [OctoPrint](http://octoprint.org/)'s [REST API](http://docs.octoprint.org/en/master/api/index.html).\n\nInstallation\n------------\n\nThe recommended way to install go-octoprint\n\n```\ngo get github.com/mcuadros/go-octoprint\n```\n\nExample\n-------\n\n### Retrieving the current connection state:\n\n```go\nclient, _ := NewClient(\"\u003coctoprint-url\u003e\", \"\u003capi-key\u003e\")\n\nr := octoprint.ConnectionRequest{}\ns, err := r.Do(client)\nif err != nil {\n  log.Error(\"error requesting connection state: %s\", err)\n}\n\nfmt.Printf(\"Connection State: %q\\n\", s.Current.State)\n```\n\n\n### Retrieving current temperature for bed and extruders:\n\n```go\nr := octoprint.StateRequest{}\ns, err := r.Do(c)\nif err != nil {\n\tlog.Error(\"error requesting state: %s\", err)\n}\n\nfmt.Println(\"Current Temperatures:\")\nfor tool, state := range s.Temperature.Current {\n\tfmt.Printf(\"- %s: %.1f°C / %.1f°C\\n\", tool, state.Actual, state.Target)\n}\n```\n\n## Implemented Methods\n\n### [Version Information](http://docs.octoprint.org/en/master/api/version.html)\n- [x] GET `/api/version`\n\n### [Apps](http://docs.octoprint.org/en/master/api/apps.html)\n- [ ] GET `/apps/auth`\n- [ ] POST `/apps/auth`\n\n### [Connection Operations](http://docs.octoprint.org/en/master/api/connection.html)\n- [x] GET `/api/connection`\n- [x] POST `/api/connection`\n\n### [File Operations](http://docs.octoprint.org/en/master/api/files.html)\n- [x] GET `/api/files\n- [x] GET `/api/files/\u003clocation\u003e`\n- [x] POST `/api/files/\u003clocation\u003e`\n- [x] GET `/api/files/\u003clocation\u003e/\u003cfilename\u003e`\n- [x] POST `/api/files/\u003clocation\u003e/\u003cpath\u003e` (Only select command)\n- [x] DELETE `/api/files/\u003clocation\u003e/\u003cpath\u003e`\n\n### [Job Operations](http://docs.octoprint.org/en/master/api/job.html)\n- [x] POST `/api/job`\n- [x] GET `/api/job`\n\n### [Languages](http://docs.octoprint.org/en/master/api/languages.html)\n- [ ] GET `/api/languages`\n- [ ] POST `/api/languages`\n- [ ] DELETE `/api/languages/\u003clocale\u003e/\u003cpack\u003e`\n\n### [Log file management](http://docs.octoprint.org/en/master/api/logs.html)\n- [ ] GET `/api/logs`\n- [ ] DELETE `/api/logs/\u003cfilename\u003e`\n\n### [Printer Operations](http://docs.octoprint.org/en/master/api/printer.html)\n- [x] GET `/api/printer`\n- [x] POST `/api/printer/printhead`\n- [x] POST `/api/printer/tool`\n- [x] GET `/api/printer/tool`\n- [x] POST `/api/printer/bed`\n- [x] GET `/api/printer/bed`\n- [x] POST `/api/printer/sd`\n- [x] GET `/api/printer/sd`\n- [x] POST `/api/printer/command`\n- [x] GET `/api/printer/command/custom` ([un-documented at REST API](https://github.com/foosel/OctoPrint/blob/7f5d03d0549bcbd26f40e7e4a3297ea5204fb1cc/src/octoprint/server/api/printer.py#L376))\n\n### [Printer profile operations](http://docs.octoprint.org/en/master/api/printerprofiles.html)\n- [ ] GET `/api/printerprofiles`\n- [ ] POST `/api/printerprofiles`\n- [ ] PATCH `/api/printerprofiles/\u003cprofile\u003e`\n- [ ] DELETE `/api/printerprofiles/\u003cprofile\u003e`\n\n### [Settings](http://docs.octoprint.org/en/master/api/settings.html)\n- [x] GET `/api/settings`\n- [ ] POST `/api/settings`\n- [ ] POST `/api/settings/apikey`\n\n### [Slicing](http://docs.octoprint.org/en/master/api/slicing.html)\n- [ ] GET `/api/slicing`\n- [ ] GET `/api/slicing/\u003cslicer\u003e/profiles`\n- [ ] GET `/api/slicing/\u003cslicer\u003e/profiles/\u003ckey\u003e`\n- [ ] PUT `/api/slicing/\u003cslicer\u003e/profiles/\u003ckey\u003e`\n- [ ] DELETE `/api/slicing/\u003cslicer\u003e/profiles/\u003ckey\u003e`\n\n### [System](http://docs.octoprint.org/en/master/api/system.html)\n- [x] GET `/api/system/commands`\n- [ ] GET `/api/system/commands/\u003csource\u003e`\n- [x] POST `/api/system/commands/\u003csource\u003e/\u003caction\u003e`\n\n### [Timelapse](http://docs.octoprint.org/en/master/api/timelapse.html)\n- [ ] GET `/api/timelapse`\n- [ ] DELETE `/api/timelapse/\u003cfilename\u003e`\n- [ ] POST `/api/timelapse/unrendered/\u003cname\u003e`\n- [ ] DELETE `/api/timelapse/unrendered/\u003cname\u003e`\n- [ ] POST `/api/timelapse`\n\n### [User](http://docs.octoprint.org/en/master/api/users.html)\n- [ ] GET `/api/users`\n- [ ] GET `/api/users/\u003cusername\u003e`\n- [ ] POST `/api/users`\n- [ ] PUT `/api/users/\u003cusername\u003e`\n- [ ] DELETE `/api/users/\u003cusername\u003e`\n- [ ] PUT `/api/users/\u003cusername\u003e/password`\n- [ ] GET `/api/users/\u003cusername\u003e/settings`\n- [ ] PATCH `/api/users/\u003cusername\u003e/settings`\n- [ ] POST `/api/users/\u003cusername\u003e/apikey`\n- [ ] DELETE `/api/users/\u003cusername\u003e/apikey`\n\n### [Util](http://docs.octoprint.org/en/master/api/util.html)\n- [ ] POST `/api/util/test`\n\n### [Wizard](http://docs.octoprint.org/en/master/api/wizard.html)\n- [ ] GET `/setup/wizard`\n- [ ] POST `/setup/wizard`\n\nLicense\n-------\n\nMIT, see [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcuadros%2Fgo-octoprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcuadros%2Fgo-octoprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcuadros%2Fgo-octoprint/lists"}