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

AccountGroups() using broken v1 API endpoint #17

Open
nullify005 opened this issue Sep 8, 2023 · 1 comment
Open

AccountGroups() using broken v1 API endpoint #17

nullify005 opened this issue Sep 8, 2023 · 1 comment

Comments

@nullify005
Copy link

Hi There,

When attempting to use the API in order to interact with AccountGroups the action fails with

2023/09/08 15:21:14 invalid character '<' looking for beginning of value

What I expect is to get a list returned of the account groups according to the spec https://help.apptio.com/en-us/cloudability/api/v3/account_group_entries.htm

Looking deeper at the client.go it appears to be dying on https://github.com/skyscrapr/cloudability-sdk-go/blob/v0.0.12/cloudability/client.go#L151 attempting to decode JSON which isn't.

Cause:

AccountGroups appears to be using a hardcoded? V1 API endpoint which is returning a bunch of HTML ultimately containing

      <div class="msg">
        <p>
          This login page is no longer supported. Please use ...

Sure enough if you hit up curl -v https://app.cloudability.com/api/1/account_groups -u <key> then you'll see the resulting page, whereas the V3 endpoint is just fine

Do you happen to have a branch where the V3 endpoints are setup for AccountGroups at all?
I can see the rest are pointing there?

If not then I can make a PR for it if you are willing

Regards, Lee

@skyscrapr
Copy link
Owner

hi @nullify005 happy you to raise a PR and I'll merge it. thanks for the effort

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

No branches or pull requests

2 participants