thatmattlove / hyperglass

hyperglass is the network looking glass that tries to make the internet better.
https://hyperglass.dev
BSD 3-Clause Clear License
645 stars 102 forks source link

API Query Type not found #290

Open hutchpe opened 1 month ago

hutchpe commented 1 month ago

Deployment Type

Docker

Version

v2.0.4

Steps to Reproduce

I am unable to execute a query via the API on both my own instance of Hyperglass as well as the demo instance at https://demo.hyperglass.dev/api/query. When attempting to send a ping query via the API, I receive the output "Query Type 'ping' not found.". I have tried "ping", "traceroute" and "bgp route" query types but get the same error.

JSON contents used for the query on the demo site: { "queryLocation": "new_york_ny", "queryTarget": [ "8.8.8.8" ], "queryType": "ping" }

Expected Behavior

I expect to see the output from the ping command.

Observed Behavior

See error message below image image

Configuration

No response

Devices

No response

Logs

No response

N0Ball commented 3 weeks ago

Hello, according to https://demo.hyperglass.dev, the query type of New York, NY is __hyperglass_juniper_ping__ (which is a default built-in command), instead of ping. You can try it with the curl command (or the GUI application)

curl -X POST -H "Content-Type: application/json" https://demo.hyperglass.dev/api/query --data '{"q
ueryLocation":"new_york_ny","queryTarget":["8.8.8.8"],"queryType":"__hyperglass_juniper_ping__"}'

this will work. Similarily traceroute is __hyperglass_juniper_traceroute__.