traccar-web icon indicating copy to clipboard operation
traccar-web copied to clipboard

incomplete data using webservice getUsers

Open jolypas opened this issue 7 years ago • 1 comments

hello I'm using restfull APi getUsers service without problem but I'm not getting all data expected from the "User" structure For example email address is not returned

What I got for each user is :

"id" : 47, "login" : "fanny", "admin" : false, "manager" : true, "userSettings" : { "id" : 53, "speedUnit" : "kilometersPerHour", "timePrintInterval" : 10, "followedDeviceZoomLevel" : 16, "zoomLevel" : 11, "centerLongitude" : 2.256793975834742, "centerLatitude" : 48.91398145739631, "mapType" : "GOOGLE_NORMAL", "maximizeOverviewMap" : false }, "readOnly" : false, "archive" : true, "expired" : false, "passwordHashMethod" : "MD5",

Any reason not to get all data ?

Thanks

jolypas avatar Jun 02 '17 14:06 jolypas

That's correct. Not all fields from User model are exposed through the API. There were no need to expose all of them. To show a field it must have getter/setter and there should be no @JsonIgnore annotation. You can easily change the User class and expose needed fields.

vitalidze avatar Jun 02 '17 18:06 vitalidze