Override parent method...because we must return the request-data of THIS REST-API request!
The original method would return the request-data of the ORIGINAL called REST-API request

@param boolean $includeQueryParameters
@return array
555944
public function getRequestData($includeQueryParameters = true)
    {
        $requestData = array();
        if ($this->restApiRequestMethod == 'PUT' || $this->restApiRequestMethod == 'PATCH' || $this->restApiRequestMethod == 'POST') {
            $requestData = array_merge($this->restApiPostData, array(Defaults::$fullRequestDataName => $this->restApiPostData));
        }

        if ($includeQueryParameters === true) {
            return $requestData + $this->restApiGetData;
        }
        return $requestData;
    }
940406
public function getParents($includeSelf = false)
    {
        $parentsId = $this->getParentsId($includeSelf);
        $orderBy = [];
        foreach ( $parentsId as $id ) {
            $orderBy[] = "`$this->primaryKey` = $id DESC";
        }
        return call_user_func("$this->ownerClassName::find")
            ->where([
                $this->primaryKey => $parentsId,
            ])
            ->orderBy(implode(', ', $orderBy));
    }
1010561
final public function queryArrayValues(string $query, array $overrideTypes = [])
    {
        $recordset = $this->queryRecordset($query, '', [], $overrideTypes);
        if (false === $recordset) {
            return false;
        }

        $return = [];
        while (! $recordset->eof()) {
            $return[] = $recordset->values;
            $recordset->moveNext();
        }
        return $return;
    }
1082572
public function getIndexes( $includeParents = true )
    {

        // lazy load indexes
        if( !isset( $this->indexes ) ) {

            $this->indexes = $this->catalog->pgIndexes->findByIndrelid( $this->oid );

            // are we inheriting off another table
            if( $parent = $this->getParent() ) {

                foreach( $parent->getIndexes() as $parentIndex ) {

                    $data = $parentIndex->all();
                    $data['inherited'] = true;
                    $data['columns'] = [];

                    foreach( $parentIndex->indkey as $indkey ) {
                        $columns[] = sprintf( "%s.%s", $this->oid, $indkey );
                    }

                    $this->indexes->add(
                        new PgIndex( $this->catalog, $data )
                    );

                }

            }

        }

        // include parent indexes
        if( $includeParents ) {
            return $this->indexes->copy();
        } else {
            return $this->indexes->copy()->removeByInherited( true );
        }

    }
193399
protected function getIncluded(ElementInterface $element, $includeParent = false)
    {
        $included = [];

        foreach ($element->getResources() as $resource) {
            if ($resource->isIdentifier()) {
                continue;
            }

            if ($includeParent) {
                $included = $this->mergeResource($included, $resource);
            } else {
                $type = $resource->getType();
                $id = $resource->getId();
            }

            foreach ($resource->getUnfilteredRelationships() as $relationship) {
                $includedElement = $relationship->getData();

                if (! $includedElement instanceof ElementInterface) {
                    continue;
                }

                foreach ($this->getIncluded($includedElement, true) as $child) {
                    // If this resource is the same as the top-level "data"
                    // resource, then we don't want it to show up again in the
                    // "included" array.
                    if (! $includeParent && $child->getType() === $type && $child->getId() === $id) {
                        continue;
                    }

                    $included = $this->mergeResource($included, $child);
                }
            }
        }

        $flattened = [];

        array_walk_recursive($included, function ($a) use (&$flattened) {
            $flattened[] = $a;
        });

        return $flattened;
    }
116089
public function replaceQueryParameters($query, $parameters)
    {
        $i = 0;

        $result = preg_replace_callback(
            '/\?|(:[a-z0-9_]+)/i',
            function ($matches) use ($parameters, &$i) {
                $key = substr($matches[0], 1);
                if (!isset($parameters[$i]) && !isset($parameters[$key])) {
                    return $matches[0];
                }

                $value = isset($parameters[$i]) ? $parameters[$i] : $parameters[$key];
                $result = DoctrineExtension::escapeFunction($value);
                $i++;

                return $result;
            },
            $query
        );

        $result = \SqlFormatter::highlight($result);
        $result = str_replace(array("<pre ", "</pre>"), array("<span ", "</span>"), $result);

        return $result;
    }
1072629
public static function currentUrl($includeQuery = true, $includePath = true)
    {
        //	Are we SSL? Check for load balancer protocol as well...
        $_port =
            intval(array_get($_SERVER, 'HTTP_X_FORWARDED_PORT', array_get($_SERVER, 'SERVER_PORT', 80)));
        $_protocol = array_get($_SERVER,
                'HTTP_X_FORWARDED_PROTO',
                'http' . (array_get_bool($_SERVER, 'HTTPS') ? 's' : null)) . '://';
        $_host =
            array_get($_SERVER, 'HTTP_X_FORWARDED_HOST', array_get($_SERVER, 'HTTP_HOST', gethostname()));
        $_parts = parse_url($_protocol . $_host . array_get($_SERVER, 'REQUEST_URI'));

        if ((empty($_port) || !is_numeric($_port)) && null !== ($_parsePort = array_get($_parts, 'port'))) {
            $_port = @intval($_parsePort);
        }

        if (null !== ($_query = array_get($_parts, 'query'))) {
            $_query = static::urlSeparator($_query) . http_build_query(explode('&', $_query));
        }

        if (false !== strpos($_host,
                ':') || ($_protocol == 'https://' && $_port == 443) || ($_protocol == 'http://' && $_port == 80)
        ) {
            $_port = null;
        } else {
            $_port = ':' . $_port;
        }

        if (false !== strpos($_host, ':')) {
            $_port = null;
        }

        $_currentUrl =
            $_protocol . $_host . $_port . (true === $includePath ? array_get($_parts, 'path')
                : null) . (true === $includeQuery ? $_query : null);

        return $_currentUrl;
    }
706
private function visitParameters(Query $query, VisitorInterface $subVisitor): array
    {
        $parametersByLanguage = [
            $query->getLocale() => iterator_to_array(
                $this->visitTranslationParameters($query, $subVisitor)
            ),
        ];

        foreach ($query->getAvailableLocales() as $availableLocale) {
            if ($availableLocale === $query->getLocale()) {
                continue;
            }

            $translatedQuery = $this->collectionService->loadQuery(
                $query->getId(),
                [$availableLocale],
                false
            );

            $parametersByLanguage[$availableLocale] = iterator_to_array(
                $this->visitTranslationParameters(
                    $translatedQuery,
                    $subVisitor
                )
            );
        }

        ksort($parametersByLanguage);

        return $parametersByLanguage;
    }
98070
public function getQueryContext(): ?array
    {
        $queryContext = $this->getConfiguration()->getOption('query_context');
        if ($queryContext && $this->getConfiguration()->getOption('use_global_context')) {
            $queryContext = array_merge($this->getFamily()->getContext(), (array) $queryContext);
        }

        return $queryContext;
    }
63406
protected function hasValidQueryParams(JsonApiSerializer $serializer, Fields $fields, Included $included)
    {
        $this->validateFieldsQueryParams($serializer, $fields, 'Fields');
        $this->validateIncludeQueryParamsTypes($serializer, $included, 'Include');

        return empty($this->queryParamErrorBag);
    }
1114269
public function getExcludedQueryParameters($idSite)
    {
        $sitesManager = APISitesManager::getInstance();
        $site = $sitesManager->getSiteFromId($idSite);

        try {
            return SitesManager::getTrackerExcludedQueryParameters($site);
        } catch (Exception $e) {
            // an exception is thrown when the user has no view access.
            // do not throw the exception to the outside.
            return array();
        }
    }
322976
public function createQueryBuilderWithParentRoot($parent_id, $include_parent = true)
    {
        $query = $this->createQueryBuilder();
        return $this->alterQueryBuilderWithParentRoot($query, $parent_id, $include_parent);
    }
1339381
public function getQueryParametersArray() {
        $queryString = $this->getQueryString();

        if (strlen($queryString) == 0) return array();

        $splitQuery = explode("&", substr($queryString, 1));
        $returnedParams = array();
        foreach ($splitQuery as $param) {
            $splitParam = explode("=", $param);
            if (sizeof($splitParam) == 2) $returnedParams [$splitParam [0]] = $splitParam [1];
        }

        return $returnedParams;

    }
1173419
public function getAttributes( $includeParents = true )
    {
        if( !$this->columns ) {
            $this->columns = $this->catalog->pgAttributes->findByAttrelid( $this->oid )->sortByAttnum();
        }

        $output = $this->columns->copy();

        // include parents
        if( !$includeParents ) {
            $output->filter(
                function($attribute){
                    return !$attribute->isInherited();
                }
            );
        }

        return $output;
    }
48743
protected function getQueryParameters($isPost, $parameters)
    {
        $query = parent::getQueryParameters($isPost, $parameters);

        if (isset($parameters['file'])) {
            // Mautic's OAuth2 server does not recognize multipart forms so we have to append the access token as part of the URL
            $query['access_token'] = $parameters['access_token'];
        }

        return $query;
    }
1183927
public static function currentUrl( $includeQuery = true, $includePath = true )
    {
        //	Are we SSL? Check for load balancer protocol as well...
        $_port = intval( Option::get( $_SERVER, 'HTTP_X_FORWARDED_PORT', Option::get( $_SERVER, 'SERVER_PORT', 80 ) ) );
        $_protocol = Option::get( $_SERVER, 'HTTP_X_FORWARDED_PROTO', 'http' . ( Option::getBool( $_SERVER, 'HTTPS' ) ? 's' : null ) ) . '://';
        $_host = Option::get( $_SERVER, 'HTTP_X_FORWARDED_HOST', Option::get( $_SERVER, 'HTTP_HOST', gethostname() ) );
        $_parts = parse_url( $_protocol . $_host . Option::get( $_SERVER, 'REQUEST_URI' ) );

        if ( ( empty( $_port ) || !is_numeric( $_port ) ) && null !== ( $_parsePort = Option::get( $_parts, 'port' ) ) )
        {
            $_port = @intval( $_parsePort );
        }

        if ( null !== ( $_query = Option::get( $_parts, 'query' ) ) )
        {
            $_query = static::urlSeparator( $_query ) . http_build_query( explode( '&', $_query ) );
        }

        if ( false !== strpos( $_host, ':' ) || ( $_protocol == 'https://' && $_port == 443 ) || ( $_protocol == 'http://' && $_port == 80 ) )
        {
            $_port = null;
        }
        else
        {
            $_port = ':' . $_port;
        }

        if ( false !== strpos( $_host, ':' ) )
        {
            $_port = null;
        }

        $_currentUrl =
            $_protocol .
            $_host .
            $_port .
            ( true === $includePath ? Option::get( $_parts, 'path' ) : null ) .
            ( true === $includeQuery ? $_query : null );

        if ( \Kisma::get( 'debug.curl.current_url' ) )
        {
            Log::debug( 'Parsed current URL to be: ' . $_currentUrl, $_parts );
        }

        return $_currentUrl;
    }
885820
public function getDatatables($query,array $addColumns = [],array $editColumns = [],array $removeColumns = [])
    {
        $this->dataTables = Datatables::of($query);

        // add new urls
        $addUrls = array_has($addColumns, 'addUrls') ? array_pull($addColumns, 'addUrls') : [];
        $this->dataTables->addColumn('urls', function($model) use($addUrls)
        {
            // if addUrls variable is empty return
            if ( ! $addUrls) { return false; }

            $urls = $this->getDefaultUrls($model);
            foreach($addUrls as $key => $value) {
                $urls[$key] = $this->getUrl($value, $model);
            }
            return $urls;
        });

        // add, edit, remove columns
        $this->setColumns([ 'add' => $addColumns, 'edit' => $editColumns, 'remove' => $removeColumns ]);

        return $this->dataTables->addColumn('check_id', '{{ $id }}')->make(true);
    }