Assign devices to user

idet27 years ago

Hi!
I would like to know if it's possible to register the devices via the admin account and then make these devices available to normal user accounts without having them to register the devices again.

I was looking around to find if this is possible either via individual devices or via groups but couldn't find any link.

Can you let me know if I can do it and how?

Best regards,

G.

Anton Tananaev7 years ago

Yes, it's possible. You can create devices as admin and then link them to users from Settings -> Users -> Devices menu.

idet27 years ago

I was there...and I 've tried to click the button on the left but I couldn't.
Same thing happened now only I did click on the "title" button instead of the square itself and immediately the device was selected.

The same thing was with groups!

Thanks for your time!

Anton Tananaev7 years ago

Are you using Firefox? There is a known problem in Firefox where you need to click outside of the checkbox.

Anyway, does everything work now?

idet27 years ago

Yes! I am on Firefox and yes everything seems to be working now!

Which browser do you recommend?

Best,

G.

Anton Tananaev7 years ago

I would recommend Chrome.

idet27 years ago

Excellent! Thank you!

sumanth7 years ago

Hi Anton,

It would be great to have a API call to link a device to a user in the 3.12 version.

Anton Tananaev7 years ago

Hmmm... such API has been available for a long long time, since the very first version of the API.

sumanth7 years ago

Thanks for the reply. Could you please help me in achieving this.

Anton Tananaev7 years ago
sumanth7 years ago

Thanks a lot

Howard6 years ago

Question about API to assign device to user
I use this and working good.
Post /permissions

{
    "userId": 171,
    "deviceID": 2,
    "groupId": null,
    "geofenceId": null,
    "calendarId": null,
    "attributeId": null,
    "driverId": null
}

I try to assign multiple devices, but no luck. is that possible?

{
    "userId": 171,
    "deviceID": [2,3],
    "groupId": null,
    "geofenceId": null,
    "calendarId": null,
    "attributeId": null,
    "driverId": null
}

error message: Can not deserialize instance of java.lang.Long out of START_ARRAY token

Thanks for great help!

Anton Tananaev6 years ago

You can't assign several devices are the same time. You need to send separate request for each.

Howard6 years ago

got it!! thanks Anton