fugue / fugue-client Goto Github PK
View Code? Open in Web Editor NEWCommand line client for the Fugue API
License: MIT License
Command line client for the Fugue API
License: MIT License
Instead of manual steps for adding and chmodding Fugue to Mac, creating a brew formula to install and update the CLI would greatly facilitate both installation and updating.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.