ARTIK cloud services offer a feature called device sharing for scenarios in which limited or temporary access to an IoT device needs to be granted to a user. These scenarios might include families or office coworkers sharing smart appliances or lights, or an apartment subletter or car renter needing access to a smart lock.
This document describes how shares are created and revoked, and what types of access they grant to users.
Shared device privileges
You can share your devices with other users on ARTIK cloud services. You initiate this by sending an email invitation either via My ARTIK Cloud or using the API. This will create a device share with
An invitee must have an ARTIK Cloud account to accept an invitation. If they do not have an ARTIK Cloud account, they will be invited to create one. After the invitation is accepted, the share status will change to
Once a device is shared with another user, it appears in their ARTIK Cloud account. The user can:
- See the shared device in their device list.
- See data from the shared device.
- Send Actions to the shared device.
Users cannot share devices that have been shared with them.
A device that belongs to a private device type cannot be shared.
The below image shows how permissions are created when a device is shared from one user to another.
When a user accepts a device share, they gain
WRITE permissions over the shared device. The user could further grant an application
WRITE permissions over the corresponding device type, which would enable the application to access the shared device using the user token.
Shared device data
Users of shared devices can read and write the following data:
- Data messages. Data messages generated by the device after the share is accepted can be read as live data or historical data.
- Action messages. Actions can be sent from applications to shared devices. An Action payload includes the user ID of the device's owner.
See Post a message or Action in the API reference.
Revoke a device share
The same applies if you delete the shared device from your account. This would also cause
PENDING shares to be deleted. In either case, email notifications will be sent to users with
PENDING device shares.
Device sharing in My ARTIK Cloud
Device sharing is integrated into My ARTIK Cloud.
A "share" icon accompanies each device in your devices list. The UI also indicates devices that you have shared with other users, and devices that have been shared with you.
Clicking the icon opens a list of invitations with the current status of the invite. Here, you can enter email addresses to send new invitations. You can also resend pending invitations and manage your existing device shares.
Device sharing API reference
The Device Shares APIs allow you to manage device sharing programmatically. They are documented in our API reference.
- Get device shares
- Get a device share
- Create a device share
- Delete a device share
- Get a user's device shares
Device sharing is also incorporated into the following API calls.