Get devices per user

Essam17 days ago

How can i get all devices per user through api.
I have tried to get list of devices via devices api, and send the userId as parameter. Some user i get some of their devices and some user return nothing. Once i logged in as user in traccar i see the user devices. But i need it via api

Anton Tananaev17 days ago

You can only get directly linked devices with this:

GET /api/devices?userId=X
Essam17 days ago

It not work as proper, i have user has 10 vehicles, the api gets only 5, i have another user has 5 the api gets nothing. The user get access via group of devices. May be i am doing somthing not comply with the api ?!

Anton Tananaev17 days ago

As I said, it will only show directly linked devices, not groups. So it does work properly, as designed. We don't have an API for what you want.