static function endpointHandler(RequestInterface $request) {
        $get_param = "workflow_key";
        $query_params = Util::getParamsFromRequest($request);

        if (isset($query_params[$get_param])) {
            // This is a script run request
            $result = self::runFromKey($query_params[$get_param]);
            return $result;
        } else {
            $workflows = DataStore::retrieveActiveWorkflows();
            $result = [];
            if ($workflows) {
                $url_path = $request->getUri()->getPath();
                foreach ($workflows as $flow) {
                    $flow_key = self::createWorkflowKeyFromConfig($flow);
                    $query_data = [
                        $get_param => $flow_key
                    ];
                    $result[] = Tasks::add($url_path, $query_data);
                }
                Tasks::flush();
            } else {
                syslog(LOG_WARNING, __METHOD__ . " could not find active workflows to schedule.");
            }
            return $result;
        }

    }