static async apiUpdateView (req, res) {
    // make sure all the necessary data is included in the body
    if (!ArkimeUtil.isString(req.body.name)) {
      return res.serverError(403, 'Missing view name');
    }

    if (!ArkimeUtil.isString(req.body.expression)) {
      return res.serverError(403, 'Missing view expression');
    }

    const view = req.body;

    try {
      const { body: dbView } = await Db.getView(req.params.id);

      // sets the owner if it has changed
      if (!await User.setOwner(req, res, view, dbView._source, 'user')) {
        return;
      }

      // can't update the id
      if (view.id) { delete view.id; }

      // comma/newline separated value -> array of values
      let users = ArkimeUtil.commaOrNewlineStringToArray(view.users || '');
      users = await User.validateUserIds(users);
      view.users = users.validUsers;

      try {
        await Db.setView(req.params.id, view);
        const { body: { _source: newView } } = await Db.getView(req.params.id);
        newView.users = newView.users.join(',');
        newView.id = dbView._id;

        return res.send(JSON.stringify({
          view: newView,
          success: true,
          text: 'Updated view!',
          invalidUsers: ArkimeUtil.safeStr(users.invalidUsers)
        }));
      } catch (err) {
        console.log(`ERROR - ${req.method} /api/view/%s (setView)`, ArkimeUtil.sanitizeStr(req.params.id), util.inspect(err, false, 50));
        return res.serverError(500, 'Error updating view');
      }
    } catch (err) {
      console.log(`ERROR - ${req.method} /api/view/%s (getView)`, ArkimeUtil.sanitizeStr(req.params.id), util.inspect(err, false, 50));
      return res.serverError(500, 'Fetching view to update failed');
    }
  }
PUT - /api/view/:id

Updates an Arkime view.
@name /view/:id
@returns {boolean} success - Whether the update view operation was successful.
@returns {string} text - The success/error message to (optionally) display to the user.