docs: function (req, res) {
          const space = req.query.space;
          const groupId = req.query.groupId;
          let sections = server.state.get('sections');
          if (groupId) {
              let deletedSections = [];
              if (!Utils.isNullOrEmpty(server.state.get('groups[' + groupId + ']'))) {
                  log.info('Deleting sections of group:', groupId);
                  const group = server.state.get('groups[' + groupId + ']').slice();
                  group.forEach(function (e) {
                      _deleteSectionById(e);
                      deletedSections.push(parseInt(e, 10));
                  });
              }
              log.info('Successfully deleted sections:', deletedSections);
              Utils.sendMessage(res, HttpStatus.OK, JSON.stringify({ ids: deletedSections }));
          } else if (space) {
              let findSectionsBySpace = function (e) {
                  return !Utils.isNullOrEmpty(e) && !Utils.isNullOrEmpty(e.spaces[space]);
              };
              log.info('Deleting sections of space:', space);
              let deletedSections = [];
              let i = sections.findIndex(findSectionsBySpace);
              while (i !== -1) {
                  _deleteSectionById(i);
                  deletedSections.push(parseInt(i, 10));
                  i = server.state.get('sections').findIndex(findSectionsBySpace);
              }
              log.info('Successfully deleted sections:', deletedSections);
              Utils.sendMessage(res, HttpStatus.OK, JSON.stringify({ ids: deletedSections }));
          } else {
              let appsToFlush = [];
              while (sections.length !== 0) {
                  let section = sections.pop();
                  if (section.app && section.app.url) {
                      log.debug('Flushing application at URL:', section.app.url);
                      appsToFlush.push(section.app.url);
                  }
              }
              appsToFlush = appsToFlush.filter(function (e, i) {
                  return appsToFlush.indexOf(e) === i;
              });
              while (appsToFlush.length !== 0) {
                  let appToFlush = appsToFlush.pop();
                  request.post(appToFlush + '/instances/flush', _handleRequestError);
              }
              server.state.set('sections', []);
              server.state.set('groups', []);
              server.wss.clients.forEach(function (c) {
                  if (c.readyState === Constants.WEBSOCKET_READY) {
                      c.safeSend(JSON.stringify({ appId: Constants.APP_NAME, message: { action: Constants.Action.DELETE } }));
                  }
              });
              log.info('Successfully deleted all sections');
              Utils.sendEmptySuccess(res);
          }
          log.debug('Existing sections (active/deleted):', server.state.get('sections').length);
          log.debug('Existing groups (active/deleted):', server.state.get('groups').length);
      }