TLDR Alejandro needed help with API queries and hit limits. Prabhat suggested copying from the UI and increasing the `size` value for all hits.
Generally the easiest way to do is to fire the query in the UI and then copy it as curl and modify it. You can open the dev console either in Chrome or firefox
Perfect, worked, thanks Prabhat
Hi again Prabhat. A new question about API calls:
Is there a way to get the complete response, all the hits, when I do an API call?
Because this is working:
```curl '
The only way to get complete response is to give `size` a very large number
Ok, thanks Prabhat
What kind of dashboard that you are trying which you are not able to build directly in OpenObserve?
One with filtering. Remember that I opened a Github issue for that:
Alejandro
Sun, 24 Sep 2023 14:55:47 UTCHi everyone. A question to get events using the API. I'm doing this query with CURL: ```root@ubuntu:~# curl -X 'POST' '' -H 'accept: application/json' -H 'Authorization: Basic REDACTED' -H 'Content-Type: application/json' \
-d '{
"aggs": {
"histogram": "select histogram(_timestamp, '\''30 second'\'') AS zo_sql_key, count(*) AS zo_sql_num from query GROUP BY zo_sql_key ORDER BY zo_sql_key"
},
"query": {
"end_time": 1695541369000,
"from": 0,
"size": 10,
"sql": "SELECT * FROM dns",
"start_time": 1695537769000
}
}'```
The answer has no hits:
```{"took":10,"took_detail":{"total":15,"wait_queue":0,"cluster_total":14,"cluster_wait_queue":4},"hits":[],"total":0,"from":0,"size":10,"scan_size":0}```
I know for sure that I have logs for that period of time, so maybe I'm misunderstanding how to construct the API call to get the events after review the example on Swagger.
Anybody can tell me which is my error?
Thanks in advance for your help!