Hi All, I’m exploring the API and have it running ...
# fleet
a
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?
b
Hey Adam, are you using our postman collection? Or building your own? Do you have any queries?
a
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
b
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?
a
yes, observer
b
queries that are Observers can run are returned
a
ah, got it- thanks so much for your help!
b
no problem
👍 1
if you hit that API as an admin you'd get back the full list
a
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!