Hi All, I’m exploring the API and have it running ...
# fleet
Hi All, I’m exploring the API and have it running in Postman. All of the queries report exactly as described in the docs, except ‘List Queries’ ie.
GET /api/v1/fleet/queries
I’m actually receiving this response-
Copy code
  "queries": []
I’m not sure how to troubleshoot this, any hints please?
Hey Adam, are you using our postman collection? Or building your own? Do you have any queries?
using the imported collection from Fleet
💯 1
ah good question - I thought I did have queries!
😅 1
yes I do have the standard query pack and I’ve made a few new ones- so I should be able to ‘find by query ID’ let me try that
that does work. Perhaps I’ve just misunderstood the intent here, I’ll re-read the docs
Hmm let me try
Copy code
curl --location --request GET 'https://<host>/api/v1/fleet/queries' \
--header 'Authorization: Bearer <token>'
this is definitely returning queries for me
ah is your user's role observer?
yes, observer
queries that are Observers can run are returned
ah, got it- thanks so much for your help!
no problem
👍 1
if you hit that API as an admin you'd get back the full list
fantastic, that was the only odd thing I found, permissions issue makes sense. Now I’m off to figure out how to give my analytics software access to the DB safely!