docs: function (req, res) {
          const space = req.query.space;
          const groupId = req.query.groupId;
          const geometry = req.query.geometry;
          const sections = server.state.get('sections');
          let sectionsToFetch = [];
          if (groupId) {
              if (!Utils.isNullOrEmpty(server.state.get('groups[' + groupId + ']'))) {
                  log.info('Fetching sections of group:', groupId);
                  const group = server.state.get('groups[' + groupId + ']').slice();
                  group.forEach(function (e) {
                      let i = parseInt(e, 10);
                      sectionsToFetch.push(i);
                  });
              }
          } else if (space) {
              log.info('Fetching sections of space:', space);
              let i = -1;
              let findSectionsBySpace = function (e, x) {
                  return x > i && !Utils.isNullOrEmpty(e) && !Utils.isNullOrEmpty(e.spaces[space]);
              };
              i = sections.findIndex(findSectionsBySpace);
              while (i !== -1) {
                  sectionsToFetch.push(i);
                  i = sections.findIndex(findSectionsBySpace);
              }
          } else {
              sections.forEach(function (e, i) {
                  if (!Utils.isNullOrEmpty(e)) {
                      sectionsToFetch.push(i);
                  }
              });
          }
          if (geometry) {
              const g = geometry.split(',');
              const r = { x: g[0], y: g[1], w: g[2], h: g[3] };
              if (g.length !== 4) {
                  log.warn('Ignoring invalid geometry:', r);
              } else {
                  log.info('Filtering list of sections using geometry:', r);
                  sectionsToFetch = sectionsToFetch.filter(function (i) {
                      const e = sections[i];
                      // Top-Left and Bottom-Right of section should be within the given range.
                      return (e.x >= r.x && e.y >= r.y && (e.x + e.w) <= (r.x + r.w) && (e.y + e.h) <= (r.y + r.h));
                  });
              }
          }
          let result = [];
          sectionsToFetch.forEach(function (i) {
              let s = sections[i];
              let section = { id: i, x: s.x, y: s.y, w: s.w, h: s.h, space: Object.keys(s.spaces)[0] };
              const app = s.app;
              if (app) {
                  section.app = { url: app.url, state: app.state, opacity: app.opacity };
              }
              result.push(section);
          });
          log.debug('Successfully read configuration for sections:', sectionsToFetch);
          Utils.sendMessage(res, HttpStatus.OK, JSON.stringify(result));
      }