Giter VIP home page Giter VIP logo

Comments (12)

marostr avatar marostr commented on July 3, 2024

It looks like read API returns only "results" and "links" (there is no pagination info) in JSON response. I wrote to their support, will get back to you once they reply.

from honeybadger-api.

murraysum avatar murraysum commented on July 3, 2024

Hello @tolhaje.

I've just taken a look and you are correct that the Honeybadger Read API for the notices resource only returns results and links keys and there are no current_page or num_pages keys being returned anymore.

You can see this with the following snippet:

require "honeybadger-api"

access_token = "xxx"

Honeybadger::Api.configure do |c|
  c.access_token = access_token
end

project_id = "xxx"

fault_id = "xxx"

filters = {}
filters.merge!({ :page => 1 })
path = "projects/#{project_id}/faults/#{fault_id}/notices"
response = Honeybadger::Api.client.get(path, filters)

puts response.keys

I wonder if Honeybadger have introduced a breaking change as the other resources still have the old pagination keys. Can you let me know what their support say? I'll ping the honeybadger team here and see if they have any ideas? //cc @joshuap @starrhorne @stympy

from honeybadger-api.

marostr avatar marostr commented on July 3, 2024

What I heard from support: they deployed V2 API for testing, and some of its code snuck into the V1 namespace. They have deployed a fix, and it's working again. Thanks for your time!

from honeybadger-api.

murraysum avatar murraysum commented on July 3, 2024

@tolhaje No worries thanks for reporting and following up with their support 👍

from honeybadger-api.

stympy avatar stympy commented on July 3, 2024

Sorry for the breakage! V2 of the API (to be officially launched soon) will drop the current pagination links in favor of a links hash that will have next and prev attributes. These will be URLs you can use to get the next and previous page of results. Either or both of these may be omitted (if there is no next or previous page), and you may get a next link that, when loaded, actually has no results.

from honeybadger-api.

murraysum avatar murraysum commented on July 3, 2024

@stympy No worries, thanks for following up.

I wasn't aware that you were working on V2 of the API. Will V1 continue to work after V2 is released or will it have breaking changes?

It would good to have a list of changes that are planned so I can update the gem appropriately 👍

from honeybadger-api.

stympy avatar stympy commented on July 3, 2024

The plan is to release V2 in the next week or so, deprecating the V1 API, which will continue to work until August 1st. The changes aren't that drastic -- the biggest change is the pagination -- so updating the gem shouldn't require too much work. I'll definitely give you a heads up on the changes, and you're also welcome to go ahead and play with the new API if you like... it's available at https://app.honeybadger.io/v2/projects (authentication stays the same).

from honeybadger-api.

marostr avatar marostr commented on July 3, 2024

@murraysum me and @mat3k will be happy to help you with gem update, just give us a shout :)

from honeybadger-api.

stympy avatar stympy commented on July 3, 2024

V2 of our API is now live, and the announcement blog post is here: http://blog.honeybadger.io/version-2-of-our-read-api/

from honeybadger-api.

murraysum avatar murraysum commented on July 3, 2024

@tolhaje @mat3k I've now publish a v2.0.0 release which upgrades the gem to support v2 of the Honeybadger Read API. I've also added any missing attributes that are now present to any of the resources. Let me know if you happen to find any bugs or have any questions.

Thanks again to @stympy for answering some of questions when upgrading the gem.

Enjoy, cheers! 👍

from honeybadger-api.

mat3k avatar mat3k commented on July 3, 2024

@murraysum Thanks for releasing API V2 support. Does anything have to been done after updating to 2.0.0 ?

from honeybadger-api.

murraysum avatar murraysum commented on July 3, 2024

@mat3k There are several changes between v1 and v2 in the Honeybadger Read API which is summarised in the announcement blog post : http://blog.honeybadger.io/version-2-of-our-read-api/

The major things that you should be aware of when upgrading to 2.0.0 :

  • Removed support for Honeybadger::Api::Notice.find method as the API endpoint has been removed.
  • The environment, assignee, ignored, and resolved params are no longer supported by the faults list. These filters have been replaced by the q param, which uses the same search syntax that we use in our UI.
  • The notices, and deploys endpoints now use the new paging params of created_after and created_before rather than page

You can see all the changes : #20

from honeybadger-api.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.