Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service result struct missing links property #116

Open
CHuynh97 opened this issue Dec 2, 2022 · 0 comments · May be fixed by #117
Open

Service result struct missing links property #116

CHuynh97 opened this issue Dec 2, 2022 · 0 comments · May be fixed by #117

Comments

@CHuynh97
Copy link

CHuynh97 commented Dec 2, 2022

I notice the GET Service API is returning information we want to retrieve in our application that the current result struct does not retain. Ex:

curl -X GET 'https://api.opsgenie.com/v1/services/:service_id' \
    -H 'Authorization: GenieKey ...' \
    -H 'Content-Type: application/json' | json_pp
{
   "data" : {
      "description" : "test",
      "id" : "${service_id}",
      "isExternal" : false,
      "links" : {
         "api" : "...",
         "web" : "..."
      },
      "name" : "test",
      "tags" : [],
      "teamId" : "..."
   },
   "requestId" : "...",
   "took" : 0.005
}

In my application I'd like to retrieve links property but the result struct doesn't decode this.

Current workaround:

  • send requests to the API instead of using the sdk

Possible fix:

  • define a Links struct with the same properties api and web that can decode this json
  • Add the Links struct as a property to the Service struct such that GET service responses will decode this information correctly
@CHuynh97 CHuynh97 linked a pull request Dec 2, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant