#zincobserve

Troubleshooting Postman Request for ZincObserve

TLDR Juan experienced a "bad formarted" error using Postman with ZincObserve. vvv suggested checking headers and input. Prabhat advised using ZincSearch for non-log data.

Powered by Struct AI
šŸ¤” 1
10
3w
Solved
Join the chat
May 09, 2023 (3 weeks ago)
Juan
Photo of md5-4b9e24e8a61417b7f4e7553444c6b367
Juan
05:02 PM
Hello everyone, i'm tried to indexing information to my organization, but when i send the request post by postman, the api retunr to me an error 500 and the text bad formarted so i don't undertand anything.
Someone can tell me that i do wrong

Thank you so much
Image 1 for Hello everyone, i'm tried to indexing information to my organization, but when i send the request post by postman, the api retunr to me an error 500 and the text bad formarted so i don't undertand anything.<br>Someone can tell me that i do wrong<br><br>Thank you so muchImage 2 for Hello everyone, i'm tried to indexing information to my organization, but when i send the request post by postman, the api retunr to me an error 500 and the text bad formarted so i don't undertand anything.<br>Someone can tell me that i do wrong<br><br>Thank you so much
vvv
Photo of md5-d70e3e1ae67062469c9fea6f2a5357a3
vvv
05:22 PM
Hi Juan,
That gibberish in the response is indeed confusing. Maybe a look at the Headers can provide some clues on why you are seeing those bytes?
05:22
vvv
05:22 PM
I tried to send a similar POST request to my local ZincObserve server started with cargo run. This is what I got:
Image 1 for I tried to send a similar POST request to my local ZincObserve server started with <code>cargo run</code>. This is what I got:
05:25
vvv
05:25 PM
The injest API (/_json) expects an array of objects as its input.

After I changed the input accordingly, the request succeeded:
Image 1 for The injest API (<code>/_json</code>) expects an array of objects as its input.<br><br>After I changed the input accordingly, the request succeeded:
Juan
Photo of md5-4b9e24e8a61417b7f4e7553444c6b367
Juan
05:30 PM
Image 1 for
vvv
Photo of md5-d70e3e1ae67062469c9fea6f2a5357a3
vvv
05:31 PM
Code links:
• /_json API endpoint
• the line that fails — we can see here that ZincObserve tries to parse JSON input into a Vec. This fails unless the input is a JSON array.
Juan
Photo of md5-4b9e24e8a61417b7f4e7553444c6b367
Juan
05:32 PM
I tried to do what you did but it doesn't work
šŸ¤” 1
05:41
Juan
05:41 PM
Can you explain me how i can use ZincSearch in my local
Prabhat
Photo of md5-23052f31f8f3c4b1bb3297fbc3a2aec5
Prabhat
10:25 PM
Juan Looks like you are also trying to index non log data for indexing and search. Your use case appears to be suited for ZincSearch as opposed to that of ZincObserve. You should look at the documentation of ZincSearch instead - https://zincsearch-docs.zinc.dev/quickstart/