static async getShortcuts (req, res) {
    // return nothing if we can't find the user
    const user = req.settingUser;
    if (!user) { return res.send({}); }

    const allRoles = await user.getRoles();
    const roles = [...allRoles.keys()]; // es requires an array for terms search

    const map = req.query.map && req.query.map === 'true';

    // only get shortcuts for setting user or shared
    const query = {
      query: {
        bool: {
          filter: [
            {
              bool: {
                should: [
                  { terms: { roles } }, // shared via user role
                  { terms: { editRoles: roles } }, // shared via edit role
                  { term: { users: req.settingUser.userId } }, // shared via userId
                  { term: { userId: req.settingUser.userId } } // created by this user
                ]
              }
            }
          ]
        }
      },
      sort: {},
      size: req.query.length || 50,
      from: req.query.start || 0
    };

    if (req.query.all && roles.includes('arkimeAdmin')) {
      query.query.bool.filter = []; // remove sharing restrictions
    }

    query.sort[req.query.sort || 'name'] = {
      order: req.query.desc === 'true' ? 'desc' : 'asc'
    };

    if (req.query.searchTerm) {
      query.query.bool.filter.push({
        wildcard: { name: '*' + req.query.searchTerm + '*' }
      });
    }

    // if fieldType exists, filter it
    if (req.query.fieldType) {
      const fieldType = internals.shortcutTypeMap[req.query.fieldType];

      if (fieldType) {
        query.query.bool.filter.push({
          exists: { field: fieldType }
        });
      }
    }

    const numQuery = { ...query };
    delete numQuery.sort;
    delete numQuery.size;
    delete numQuery.from;

    Promise.all([
      Db.searchShortcuts(query),
      Db.numberOfShortcuts(numQuery)
    ]).then(([{ body: { hits: shortcuts } }, { body: { count: total } }]) => {
      const results = { list: [], map: {} };
      for (const hit of shortcuts.hits) {
        const shortcut = hit._source;
        shortcut.id = hit._id;

        if (shortcut.number) {
          shortcut.type = 'number';
        } else if (shortcut.ip) {
          shortcut.type = 'ip';
        } else {
          shortcut.type = 'string';
        }

        const values = shortcut[shortcut.type];

        if (req.query.fieldFormat && req.query.fieldFormat === 'true') {
          const shortcutName = `$${shortcut.name}`;
          shortcut.exp = shortcutName;
          shortcut.dbField = shortcutName;
          shortcut.help = shortcut.description
            ? `${shortcut.description}: ${values.join(', ')}`
            : `${values.join(',')}`;
        }

        shortcut.value = values.join('\n');
        delete shortcut[shortcut.type];

        if ( // remove sensitive information for users this is shared with
        // (except creator, arkimeAdmin, and editors)
          user.userId !== shortcut.userId &&
          !user.hasRole('arkimeAdmin') &&
          !user.hasRole(shortcut.editRoles)) {
          delete shortcut.users;
          delete shortcut.roles;
          delete shortcut.editRoles;
        } else if (shortcut.users) {
          // client expects a string
          shortcut.users = shortcut.users.join(',');
        }

        if (map) {
          results.map[shortcut.id] = shortcut;
        } else {
          results.list.push(shortcut);
        }
      }

      const sendResults = map
        ? results.map
        : {
          data: results.list,
          recordsTotal: total,
          recordsFiltered: shortcuts.total
        };

      res.send(sendResults);
    }).catch((err) => {
      console.log(`ERROR - ${req.method} /api/shortcuts`, util.inspect(err, false, 50));
      return res.serverError(500, 'Error retrieving shortcuts - ' + err);
    });
  }
GET - /api/shortcuts

Retrieves a list of shortcuts.
@name /shortcuts
@param {string} map=false - Whether to return a list or a map. Default is list.
@param {string} sort=name - The field to sort the results by.
@param {string} desc=true - Whether to sort the results descending or ascending. Default is descending.
@param {string} searchTerm - The search text to filter the shortcut list by.
@param {number} length=50 - The number of items to return. Defaults to 50.
@param {number} start=0 - The entry to start at. Defaults to 0.
@param {string} fieldType - Filter the results by type (number, ip, or string).
@param {string} fieldFormat=false - Sends a help field with the shortcut with the description + the values of the shortcut.
@returns {Shortcut[]} data - The list of shortcut results.
@returns {number} recordsTotal - The total number of shortcut results stored.
@returns {number} recordsFiltered - The number of shortcut items returned in this result.