public function matchApi($userId, $apiEndpoint, $typeVerification = false)
    {
        $groups = $this->getApiTable($userId, $apiEndpoint);

        if ($typeVerification === false || $typeVerification === self::CAN_VIEW) {
            return (count($groups) > 0) ? true : false;
        }

        foreach ($groups as $row) {
            if ($this->permissionVerify($typeVerification, $this->permissionWeight($row['crud_create'], $row['crud_update'], $row['crud_delete']))) {
                return true;
            }
        }

        return false;
    }