Git Product home page Git Product logo

fugue-client's People

Contributors

ameliafugue avatar becki-at-luminal avatar curtis-fugue avatar evan-fugue avatar gil-fugue avatar jason-fugue avatar jaspervdj-luminal avatar mattm-fugue avatar mike-luminal avatar ricleal-fugue avatar sam-fugue avatar wayne-luminal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fugue-client's Issues

fugue list events: event_type must be a valid JSON array

Client version: 0.12.0-f087d8bb

Trying to get baseline drifts events using fugue list events. It seems the event-type parameter is not passed as an array to the backend, which expects it to be one:

$ DEBUG=1 fugue list events e943432d-11eb-43bb-bc27-e1db868d14b4 --event-type DRIFT

GET /v0/events?environment_id=e943432d-11eb-43bb-bc27-e1db868d14b4&event_type=DRIFT&max_items=20&offset=0 HTTP/1.1
Host: api.riskmanager.fugue.co
User-Agent: Go-http-client/1.1
Accept: application/json

HTTP/2.0 400 Bad Request
Content-Length: 93
Content-Type: application/json
...

{"type":"InvalidParameterValue","message":"event_type must be a valid JSON array","code":400}
error: [GET /events][400] listEventsBadRequest  &{Code:400 Message:event_type must be a valid JSON array Type:InvalidParameterValue}

Adding additional values doesn't help:

$ DEBUG=1 fugue list events e943432d-11eb-43bb-bc27-e1db868d14b4 --event-type "DRIFT","COMPLIANCE"
GET /v0/events?environment_id=e943432d-11eb-43bb-bc27-e1db868d14b4&event_type=DRIFT&event_type=COMPLIANCE&max_items=20&offset=0 HTTP/1.1
Host: api.riskmanager.fugue.co
User-Agent: Go-http-client/1.1
Accept: application/json


HTTP/2.0 400 Bad Request
Content-Length: 93
Content-Type: application/json...

{"type":"InvalidParameterValue","message":"event_type must be a valid JSON array","code":400}
error: [GET /events][400] listEventsBadRequest  &{Code:400 Message:event_type must be a valid JSON array Type:InvalidParameterValue}

Performing the API request manually with curl and forcing event_type to be an array in query parameters seems to do the trick:

$ curl 'https://api.riskmanager.fugue.co/v0/events?environment_id=e943432d-11eb-43bb-bc27-e1db868d14b4&event_type[]=DRIFT&max_items=20&offset=0' -u "$FUGUE_API_ID:$FUGUE_API_SECRET -v

HTTP/2 200
content-type: application/json
content-length: 48632

Thank you
Christophe

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.