assignExistingAdmin(admin_id, readonly = false, device_adopt = false, device_restart = false) {
    const payload = {cmd: 'grant-admin',
      admin: admin_id.trim(),
      role: 'admin'
    };

    if (readonly === true) {
      payload.role = 'readonly';
    }

    const permissions = [];
    if (device_adopt === true) {
      permissions.push('API_DEVICE_ADOPT');
    }

    if (device_restart === true) {
      permissions.push('API_DEVICE_RESTART');
    }

    payload.permissions = permissions;

    return this._request('/api/s/<SITE>/cmd/sitemgr', payload);
  }
/**
   * Assign an existing admin to the current site - assign_existing_admin()
   *
   * returns true on success
   * required parameter <admin_id>       = 24 char string; _id value of the admin user to assign, can be obtained using the
   *                                       list_all_admins() method/function
   * optional parameter <readonly>       = boolean, whether or not the new admin has readonly
   *                                       permissions, default value is false which gives the new admin
   *                                       Administrator permissions
   * optional parameter <device_adopt>   = boolean, whether or not the new admin has permissions to
   *                                       adopt devices, default value is false. With versions < 5.9.X this only applies
   *                                       when readonly is true.
   * optional parameter <device_restart> = boolean, whether or not the new admin has permissions to
   *                                       restart devices, default value is false. With versions < 5.9.X this only applies
   *                                       when readonly is true.
   */
Assign an existing admin to the current site - assign_existing_admin()
returns true on success
required parameter        = 24 char string; _id value of the admin user to assign, can be obtained using the
list_all_admins() method/function
optional parameter        = boolean, whether or not the new admin has readonly
permissions, default value is false which gives the new admin
Administrator permissions
optional parameter    = boolean, whether or not the new admin has permissions to
adopt devices, default value is false. With versions < 5.9.X this only applies
when readonly is true.
optional parameter  = boolean, whether or not the new admin has permissions to
restart devices, default value is false. With versions < 5.9.X this only applies
when readonly is true.
Assign an existing admin to the current site - assign_existing_admin () returns true on success required parameter = 24 char string ; _id value of the admin user to assign can be obtained using the list_all_admins () method / function optional parameter = boolean whether or not the new admin has readonly permissions default value is false which gives the new admin Administrator permissions optional parameter = boolean whether or not the new admin has permissions to adopt devices default value is false . With versions < 5 . 9 . X this only applies when readonly is true . optional parameter = boolean whether or not the new admin has permissions to restart devices default value is false . With versions < 5 . 9 . X this only applies when readonly is true .
assignExistingAdmin(admin_id, readonly = false, device_adopt = false, device_restart = false) {
    const payload = {cmd: 'grant-admin',
      admin: admin_id.trim(),
      role: 'admin'
    };
    if (readonly === true) {
      payload.role = 'readonly';
    }
    const permissions = [];
    if (device_adopt === true) {
      permissions.push('API_DEVICE_ADOPT');
    }
    if (device_restart === true) {
      permissions.push('API_DEVICE_RESTART');
    }
    payload.permissions = permissions;
    return this._request('/api/s/<SITE>/cmd/sitemgr', payload);
  }
assignExistingAdmin ( admin_id , readonly = false , device_adopt = false , device_restart = false ) { const payload = { cmd : 'grant-admin' , admin : admin_id . trim ( ) , role : 'admin' } ; if ( readonly === true ) { payload . role = 'readonly' ; } const permissions = [ ] ; if ( device_adopt === true ) { permissions . push ( 'API_DEVICE_ADOPT' ) ; } if ( device_restart === true ) { permissions . push ( 'API_DEVICE_RESTART' ) ; } payload . permissions = permissions ; return this . _request ( '/api/s/<SITE>/cmd/sitemgr' , payload ) ; }
Assign an existing admin to the current site - assign_existing_admin()
 returns true on success
 required parameter <admin_id>       = 24 char string; _id value of the admin user to assign, can be obtained using the
                                       list_all_admins() method/function
 optional parameter <readonly>       = boolean, whether or not the new admin has readonly
                                       permissions, default value is false which gives the new admin
                                       Administrator permissions
 optional parameter <device_adopt>   = boolean, whether or not the new admin has permissions to
                                       adopt devices, default value is false.
Assign an existing admin to the current site - assign_existing_admin () returns true on success required parameter <admin_id > = 24 char string ; _id value of the admin user to assign can be obtained using the list_all_admins () method / function optional parameter <readonly > = boolean whether or not the new admin has readonly permissions default value is false which gives the new admin Administrator permissions optional parameter <device_adopt > = boolean whether or not the new admin has permissions to adopt devices default value is false .