Cloudera Documentation

Streaming SQL Engine API

FlinkSessionClusterOperations

ensureFlinkSession

ensureFlinkSession

Ensures the Flink session exists and returns session properties.


/api/v1/flink/session-cluster

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"http://mgergely-1.vpc.cloudera.com:18121//api/v1/flink/session-cluster"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlinkSessionClusterOperationsApi;

import java.io.File;
import java.util.*;

public class FlinkSessionClusterOperationsApiExample {

    public static void main(String[] args) {
        
        FlinkSessionClusterOperationsApi apiInstance = new FlinkSessionClusterOperationsApi();
        String username = username_example; // String | 
        try {
            FlinkStatusDto result = apiInstance.ensureFlinkSession(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlinkSessionClusterOperationsApi#ensureFlinkSession");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlinkSessionClusterOperationsApi;

public class FlinkSessionClusterOperationsApiExample {

    public static void main(String[] args) {
        FlinkSessionClusterOperationsApi apiInstance = new FlinkSessionClusterOperationsApi();
        String username = username_example; // String | 
        try {
            FlinkStatusDto result = apiInstance.ensureFlinkSession(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlinkSessionClusterOperationsApi#ensureFlinkSession");
            e.printStackTrace();
        }
    }
}
String *username = username_example; //  (optional)

FlinkSessionClusterOperationsApi *apiInstance = [[FlinkSessionClusterOperationsApi alloc] init];

// ensureFlinkSession
[apiInstance ensureFlinkSessionWith:username
              completionHandler: ^(FlinkStatusDto output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');

var api = new StreamingSqlEngineApi.FlinkSessionClusterOperationsApi()
var opts = { 
  'username': username_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.ensureFlinkSession(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class ensureFlinkSessionExample
    {
        public void main()
        {

            var apiInstance = new FlinkSessionClusterOperationsApi();
            var username = username_example;  // String |  (optional) 

            try
            {
                // ensureFlinkSession
                FlinkStatusDto result = apiInstance.ensureFlinkSession(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlinkSessionClusterOperationsApi.ensureFlinkSession: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiFlinkSessionClusterOperationsApi();
$username = username_example; // String | 

try {
    $result = $api_instance->ensureFlinkSession($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlinkSessionClusterOperationsApi->ensureFlinkSession: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlinkSessionClusterOperationsApi;

my $api_instance = WWW::SwaggerClient::FlinkSessionClusterOperationsApi->new();
my $username = username_example; # String | 

eval { 
    my $result = $api_instance->ensureFlinkSession(username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlinkSessionClusterOperationsApi->ensureFlinkSession: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.FlinkSessionClusterOperationsApi()
username = username_example # String |  (optional)

try: 
    # ensureFlinkSession
    api_response = api_instance.ensure_flink_session(username=username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlinkSessionClusterOperationsApi->ensureFlinkSession: %s\n" % e)

Parameters

Header parameters
Name Description
Username
String

Responses

Status: 404 - User not found.

Status: 500 - Unexpected server error.

Status: 200 - Session exists, properties returned successfully.


getFlinkSessionByUser

getFlinkSessionByUser

Returns Flink session properties.


/api/v1/flink/session-cluster

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"http://mgergely-1.vpc.cloudera.com:18121//api/v1/flink/session-cluster"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlinkSessionClusterOperationsApi;

import java.io.File;
import java.util.*;

public class FlinkSessionClusterOperationsApiExample {

    public static void main(String[] args) {
        
        FlinkSessionClusterOperationsApi apiInstance = new FlinkSessionClusterOperationsApi();
        String username = username_example; // String | 
        try {
            FlinkYarnSession result = apiInstance.getFlinkSessionByUser(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlinkSessionClusterOperationsApi#getFlinkSessionByUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlinkSessionClusterOperationsApi;

public class FlinkSessionClusterOperationsApiExample {

    public static void main(String[] args) {
        FlinkSessionClusterOperationsApi apiInstance = new FlinkSessionClusterOperationsApi();
        String username = username_example; // String | 
        try {
            FlinkYarnSession result = apiInstance.getFlinkSessionByUser(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlinkSessionClusterOperationsApi#getFlinkSessionByUser");
            e.printStackTrace();
        }
    }
}
String *username = username_example; //  (optional)

FlinkSessionClusterOperationsApi *apiInstance = [[FlinkSessionClusterOperationsApi alloc] init];

// getFlinkSessionByUser
[apiInstance getFlinkSessionByUserWith:username
              completionHandler: ^(FlinkYarnSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');

var api = new StreamingSqlEngineApi.FlinkSessionClusterOperationsApi()
var opts = { 
  'username': username_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFlinkSessionByUser(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFlinkSessionByUserExample
    {
        public void main()
        {

            var apiInstance = new FlinkSessionClusterOperationsApi();
            var username = username_example;  // String |  (optional) 

            try
            {
                // getFlinkSessionByUser
                FlinkYarnSession result = apiInstance.getFlinkSessionByUser(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlinkSessionClusterOperationsApi.getFlinkSessionByUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiFlinkSessionClusterOperationsApi();
$username = username_example; // String | 

try {
    $result = $api_instance->getFlinkSessionByUser($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlinkSessionClusterOperationsApi->getFlinkSessionByUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlinkSessionClusterOperationsApi;

my $api_instance = WWW::SwaggerClient::FlinkSessionClusterOperationsApi->new();
my $username = username_example; # String | 

eval { 
    my $result = $api_instance->getFlinkSessionByUser(username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlinkSessionClusterOperationsApi->getFlinkSessionByUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.FlinkSessionClusterOperationsApi()
username = username_example # String |  (optional)

try: 
    # getFlinkSessionByUser
    api_response = api_instance.get_flink_session_by_user(username=username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlinkSessionClusterOperationsApi->getFlinkSessionByUser: %s\n" % e)

Parameters

Header parameters
Name Description
Username
String

Responses

Status: 500 - Unexpected server error.

Status: 200 - Session properties returned successfully.

Status: 404 - User or session not found.


JobOperations

getJobState

getJobState

Retrieves state of a given job.


/api/v1/ssb/jobs/{jobName}/state

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"http://mgergely-1.vpc.cloudera.com:18121//api/v1/ssb/jobs/{jobName}/state"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.JobOperationsApi;

import java.io.File;
import java.util.*;

public class JobOperationsApiExample {

    public static void main(String[] args) {
        
        JobOperationsApi apiInstance = new JobOperationsApi();
        String jobName = jobName_example; // String | 
        String username = username_example; // String | 
        try {
            JobStateResponse result = apiInstance.getJobState(jobName, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobOperationsApi#getJobState");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.JobOperationsApi;

public class JobOperationsApiExample {

    public static void main(String[] args) {
        JobOperationsApi apiInstance = new JobOperationsApi();
        String jobName = jobName_example; // String | 
        String username = username_example; // String | 
        try {
            JobStateResponse result = apiInstance.getJobState(jobName, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobOperationsApi#getJobState");
            e.printStackTrace();
        }
    }
}
String *jobName = jobName_example; // 
String *username = username_example; //  (optional)

JobOperationsApi *apiInstance = [[JobOperationsApi alloc] init];

// getJobState
[apiInstance getJobStateWith:jobName
    username:username
              completionHandler: ^(JobStateResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');

var api = new StreamingSqlEngineApi.JobOperationsApi()
var jobName = jobName_example; // {{String}} 
var opts = { 
  'username': username_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getJobState(jobName, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getJobStateExample
    {
        public void main()
        {

            var apiInstance = new JobOperationsApi();
            var jobName = jobName_example;  // String | 
            var username = username_example;  // String |  (optional) 

            try
            {
                // getJobState
                JobStateResponse result = apiInstance.getJobState(jobName, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling JobOperationsApi.getJobState: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiJobOperationsApi();
$jobName = jobName_example; // String | 
$username = username_example; // String | 

try {
    $result = $api_instance->getJobState($jobName, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling JobOperationsApi->getJobState: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::JobOperationsApi;

my $api_instance = WWW::SwaggerClient::JobOperationsApi->new();
my $jobName = jobName_example; # String | 
my $username = username_example; # String | 

eval { 
    my $result = $api_instance->getJobState(jobName => $jobName, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling JobOperationsApi->getJobState: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.JobOperationsApi()
jobName = jobName_example # String | 
username = username_example # String |  (optional)

try: 
    # getJobState
    api_response = api_instance.get_job_state(jobName, username=username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling JobOperationsApi->getJobState: %s\n" % e)

Parameters

Path parameters
Name Description
jobName*
String
Required
Header parameters
Name Description
Username
String

Responses

Status: 500 - Unexpected server error.

Status: 404 - Job not found.

Status: 200 - Job state retrieved successfully.


getJobs

getJobs

Retrieves SSB jobs.


/api/v1/ssb/jobs

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"http://mgergely-1.vpc.cloudera.com:18121//api/v1/ssb/jobs?state="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.JobOperationsApi;

import java.io.File;
import java.util.*;

public class JobOperationsApiExample {

    public static void main(String[] args) {
        
        JobOperationsApi apiInstance = new JobOperationsApi();
        String state = state_example; // String | Filters jobs by state.
        String username = username_example; // String | 
        try {
            FlinkJobsResponse result = apiInstance.getJobs(state, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobOperationsApi#getJobs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.JobOperationsApi;

public class JobOperationsApiExample {

    public static void main(String[] args) {
        JobOperationsApi apiInstance = new JobOperationsApi();
        String state = state_example; // String | Filters jobs by state.
        String username = username_example; // String | 
        try {
            FlinkJobsResponse result = apiInstance.getJobs(state, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobOperationsApi#getJobs");
            e.printStackTrace();
        }
    }
}
String *state = state_example; // Filters jobs by state. (optional)
String *username = username_example; //  (optional)

JobOperationsApi *apiInstance = [[JobOperationsApi alloc] init];

// getJobs
[apiInstance getJobsWith:state
    username:username
              completionHandler: ^(FlinkJobsResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');

var api = new StreamingSqlEngineApi.JobOperationsApi()
var opts = { 
  'state': state_example, // {{String}} Filters jobs by state.
  'username': username_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getJobs(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getJobsExample
    {
        public void main()
        {

            var apiInstance = new JobOperationsApi();
            var state = state_example;  // String | Filters jobs by state. (optional) 
            var username = username_example;  // String |  (optional) 

            try
            {
                // getJobs
                FlinkJobsResponse result = apiInstance.getJobs(state, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling JobOperationsApi.getJobs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiJobOperationsApi();
$state = state_example; // String | Filters jobs by state.
$username = username_example; // String | 

try {
    $result = $api_instance->getJobs($state, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling JobOperationsApi->getJobs: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::JobOperationsApi;

my $api_instance = WWW::SwaggerClient::JobOperationsApi->new();
my $state = state_example; # String | Filters jobs by state.
my $username = username_example; # String | 

eval { 
    my $result = $api_instance->getJobs(state => $state, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling JobOperationsApi->getJobs: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.JobOperationsApi()
state = state_example # String | Filters jobs by state. (optional)
username = username_example # String |  (optional)

try: 
    # getJobs
    api_response = api_instance.get_jobs(state=state, username=username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling JobOperationsApi->getJobs: %s\n" % e)

Parameters

Header parameters
Name Description
Username
String
Query parameters
Name Description
state
String
Filters jobs by state.

Responses

Status: 500 - Unexpected server error.

Status: 200 - Job state retrieved successfully.


stopJob

stopJob

Stops the given job.


/api/v1/ssb/jobs/{jobName}/stop

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://mgergely-1.vpc.cloudera.com:18121//api/v1/ssb/jobs/{jobName}/stop"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.JobOperationsApi;

import java.io.File;
import java.util.*;

public class JobOperationsApiExample {

    public static void main(String[] args) {
        
        JobOperationsApi apiInstance = new JobOperationsApi();
        StopJobRequest body = ; // StopJobRequest | 
        String jobName = jobName_example; // String | 
        String username = username_example; // String | 
        try {
            SavepointJobResponse result = apiInstance.stopJob(body, jobName, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobOperationsApi#stopJob");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.JobOperationsApi;

public class JobOperationsApiExample {

    public static void main(String[] args) {
        JobOperationsApi apiInstance = new JobOperationsApi();
        StopJobRequest body = ; // StopJobRequest | 
        String jobName = jobName_example; // String | 
        String username = username_example; // String | 
        try {
            SavepointJobResponse result = apiInstance.stopJob(body, jobName, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobOperationsApi#stopJob");
            e.printStackTrace();
        }
    }
}
StopJobRequest *body = ; // 
String *jobName = jobName_example; // 
String *username = username_example; //  (optional)

JobOperationsApi *apiInstance = [[JobOperationsApi alloc] init];

// stopJob
[apiInstance stopJobWith:body
    jobName:jobName
    username:username
              completionHandler: ^(SavepointJobResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');

var api = new StreamingSqlEngineApi.JobOperationsApi()
var body = ; // {{StopJobRequest}} 
var jobName = jobName_example; // {{String}} 
var opts = { 
  'username': username_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.stopJob(bodyjobName, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class stopJobExample
    {
        public void main()
        {

            var apiInstance = new JobOperationsApi();
            var body = new StopJobRequest(); // StopJobRequest | 
            var jobName = jobName_example;  // String | 
            var username = username_example;  // String |  (optional) 

            try
            {
                // stopJob
                SavepointJobResponse result = apiInstance.stopJob(body, jobName, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling JobOperationsApi.stopJob: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiJobOperationsApi();
$body = ; // StopJobRequest | 
$jobName = jobName_example; // String | 
$username = username_example; // String | 

try {
    $result = $api_instance->stopJob($body, $jobName, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling JobOperationsApi->stopJob: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::JobOperationsApi;

my $api_instance = WWW::SwaggerClient::JobOperationsApi->new();
my $body = WWW::SwaggerClient::Object::StopJobRequest->new(); # StopJobRequest | 
my $jobName = jobName_example; # String | 
my $username = username_example; # String | 

eval { 
    my $result = $api_instance->stopJob(body => $body, jobName => $jobName, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling JobOperationsApi->stopJob: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.JobOperationsApi()
body =  # StopJobRequest | 
jobName = jobName_example # String | 
username = username_example # String |  (optional)

try: 
    # stopJob
    api_response = api_instance.stop_job(body, jobName, username=username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling JobOperationsApi->stopJob: %s\n" % e)

Parameters

Path parameters
Name Description
jobName*
String
Required
Header parameters
Name Description
Username
String
Body parameters
Name Description
body *

Responses

Status: 200 - Job stopped successfully.

Status: 500 - Unexpected server error.

Status: 404 - Job not found.


SQLOperations

analyzeSql

analyzeSql

Execute SQL analyze query.


/api/v1/ssb/sql/analyze

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://mgergely-1.vpc.cloudera.com:18121//api/v1/ssb/sql/analyze"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SQLOperationsApi;

import java.io.File;
import java.util.*;

public class SQLOperationsApiExample {

    public static void main(String[] args) {
        
        SQLOperationsApi apiInstance = new SQLOperationsApi();
        SqlAnalyzeRequest body = ; // SqlAnalyzeRequest | 
        String username = username_example; // String | 
        try {
            SqlAnalyzeResponse result = apiInstance.analyzeSql(body, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SQLOperationsApi#analyzeSql");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SQLOperationsApi;

public class SQLOperationsApiExample {

    public static void main(String[] args) {
        SQLOperationsApi apiInstance = new SQLOperationsApi();
        SqlAnalyzeRequest body = ; // SqlAnalyzeRequest | 
        String username = username_example; // String | 
        try {
            SqlAnalyzeResponse result = apiInstance.analyzeSql(body, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SQLOperationsApi#analyzeSql");
            e.printStackTrace();
        }
    }
}
SqlAnalyzeRequest *body = ; // 
String *username = username_example; //  (optional)

SQLOperationsApi *apiInstance = [[SQLOperationsApi alloc] init];

// analyzeSql
[apiInstance analyzeSqlWith:body
    username:username
              completionHandler: ^(SqlAnalyzeResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');

var api = new StreamingSqlEngineApi.SQLOperationsApi()
var body = ; // {{SqlAnalyzeRequest}} 
var opts = { 
  'username': username_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.analyzeSql(body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class analyzeSqlExample
    {
        public void main()
        {

            var apiInstance = new SQLOperationsApi();
            var body = new SqlAnalyzeRequest(); // SqlAnalyzeRequest | 
            var username = username_example;  // String |  (optional) 

            try
            {
                // analyzeSql
                SqlAnalyzeResponse result = apiInstance.analyzeSql(body, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SQLOperationsApi.analyzeSql: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSQLOperationsApi();
$body = ; // SqlAnalyzeRequest | 
$username = username_example; // String | 

try {
    $result = $api_instance->analyzeSql($body, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SQLOperationsApi->analyzeSql: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SQLOperationsApi;

my $api_instance = WWW::SwaggerClient::SQLOperationsApi->new();
my $body = WWW::SwaggerClient::Object::SqlAnalyzeRequest->new(); # SqlAnalyzeRequest | 
my $username = username_example; # String | 

eval { 
    my $result = $api_instance->analyzeSql(body => $body, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SQLOperationsApi->analyzeSql: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SQLOperationsApi()
body =  # SqlAnalyzeRequest | 
username = username_example # String |  (optional)

try: 
    # analyzeSql
    api_response = api_instance.analyze_sql(body, username=username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SQLOperationsApi->analyzeSql: %s\n" % e)

Parameters

Header parameters
Name Description
Username
String
Body parameters
Name Description
body *

Responses

Status: 500 - Unexpected server error.

Status: 200 - Query executed successfully.

Status: 400 - Invalid request format or SQL query.


executeSql

executeSql

Execute SQL query.


/api/v1/ssb/sql/execute

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://mgergely-1.vpc.cloudera.com:18121//api/v1/ssb/sql/execute"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SQLOperationsApi;

import java.io.File;
import java.util.*;

public class SQLOperationsApiExample {

    public static void main(String[] args) {
        
        SQLOperationsApi apiInstance = new SQLOperationsApi();
        SqlExecuteRequest body = ; // SqlExecuteRequest | 
        String username = username_example; // String | 
        try {
            SqlExecuteResponse result = apiInstance.executeSql(body, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SQLOperationsApi#executeSql");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SQLOperationsApi;

public class SQLOperationsApiExample {

    public static void main(String[] args) {
        SQLOperationsApi apiInstance = new SQLOperationsApi();
        SqlExecuteRequest body = ; // SqlExecuteRequest | 
        String username = username_example; // String | 
        try {
            SqlExecuteResponse result = apiInstance.executeSql(body, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SQLOperationsApi#executeSql");
            e.printStackTrace();
        }
    }
}
SqlExecuteRequest *body = ; // 
String *username = username_example; //  (optional)

SQLOperationsApi *apiInstance = [[SQLOperationsApi alloc] init];

// executeSql
[apiInstance executeSqlWith:body
    username:username
              completionHandler: ^(SqlExecuteResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');

var api = new StreamingSqlEngineApi.SQLOperationsApi()
var body = ; // {{SqlExecuteRequest}} 
var opts = { 
  'username': username_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.executeSql(body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class executeSqlExample
    {
        public void main()
        {

            var apiInstance = new SQLOperationsApi();
            var body = new SqlExecuteRequest(); // SqlExecuteRequest | 
            var username = username_example;  // String |  (optional) 

            try
            {
                // executeSql
                SqlExecuteResponse result = apiInstance.executeSql(body, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SQLOperationsApi.executeSql: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSQLOperationsApi();
$body = ; // SqlExecuteRequest | 
$username = username_example; // String | 

try {
    $result = $api_instance->executeSql($body, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SQLOperationsApi->executeSql: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SQLOperationsApi;

my $api_instance = WWW::SwaggerClient::SQLOperationsApi->new();
my $body = WWW::SwaggerClient::Object::SqlExecuteRequest->new(); # SqlExecuteRequest | 
my $username = username_example; # String | 

eval { 
    my $result = $api_instance->executeSql(body => $body, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SQLOperationsApi->executeSql: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SQLOperationsApi()
body =  # SqlExecuteRequest | 
username = username_example # String |  (optional)

try: 
    # executeSql
    api_response = api_instance.execute_sql(body, username=username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SQLOperationsApi->executeSql: %s\n" % e)

Parameters

Header parameters
Name Description
Username
String
Body parameters
Name Description
body *

Responses

Status: 500 - Unexpected server error.

Status: 200 - Query executed successfully.

Status: 400 - Invalid request format or SQL query.


SamplingOperations

configure

configure

Configures sampling.


/api/v1/ssb/samples/{sampleId}/configure

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://mgergely-1.vpc.cloudera.com:18121//api/v1/ssb/samples/{sampleId}/configure"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SamplingOperationsApi;

import java.io.File;
import java.util.*;

public class SamplingOperationsApiExample {

    public static void main(String[] args) {
        
        SamplingOperationsApi apiInstance = new SamplingOperationsApi();
        ConfigureSampleRequest body = ; // ConfigureSampleRequest | 
        String sampleId = sampleId_example; // String | 
        String username = username_example; // String | 
        try {
            apiInstance.configure(body, sampleId, username);
        } catch (ApiException e) {
            System.err.println("Exception when calling SamplingOperationsApi#configure");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SamplingOperationsApi;

public class SamplingOperationsApiExample {

    public static void main(String[] args) {
        SamplingOperationsApi apiInstance = new SamplingOperationsApi();
        ConfigureSampleRequest body = ; // ConfigureSampleRequest | 
        String sampleId = sampleId_example; // String | 
        String username = username_example; // String | 
        try {
            apiInstance.configure(body, sampleId, username);
        } catch (ApiException e) {
            System.err.println("Exception when calling SamplingOperationsApi#configure");
            e.printStackTrace();
        }
    }
}
ConfigureSampleRequest *body = ; // 
String *sampleId = sampleId_example; // 
String *username = username_example; //  (optional)

SamplingOperationsApi *apiInstance = [[SamplingOperationsApi alloc] init];

// configure
[apiInstance configureWith:body
    sampleId:sampleId
    username:username
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');

var api = new StreamingSqlEngineApi.SamplingOperationsApi()
var body = ; // {{ConfigureSampleRequest}} 
var sampleId = sampleId_example; // {{String}} 
var opts = { 
  'username': username_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.configure(bodysampleId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class configureExample
    {
        public void main()
        {

            var apiInstance = new SamplingOperationsApi();
            var body = new ConfigureSampleRequest(); // ConfigureSampleRequest | 
            var sampleId = sampleId_example;  // String | 
            var username = username_example;  // String |  (optional) 

            try
            {
                // configure
                apiInstance.configure(body, sampleId, username);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SamplingOperationsApi.configure: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSamplingOperationsApi();
$body = ; // ConfigureSampleRequest | 
$sampleId = sampleId_example; // String | 
$username = username_example; // String | 

try {
    $api_instance->configure($body, $sampleId, $username);
} catch (Exception $e) {
    echo 'Exception when calling SamplingOperationsApi->configure: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SamplingOperationsApi;

my $api_instance = WWW::SwaggerClient::SamplingOperationsApi->new();
my $body = WWW::SwaggerClient::Object::ConfigureSampleRequest->new(); # ConfigureSampleRequest | 
my $sampleId = sampleId_example; # String | 
my $username = username_example; # String | 

eval { 
    $api_instance->configure(body => $body, sampleId => $sampleId, username => $username);
};
if ($@) {
    warn "Exception when calling SamplingOperationsApi->configure: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SamplingOperationsApi()
body =  # ConfigureSampleRequest | 
sampleId = sampleId_example # String | 
username = username_example # String |  (optional)

try: 
    # configure
    api_instance.configure(body, sampleId, username=username)
except ApiException as e:
    print("Exception when calling SamplingOperationsApi->configure: %s\n" % e)

Parameters

Path parameters
Name Description
sampleId*
String
Required
Header parameters
Name Description
Username
String
Body parameters
Name Description
body *

Responses

Status: 500 - Unexpected server error.

Status: 403 - User has no access to the corresponding job.

Status: 200 - Job state retrieved successfully.


pollResult

pollResult

Polls sample results.


/api/v1/ssb/samples/{sampleId}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"http://mgergely-1.vpc.cloudera.com:18121//api/v1/ssb/samples/{sampleId}?timeout="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SamplingOperationsApi;

import java.io.File;
import java.util.*;

public class SamplingOperationsApiExample {

    public static void main(String[] args) {
        
        SamplingOperationsApi apiInstance = new SamplingOperationsApi();
        String sampleId = sampleId_example; // String | 
        Long timeout = 789; // Long | Poll timeout in ms.
        String username = username_example; // String | 
        try {
            PollSampleResult result = apiInstance.pollResult(sampleId, timeout, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SamplingOperationsApi#pollResult");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SamplingOperationsApi;

public class SamplingOperationsApiExample {

    public static void main(String[] args) {
        SamplingOperationsApi apiInstance = new SamplingOperationsApi();
        String sampleId = sampleId_example; // String | 
        Long timeout = 789; // Long | Poll timeout in ms.
        String username = username_example; // String | 
        try {
            PollSampleResult result = apiInstance.pollResult(sampleId, timeout, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SamplingOperationsApi#pollResult");
            e.printStackTrace();
        }
    }
}
String *sampleId = sampleId_example; // 
Long *timeout = 789; // Poll timeout in ms. (optional) (default to 1000)
String *username = username_example; //  (optional)

SamplingOperationsApi *apiInstance = [[SamplingOperationsApi alloc] init];

// pollResult
[apiInstance pollResultWith:sampleId
    timeout:timeout
    username:username
              completionHandler: ^(PollSampleResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');

var api = new StreamingSqlEngineApi.SamplingOperationsApi()
var sampleId = sampleId_example; // {{String}} 
var opts = { 
  'timeout': 789, // {{Long}} Poll timeout in ms.
  'username': username_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pollResult(sampleId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class pollResultExample
    {
        public void main()
        {

            var apiInstance = new SamplingOperationsApi();
            var sampleId = sampleId_example;  // String | 
            var timeout = 789;  // Long | Poll timeout in ms. (optional)  (default to 1000)
            var username = username_example;  // String |  (optional) 

            try
            {
                // pollResult
                PollSampleResult result = apiInstance.pollResult(sampleId, timeout, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SamplingOperationsApi.pollResult: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSamplingOperationsApi();
$sampleId = sampleId_example; // String | 
$timeout = 789; // Long | Poll timeout in ms.
$username = username_example; // String | 

try {
    $result = $api_instance->pollResult($sampleId, $timeout, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SamplingOperationsApi->pollResult: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SamplingOperationsApi;

my $api_instance = WWW::SwaggerClient::SamplingOperationsApi->new();
my $sampleId = sampleId_example; # String | 
my $timeout = 789; # Long | Poll timeout in ms.
my $username = username_example; # String | 

eval { 
    my $result = $api_instance->pollResult(sampleId => $sampleId, timeout => $timeout, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SamplingOperationsApi->pollResult: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SamplingOperationsApi()
sampleId = sampleId_example # String | 
timeout = 789 # Long | Poll timeout in ms. (optional) (default to 1000)
username = username_example # String |  (optional)

try: 
    # pollResult
    api_response = api_instance.poll_result(sampleId, timeout=timeout, username=username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SamplingOperationsApi->pollResult: %s\n" % e)

Parameters

Path parameters
Name Description
sampleId*
String
Required
Header parameters
Name Description
Username
String
Query parameters
Name Description
timeout
Long (int64)
Poll timeout in ms.

Responses

Status: 500 - Unexpected server error.

Status: 200 - Polled results returned successfully.

Status: 400 - Bad sampling configuration.


SessionOperations

ensureSession

ensureSession

Ensures the session exists and returns session properties.


/api/v1/ssb/session

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"http://mgergely-1.vpc.cloudera.com:18121//api/v1/ssb/session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SessionOperationsApi;

import java.io.File;
import java.util.*;

public class SessionOperationsApiExample {

    public static void main(String[] args) {
        
        SessionOperationsApi apiInstance = new SessionOperationsApi();
        String username = username_example; // String | 
        try {
            SessionDto result = apiInstance.ensureSession(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionOperationsApi#ensureSession");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SessionOperationsApi;

public class SessionOperationsApiExample {

    public static void main(String[] args) {
        SessionOperationsApi apiInstance = new SessionOperationsApi();
        String username = username_example; // String | 
        try {
            SessionDto result = apiInstance.ensureSession(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionOperationsApi#ensureSession");
            e.printStackTrace();
        }
    }
}
String *username = username_example; //  (optional)

SessionOperationsApi *apiInstance = [[SessionOperationsApi alloc] init];

// ensureSession
[apiInstance ensureSessionWith:username
              completionHandler: ^(SessionDto output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');

var api = new StreamingSqlEngineApi.SessionOperationsApi()
var opts = { 
  'username': username_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.ensureSession(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class ensureSessionExample
    {
        public void main()
        {

            var apiInstance = new SessionOperationsApi();
            var username = username_example;  // String |  (optional) 

            try
            {
                // ensureSession
                SessionDto result = apiInstance.ensureSession(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SessionOperationsApi.ensureSession: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSessionOperationsApi();
$username = username_example; // String | 

try {
    $result = $api_instance->ensureSession($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SessionOperationsApi->ensureSession: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SessionOperationsApi;

my $api_instance = WWW::SwaggerClient::SessionOperationsApi->new();
my $username = username_example; # String | 

eval { 
    my $result = $api_instance->ensureSession(username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SessionOperationsApi->ensureSession: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SessionOperationsApi()
username = username_example # String |  (optional)

try: 
    # ensureSession
    api_response = api_instance.ensure_session(username=username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SessionOperationsApi->ensureSession: %s\n" % e)

Parameters

Header parameters
Name Description
Username
String

Responses

Status: 500 - Unexpected server error.

Status: 200 - Session exists, properties returned successfully.


resetSession

resetSession

Resets the session and returns the newly created session properties.


/api/v1/ssb/session/reset

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"http://mgergely-1.vpc.cloudera.com:18121//api/v1/ssb/session/reset"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SessionOperationsApi;

import java.io.File;
import java.util.*;

public class SessionOperationsApiExample {

    public static void main(String[] args) {
        
        SessionOperationsApi apiInstance = new SessionOperationsApi();
        String username = username_example; // String | 
        try {
            SessionDto result = apiInstance.resetSession(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionOperationsApi#resetSession");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SessionOperationsApi;

public class SessionOperationsApiExample {

    public static void main(String[] args) {
        SessionOperationsApi apiInstance = new SessionOperationsApi();
        String username = username_example; // String | 
        try {
            SessionDto result = apiInstance.resetSession(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionOperationsApi#resetSession");
            e.printStackTrace();
        }
    }
}
String *username = username_example; //  (optional)

SessionOperationsApi *apiInstance = [[SessionOperationsApi alloc] init];

// resetSession
[apiInstance resetSessionWith:username
              completionHandler: ^(SessionDto output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');

var api = new StreamingSqlEngineApi.SessionOperationsApi()
var opts = { 
  'username': username_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resetSession(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resetSessionExample
    {
        public void main()
        {

            var apiInstance = new SessionOperationsApi();
            var username = username_example;  // String |  (optional) 

            try
            {
                // resetSession
                SessionDto result = apiInstance.resetSession(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SessionOperationsApi.resetSession: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSessionOperationsApi();
$username = username_example; // String | 

try {
    $result = $api_instance->resetSession($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SessionOperationsApi->resetSession: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SessionOperationsApi;

my $api_instance = WWW::SwaggerClient::SessionOperationsApi->new();
my $username = username_example; # String | 

eval { 
    my $result = $api_instance->resetSession(username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SessionOperationsApi->resetSession: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SessionOperationsApi()
username = username_example # String |  (optional)

try: 
    # resetSession
    api_response = api_instance.reset_session(username=username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SessionOperationsApi->resetSession: %s\n" % e)

Parameters

Header parameters
Name Description
Username
String

Responses

Status: 500 - Unexpected server error.

Status: 200 - New session created, properties returned successfully.