跳到主要内容

Using Node Sharing on RainMaker CLI

about

This guide explains how to use the ESP RainMaker CLI for managing node sharing between users. It allows a primary user to grant or revoke access to IoT devices, accept or decline sharing requests, and list shared nodes or pending requests. This functionality is essential for enabling multiple users to control and monitor the same devices securely. Special considerations are included for users who signed up with Apple’s “Hide My Email” feature, ensuring they use the correct auto-generated email for sharing operations.

  • To learn more about node sharing, click here.

Usage Guide

If you haven't already set up the CLI, please follow the steps here. Once installed, log into your account using the login command. Thereafter, use the sharing command to perform the operations. The CLI help should be self-explanatory.

~# python esp-rainmaker-cli sharing  -h
usage: esp-rainmaker-cli sharing [-h]
{add_user,remove_user,accept,decline,cancel,list_nodes,list_requests}
...

positional arguments:
{add_user,remove_user,accept,decline,cancel,list_nodes,list_requests}
add_user Request to add user for sharing the node(s)
remove_user Remove user from shared node(s)
accept Accept sharing request(s)
decline Decline sharing request(s)
cancel Cancel sharing request(s)
list_nodes List node(s) sharing details
list_requests List pending request(s)

optional arguments:
-h, --help show this help message and exit

User Login:
Current (logged-in) user must be a primary or secondary user to the node(s)
while performing the sharing operations
提示

Primary user can list the pending request(s) it has initiated, by using the --primary_user parameter.
This parameter enables the API flag, setting the user role to Primary user.

$ esp-rainmaker-cli sharing list_requests --primary_user
For User using Sign-up with Apple

If you have Signed Up using Apple and have chosen the "Hide My Email" option, please check the auto-generated email address under your profile in the iOS app, or by using the esp-rainmaker-cli getuserinfo CLI command. This email address will be of the form <unique-alphanumeric-string>@privaterelay.appleid.com. Use this email address in the node sharing add_user/remove_user commands.


More Info

To know more about the API for node sharing, you can refer to the documentation here.

On this page