{"id":23703691,"url":"https://github.com/opsgenie/opsgenie-go-sdk","last_synced_at":"2026-02-24T07:17:43.166Z","repository":{"id":29199859,"uuid":"32731144","full_name":"opsgenie/opsgenie-go-sdk","owner":"opsgenie","description":"OpsGenie Go SDK","archived":false,"fork":false,"pushed_at":"2021-03-05T05:16:15.000Z","size":277,"stargazers_count":24,"open_issues_count":5,"forks_count":25,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-08-23T03:48:53.510Z","etag":null,"topics":["go","opsgenie","sdk"],"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/opsgenie.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":null,"security":null,"support":null}},"created_at":"2015-03-23T12:35:00.000Z","updated_at":"2022-07-01T19:19:36.000Z","dependencies_parsed_at":"2022-08-17T19:55:07.598Z","dependency_job_id":null,"html_url":"https://github.com/opsgenie/opsgenie-go-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opsgenie/opsgenie-go-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsgenie%2Fopsgenie-go-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsgenie%2Fopsgenie-go-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsgenie%2Fopsgenie-go-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsgenie%2Fopsgenie-go-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opsgenie","download_url":"https://codeload.github.com/opsgenie/opsgenie-go-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsgenie%2Fopsgenie-go-sdk/sbom","scorecard":{"id":711118,"data":{"date":"2025-08-11","repo":{"name":"github.com/opsgenie/opsgenie-go-sdk","commit":"8fb766c7514b120ca4686c0ebbfbaab16c770c5a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"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":"Code-Review","score":1,"reason":"Found 3/20 approved changesets -- score normalized to 1","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":-1,"reason":"no workflows found","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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 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-22T08:13:42.533Z","repository_id":29199859,"created_at":"2025-08-22T08:13:42.533Z","updated_at":"2025-08-22T08:13:42.533Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29774557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T04:54:30.205Z","status":"ssl_error","status_checked_at":"2026-02-24T04:53:58.628Z","response_time":75,"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","opsgenie","sdk"],"created_at":"2024-12-30T13:07:28.019Z","updated_at":"2026-02-24T07:17:43.103Z","avatar_url":"https://github.com/opsgenie.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opsgenie-go-sdk\n\n\u003e ### opsgenie-go-sdk is deprecated and has no support, please use [opsgenie-go-sdk-v2](https://github.com/opsgenie/opsgenie-go-sdk-v2)\n\n## Aim and Scope\nOpsGenie GO SDK aims to access OpsGenie Web API through HTTP calls\nfrom a client application purely written in Go language.\n\nOpsGenie Go SDK covers *the Alert API*, *the Heartbeat API*,\n*the Integration API* and *the Policy API*. Future releases\nare subject to be delivered for packing more APIs soon.\n\n**Documentation:** [![](https://godoc.org/github.com/nathany/looper?status.svg)](http://godoc.org/github.com/opsgenie/opsgenie-go-sdk/client)\n\nFor more information about OpsGenie Go SDK, please refer to [OpsGenie Go API](https://www.opsgenie.com/docs/api-and-client-libraries/opsgenie-go-api) document.\n\n## Pre-requisites\n* The API is built using Go 1.4.2. Some features may not be\navailable or supported unless you have installed a relevant version of Go.\nPlease click [https://golang.org/dl/](https://golang.org/dl/) to download and\nget more information about installing Go on your computer.\n* Make sure you have properly set both `GOROOT` and `GOPATH`\nenvironment variables.\n\n* Before you can begin, you need to sign up [OpsGenie](http://www.opsgenie.com) if you\ndon't have a valid account yet. Create an API Integration and get your API key.\n\n## Installation\nTo download all packages in the repo with their dependencies, simply run\n\n`go get github.com/opsgenie/opsgenie-go-sdk/...`\n\n## Getting Started\nOne can start using OpsGenie Go SDK by initializing client and making a request. Example shown below demonstrates how to initialize an OpsGenie Alert client and make a create alert request.\n```go\npackage main\n\nimport (\n\t\"github.com/opsgenie/opsgenie-go-sdk/alertsv2\"\n\t\"fmt\"\n\t\"github.com/opsgenie/opsgenie-go-sdk/_samples/constants\"\n\togcli \"github.com/opsgenie/opsgenie-go-sdk/client\"\n)\n\nfunc main() {\n\tcli := new(ogcli.OpsGenieClient)\n\tcli.SetAPIKey(constants.APIKey)\n\n\talertCli, _ := cli.AlertV2()\n\n\tteams := []alertsv2.TeamRecipient{\n\t\t\u0026alertsv2.Team{Name: \"teamId\"},\n\t\t\u0026alertsv2.Team{ID: \"teamId\"},\n\t}\n\n\tvisibleTo := []alertsv2.Recipient{\n\t\t\u0026alertsv2.Team{ID: \"teamId\"},\n\t\t\u0026alertsv2.Team{Name: \"teamName\"},\n\t\t\u0026alertsv2.User{ID: \"userId\"},\n\t\t\u0026alertsv2.User{Username: \"user@opsgenie.com\"},\n\t}\n\n\trequest := alertsv2.CreateAlertRequest{\n\t\t\tMessage:     \"message\",\n\t\t\tAlias:       \"alias\",\n\t\t\tDescription: \"alert description\",\n\t\t\tTeams:       teams,\n\t\t\tVisibleTo:   visibleTo,\n\t\t\tActions:     []string{\"action1\", \"action2\"},\n\t\t\tTags:        []string{\"tag1\", \"tag2\"},\n\t\t\tDetails: map[string]string{\n\t\t\t\t\"key\":  \"value\",\n\t\t\t\t\"key2\": \"value2\",\n\t\t\t},\n\t\t\tEntity:   \"entity\",\n\t\t\tSource:   \"source\",\n\t\t\tPriority: alertsv2.P1,\n\t\t\tUser:     \"user@opsgenie.com\",\n\t\t\tNote:     \"alert note\",\n\t\t}\n\n\tresponse, err := alertCli.Create(request)\n\tif err != nil {\n\t\tfmt.Println(err.Error())\n\t} else {\n\t\tfmt.Println(\"Create request ID: \" + response.RequestID)\n\t}\n}\n    }\n```\nThere are many useful sample code snippets under `samples` directory for packages.\n\n## Handling Zero value problem with 'omitempty' option in Json\n\nEvery golang type has a [zero value](http://golang.org/ref/spec#The_zero_value).\nAddHeartbeat and UpdateHeartbeat requests have a boolean \"Enabled\" field to determine a heartbeat is enabled or disabled.\nenabled is not a mandatory field in both requests so, it has \"omitempty\" flag.\n\nWhen JSON is unmarshalling the requests, it omits the fields contains zero value of its type when this option is set.\n\nThe problem starts here:\nWhen you want to set the Enabled field as false, JSON does not unmarshal it because it contains boolean zero value and has option omitempty.\nThis problem occurs with strings; when you want to reset a heartbeat's description. To set heartbeat's description as empty string, you should make the request with Description :\"\".\nBut JSON does not unmarshal it either.\n\nSo, to solve this we followed go-github's solution as mentioned [here](https://willnorris.com/2014/05/go-rest-apis-and-pointers).\nWe used pointers just for booleans, if you want to set a string's value to empty. please use \" \", or \"-\" as new string value.\n\n## The Web API\n\nPlease follow the links below for more information and details\nabout the REST API.\n\n* [Alert API](https://www.opsgenie.com/docs/rest-api/alert-api)\n* [Heartbeat API](https://www.opsgenie.com/docs/rest-api/heartbeat-api)\n* [Integration API](https://www.opsgenie.com/docs/rest-api/integration-api)\n* [Policy API](hhttps://www.opsgenie.com/docs/rest-api/policy-api)\n\n\n## Bug Reporting and Feature Requests\n\nIf you like to report a bug, or a feature request; please open an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopsgenie%2Fopsgenie-go-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopsgenie%2Fopsgenie-go-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopsgenie%2Fopsgenie-go-sdk/lists"}