API Array

RHA2 years ago

Hello,
How can I specify an array of device IDs in this call?
https://www.traccar.org/api-reference/#tag/Reports/paths/~1reports~1route/get
I specified as get parameter deviceId[]=x&deviceId[]=y and it doesn't work, then I specified in the body a JSON containing
{ deviceId: [x,y], ....} but it doesn't work too...
How can I do that? I'm using postman
Thank you

Anton Tananaev2 years ago

You need to specify multiple device id parameters, like this:

/api/...?deviceId=1&deviceId=2&...
RHA2 years ago

Ok thank you for your help!!!