Traccar 4.12 API returns some error

Sharipov4 years ago

there will be no error if I report with a single device id

http://localhost:8082/api/reports/summary?type=allEvents&page=1&start=0&limit=25&from=2021-03-08T19:00:00.000Z&to=2021-03-09T19:00:00.000Z&deviceId=52&daily=false

an error occurs if I report with multiple device ids

http://localhost:8082/api/reports/summary?type=allEvents&page=1&start=0&limit=25&from=2021-03-08T19:00:00.000Z&to=2021-03-09T19:00:00.000Z&deviceId=52,49,44&daily=false

returns For input string: "52,49,44" - NumberFormatException (...)

Thanks so much for the answer

Anton Tananaev4 years ago

Your request is incorrect. Where did you get it from?

Sharipov4 years ago
Anton Tananaev4 years ago

I don't ready see this on that page:

deviceId=52,49,44

Can you please explain where you got that from?

Sharipov4 years ago

from my localhost

my client is written in NodeJs

Anton Tananaev4 years ago

Here's the right way to pass multiple devices:

deviceId=52&deviceId=49&deviceId=44
Sharipov4 years ago

Anton great thanks for the answer