Cloudera Documentation

Streaming SQL Engine API

ArtifactManagement

delete

delete


/api/v1/artifacts

Usage and SDK Samples

curl -X DELETE\
"https://csa-sec-1.vpc.cloudera.com:18121//api/v1/artifacts?artifactName=&scope="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ArtifactManagementApi;

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

public class ArtifactManagementApiExample {

    public static void main(String[] args) {
        
        ArtifactManagementApi apiInstance = new ArtifactManagementApi();
        String artifactName = artifactName_example; // String | 
        String scope = scope_example; // String | 
        String username = username_example; // String | 
        try {
            apiInstance.delete(artifactName, scope, username);
        } catch (ApiException e) {
            System.err.println("Exception when calling ArtifactManagementApi#delete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ArtifactManagementApi;

public class ArtifactManagementApiExample {

    public static void main(String[] args) {
        ArtifactManagementApi apiInstance = new ArtifactManagementApi();
        String artifactName = artifactName_example; // String | 
        String scope = scope_example; // String | 
        String username = username_example; // String | 
        try {
            apiInstance.delete(artifactName, scope, username);
        } catch (ApiException e) {
            System.err.println("Exception when calling ArtifactManagementApi#delete");
            e.printStackTrace();
        }
    }
}
String *artifactName = artifactName_example; // 
String *scope = scope_example; //  (optional) (default to USER)
String *username = username_example; //  (optional)

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

// delete
[apiInstance deleteWith:artifactName
    scope:scope
    username:username
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');

var api = new StreamingSqlEngineApi.ArtifactManagementApi()
var artifactName = artifactName_example; // {{String}} 
var opts = { 
  'scope': scope_example, // {{String}} 
  'username': username_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.delete(artifactName, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ArtifactManagementApi();
            var artifactName = artifactName_example;  // String | 
            var scope = scope_example;  // String |  (optional)  (default to USER)
            var username = username_example;  // String |  (optional) 

            try
            {
                // delete
                apiInstance.delete(artifactName, scope, username);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ArtifactManagementApi.delete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiArtifactManagementApi();
$artifactName = artifactName_example; // String | 
$scope = scope_example; // String | 
$username = username_example; // String | 

try {
    $api_instance->delete($artifactName, $scope, $username);
} catch (Exception $e) {
    echo 'Exception when calling ArtifactManagementApi->delete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ArtifactManagementApi;

my $api_instance = WWW::SwaggerClient::ArtifactManagementApi->new();
my $artifactName = artifactName_example; # String | 
my $scope = scope_example; # String | 
my $username = username_example; # String | 

eval { 
    $api_instance->delete(artifactName => $artifactName, scope => $scope, username => $username);
};
if ($@) {
    warn "Exception when calling ArtifactManagementApi->delete: $@\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.ArtifactManagementApi()
artifactName = artifactName_example # String | 
scope = scope_example # String |  (optional) (default to USER)
username = username_example # String |  (optional)

try: 
    # delete
    api_instance.delete(artifactName, scope=scope, username=username)
except ApiException as e:
    print("Exception when calling ArtifactManagementApi->delete: %s\n" % e)

Parameters

Header parameters
Name Description
Username
String
Query parameters
Name Description
artifactName*
String
Required
scope
String

Responses

Status: 200 - OK


get

get


/api/v1/artifacts

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://csa-sec-1.vpc.cloudera.com:18121//api/v1/artifacts?artifactName=&scope="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ArtifactManagementApi;

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

public class ArtifactManagementApiExample {

    public static void main(String[] args) {
        
        ArtifactManagementApi apiInstance = new ArtifactManagementApi();
        String artifactName = artifactName_example; // String | 
        String scope = scope_example; // String | 
        String username = username_example; // String | 
        try {
            array[ArtifactDto] result = apiInstance.get(artifactName, scope, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ArtifactManagementApi#get");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ArtifactManagementApi;

public class ArtifactManagementApiExample {

    public static void main(String[] args) {
        ArtifactManagementApi apiInstance = new ArtifactManagementApi();
        String artifactName = artifactName_example; // String | 
        String scope = scope_example; // String | 
        String username = username_example; // String | 
        try {
            array[ArtifactDto] result = apiInstance.get(artifactName, scope, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ArtifactManagementApi#get");
            e.printStackTrace();
        }
    }
}
String *artifactName = artifactName_example; //  (optional)
String *scope = scope_example; //  (optional)
String *username = username_example; //  (optional)

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

// get
[apiInstance getWith:artifactName
    scope:scope
    username:username
              completionHandler: ^(array[ArtifactDto] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');

var api = new StreamingSqlEngineApi.ArtifactManagementApi()
var opts = { 
  'artifactName': artifactName_example, // {{String}} 
  'scope': scope_example, // {{String}} 
  '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.get(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ArtifactManagementApi();
            var artifactName = artifactName_example;  // String |  (optional) 
            var scope = scope_example;  // String |  (optional) 
            var username = username_example;  // String |  (optional) 

            try
            {
                // get
                array[ArtifactDto] result = apiInstance.get(artifactName, scope, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ArtifactManagementApi.get: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiArtifactManagementApi();
$artifactName = artifactName_example; // String | 
$scope = scope_example; // String | 
$username = username_example; // String | 

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

my $api_instance = WWW::SwaggerClient::ArtifactManagementApi->new();
my $artifactName = artifactName_example; # String | 
my $scope = scope_example; # String | 
my $username = username_example; # String | 

eval { 
    my $result = $api_instance->get(artifactName => $artifactName, scope => $scope, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ArtifactManagementApi->get: $@\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.ArtifactManagementApi()
artifactName = artifactName_example # String |  (optional)
scope = scope_example # String |  (optional)
username = username_example # String |  (optional)

try: 
    # get
    api_response = api_instance.get(artifactName=artifactName, scope=scope, username=username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ArtifactManagementApi->get: %s\n" % e)

Parameters

Header parameters
Name Description
Username
String
Query parameters
Name Description
artifactName
String
scope
String

Responses

Status: 200 - OK


upload

upload


/api/v1/artifacts

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://csa-sec-1.vpc.cloudera.com:18121//api/v1/artifacts?artifactName=&scope="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ArtifactManagementApi;

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

public class ArtifactManagementApiExample {

    public static void main(String[] args) {
        
        ArtifactManagementApi apiInstance = new ArtifactManagementApi();
        ApiV1ArtifactsRequest body = ; // ApiV1ArtifactsRequest | 
        String username = username_example; // String | 
        String contentType = contentType_example; // String | 
        String artifactName = artifactName_example; // String | 
        String scope = scope_example; // String | 
        try {
            ArtifactDto result = apiInstance.upload(body, username, contentType, artifactName, scope);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ArtifactManagementApi#upload");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ArtifactManagementApi;

public class ArtifactManagementApiExample {

    public static void main(String[] args) {
        ArtifactManagementApi apiInstance = new ArtifactManagementApi();
        ApiV1ArtifactsRequest body = ; // ApiV1ArtifactsRequest | 
        String username = username_example; // String | 
        String contentType = contentType_example; // String | 
        String artifactName = artifactName_example; // String | 
        String scope = scope_example; // String | 
        try {
            ArtifactDto result = apiInstance.upload(body, username, contentType, artifactName, scope);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ArtifactManagementApi#upload");
            e.printStackTrace();
        }
    }
}
ApiV1ArtifactsRequest *body = ; //  (optional)
String *username = username_example; //  (optional)
String *contentType = contentType_example; //  (optional)
String *artifactName = artifactName_example; //  (optional)
String *scope = scope_example; //  (optional) (default to USER)

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

// upload
[apiInstance uploadWith:body
    username:username
    contentType:contentType
    artifactName:artifactName
    scope:scope
              completionHandler: ^(ArtifactDto output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var StreamingSqlEngineApi = require('streaming_sql_engine_api');

var api = new StreamingSqlEngineApi.ArtifactManagementApi()
var opts = { 
  'body':  // {{ApiV1ArtifactsRequest}} 
  'username': username_example // {{String}} 
  'contentType': contentType_example // {{String}} 
  'artifactName': artifactName_example // {{String}} 
  'scope': scope_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.upload(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ArtifactManagementApi();
            var body = new ApiV1ArtifactsRequest(); // ApiV1ArtifactsRequest |  (optional) 
            var username = username_example;  // String |  (optional) 
            var contentType = contentType_example;  // String |  (optional) 
            var artifactName = artifactName_example;  // String |  (optional) 
            var scope = scope_example;  // String |  (optional)  (default to USER)

            try
            {
                // upload
                ArtifactDto result = apiInstance.upload(body, username, contentType, artifactName, scope);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ArtifactManagementApi.upload: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiArtifactManagementApi();
$body = ; // ApiV1ArtifactsRequest | 
$username = username_example; // String | 
$contentType = contentType_example; // String | 
$artifactName = artifactName_example; // String | 
$scope = scope_example; // String | 

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

my $api_instance = WWW::SwaggerClient::ArtifactManagementApi->new();
my $body = WWW::SwaggerClient::Object::ApiV1ArtifactsRequest->new(); # ApiV1ArtifactsRequest | 
my $username = username_example; # String | 
my $contentType = contentType_example; # String | 
my $artifactName = artifactName_example; # String | 
my $scope = scope_example; # String | 

eval { 
    my $result = $api_instance->upload(body => $body, username => $username, contentType => $contentType, artifactName => $artifactName, scope => $scope);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ArtifactManagementApi->upload: $@\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.ArtifactManagementApi()
body =  # ApiV1ArtifactsRequest |  (optional)
username = username_example # String |  (optional)
contentType = contentType_example # String |  (optional)
artifactName = artifactName_example # String |  (optional)
scope = scope_example # String |  (optional) (default to USER)

try: 
    # upload
    api_response = api_instance.upload(body=body, username=username, contentType=contentType, artifactName=artifactName, scope=scope)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ArtifactManagementApi->upload: %s\n" % e)

Parameters

Header parameters
Name Description
Username
String
Content-Type
String
Body parameters
Name Description
body
Query parameters
Name Description
artifactName
String
scope
String

Responses

Status: 200 - OK


FlinkJobManagement

run

run


/api/v1/flink/run

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://csa-sec-1.vpc.cloudera.com:18121//api/v1/flink/run"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlinkJobManagementApi;

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

public class FlinkJobManagementApiExample {

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

public class FlinkJobManagementApiExample {

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

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

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

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

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

            var apiInstance = new FlinkJobManagementApi();
            var body = new FlinkRunRequest(); // FlinkRunRequest | 
            var username = username_example;  // String |  (optional) 
            var contentType = contentType_example;  // String |  (optional) 

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

$api_instance = new Swagger\Client\ApiFlinkJobManagementApi();
$body = ; // FlinkRunRequest | 
$username = username_example; // String | 
$contentType = contentType_example; // String | 

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

my $api_instance = WWW::SwaggerClient::FlinkJobManagementApi->new();
my $body = WWW::SwaggerClient::Object::FlinkRunRequest->new(); # FlinkRunRequest | 
my $username = username_example; # String | 
my $contentType = contentType_example; # String | 

eval { 
    my $result = $api_instance->run(body => $body, username => $username, contentType => $contentType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlinkJobManagementApi->run: $@\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.FlinkJobManagementApi()
body =  # FlinkRunRequest | 
username = username_example # String |  (optional)
contentType = contentType_example # String |  (optional)

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

Parameters

Header parameters
Name Description
Username
String
Content-Type
String
Body parameters
Name Description
body *

Responses

Status: 200 - OK


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"\
"https://csa-sec-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: 200 - Session exists, properties returned successfully.

Status: 404 - User not found.

Status: 500 - Unexpected server error.


getFlinkSessionByUser

getFlinkSessionByUser

Returns Flink session properties.


/api/v1/flink/session-cluster

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://csa-sec-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 {
            FlinkSession 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 {
            FlinkSession 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: ^(FlinkSession 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
                FlinkSession 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: 200 - Session properties returned successfully.

Status: 404 - User or session not found.

Status: 500 - Unexpected server error.


JobOperations

createJob

createJob

Creates new job.


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

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://csa-sec-1.vpc.cloudera.com:18121//api/v1/ssb/jobs/{jobName}"
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();
        CreateJobRequest body = ; // CreateJobRequest | 
        String jobName = jobName_example; // String | 
        String username = username_example; // String | 
        String contentType = contentType_example; // String | 
        try {
            JobCreateResponse result = apiInstance.createJob(body, jobName, username, contentType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobOperationsApi#createJob");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.JobOperationsApi;

public class JobOperationsApiExample {

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

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

// createJob
[apiInstance createJobWith:body
    jobName:jobName
    username:username
    contentType:contentType
              completionHandler: ^(JobCreateResponse 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 = ; // {{CreateJobRequest}} 
var jobName = jobName_example; // {{String}} 
var opts = { 
  'username': username_example // {{String}} 
  'contentType': contentType_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createJob(bodyjobName, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

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

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

try {
    $result = $api_instance->createJob($body, $jobName, $username, $contentType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling JobOperationsApi->createJob: ', $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::CreateJobRequest->new(); # CreateJobRequest | 
my $jobName = jobName_example; # String | 
my $username = username_example; # String | 
my $contentType = contentType_example; # String | 

eval { 
    my $result = $api_instance->createJob(body => $body, jobName => $jobName, username => $username, contentType => $contentType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling JobOperationsApi->createJob: $@\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 =  # CreateJobRequest | 
jobName = jobName_example # String | 
username = username_example # String |  (optional)
contentType = contentType_example # String |  (optional)

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

Parameters

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

Responses

Status: 500 - Unexpected server error.

Status: 200 - Job created successfully.

Status: 400 - Unable to create job.


getJobDetails

getJobDetails

Gives back job details.


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

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://csa-sec-1.vpc.cloudera.com:18121//api/v1/ssb/jobs/{jobName}"
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 {
            JobDetailsResponse result = apiInstance.getJobDetails(jobName, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobOperationsApi#getJobDetails");
            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 {
            JobDetailsResponse result = apiInstance.getJobDetails(jobName, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobOperationsApi#getJobDetails");
            e.printStackTrace();
        }
    }
}
String *jobName = jobName_example; // 
String *username = username_example; //  (optional)

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

// getJobDetails
[apiInstance getJobDetailsWith:jobName
    username:username
              completionHandler: ^(JobDetailsResponse 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.getJobDetails(jobName, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // getJobDetails
                JobDetailsResponse result = apiInstance.getJobDetails(jobName, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling JobOperationsApi.getJobDetails: " + 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->getJobDetails($jobName, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling JobOperationsApi->getJobDetails: ', $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->getJobDetails(jobName => $jobName, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling JobOperationsApi->getJobDetails: $@\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: 
    # getJobDetails
    api_response = api_instance.get_job_details(jobName, username=username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling JobOperationsApi->getJobDetails: %s\n" % e)

Parameters

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

Responses

Status: 200 - Job details retrieved successfully.

Status: 400 - Unable to retrieve job details.

Status: 500 - Unexpected server error.

Status: 404 - Job not found.


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"\
"https://csa-sec-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: 200 - Job state retrieved successfully.

Status: 404 - Job not found.


getJobs

getJobs

Retrieves SSB jobs.


/api/v1/ssb/jobs

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://csa-sec-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"\
"https://csa-sec-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 | 
        String contentType = contentType_example; // String | 
        try {
            SavepointJobResponse result = apiInstance.stopJob(body, jobName, username, contentType);
            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 | 
        String contentType = contentType_example; // String | 
        try {
            SavepointJobResponse result = apiInstance.stopJob(body, jobName, username, contentType);
            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)
String *contentType = contentType_example; //  (optional)

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

// stopJob
[apiInstance stopJobWith:body
    jobName:jobName
    username:username
    contentType:contentType
              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}} 
  'contentType': contentType_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) 
            var contentType = contentType_example;  // String |  (optional) 

            try
            {
                // stopJob
                SavepointJobResponse result = apiInstance.stopJob(body, jobName, username, contentType);
                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 | 
$contentType = contentType_example; // String | 

try {
    $result = $api_instance->stopJob($body, $jobName, $username, $contentType);
    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 | 
my $contentType = contentType_example; # String | 

eval { 
    my $result = $api_instance->stopJob(body => $body, jobName => $jobName, username => $username, contentType => $contentType);
    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)
contentType = contentType_example # String |  (optional)

try: 
    # stopJob
    api_response = api_instance.stop_job(body, jobName, username=username, contentType=contentType)
    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
Content-Type
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"\
"https://csa-sec-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 | 
        String contentType = contentType_example; // String | 
        try {
            SqlAnalyzeResponse result = apiInstance.analyzeSql(body, username, contentType);
            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 | 
        String contentType = contentType_example; // String | 
        try {
            SqlAnalyzeResponse result = apiInstance.analyzeSql(body, username, contentType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SQLOperationsApi#analyzeSql");
            e.printStackTrace();
        }
    }
}
SqlAnalyzeRequest *body = ; // 
String *username = username_example; //  (optional)
String *contentType = contentType_example; //  (optional)

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

// analyzeSql
[apiInstance analyzeSqlWith:body
    username:username
    contentType:contentType
              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}} 
  'contentType': contentType_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) 
            var contentType = contentType_example;  // String |  (optional) 

            try
            {
                // analyzeSql
                SqlAnalyzeResponse result = apiInstance.analyzeSql(body, username, contentType);
                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 | 
$contentType = contentType_example; // String | 

try {
    $result = $api_instance->analyzeSql($body, $username, $contentType);
    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 | 
my $contentType = contentType_example; # String | 

eval { 
    my $result = $api_instance->analyzeSql(body => $body, username => $username, contentType => $contentType);
    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)
contentType = contentType_example # String |  (optional)

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

Parameters

Header parameters
Name Description
Username
String
Content-Type
String
Body parameters
Name Description
body *

Responses

Status: 400 - Invalid request format or SQL query.

Status: 200 - Query executed successfully.

Status: 500 - Unexpected server error.


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"\
"https://csa-sec-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 | 
        String contentType = contentType_example; // String | 
        try {
            Object result = apiInstance.executeSql(body, username, contentType);
            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 | 
        String contentType = contentType_example; // String | 
        try {
            Object result = apiInstance.executeSql(body, username, contentType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SQLOperationsApi#executeSql");
            e.printStackTrace();
        }
    }
}
SqlExecuteRequest *body = ; // 
String *username = username_example; //  (optional)
String *contentType = contentType_example; //  (optional)

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

// executeSql
[apiInstance executeSqlWith:body
    username:username
    contentType:contentType
              completionHandler: ^(Object 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}} 
  'contentType': contentType_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) 
            var contentType = contentType_example;  // String |  (optional) 

            try
            {
                // executeSql
                Object result = apiInstance.executeSql(body, username, contentType);
                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 | 
$contentType = contentType_example; // String | 

try {
    $result = $api_instance->executeSql($body, $username, $contentType);
    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 | 
my $contentType = contentType_example; # String | 

eval { 
    my $result = $api_instance->executeSql(body => $body, username => $username, contentType => $contentType);
    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)
contentType = contentType_example # String |  (optional)

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

Parameters

Header parameters
Name Description
Username
String
Content-Type
String
Body parameters
Name Description
body *

Responses

Status: 400 - Invalid request format or SQL query.

Status: 200 - Query executed successfully.

Status: 500 - Unexpected server error.


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"\
"https://csa-sec-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 | 
        String contentType = contentType_example; // String | 
        try {
            apiInstance.configure(body, sampleId, username, contentType);
        } 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 | 
        String contentType = contentType_example; // String | 
        try {
            apiInstance.configure(body, sampleId, username, contentType);
        } catch (ApiException e) {
            System.err.println("Exception when calling SamplingOperationsApi#configure");
            e.printStackTrace();
        }
    }
}
ConfigureSampleRequest *body = ; // 
String *sampleId = sampleId_example; // 
String *username = username_example; //  (optional)
String *contentType = contentType_example; //  (optional)

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

// configure
[apiInstance configureWith:body
    sampleId:sampleId
    username:username
    contentType:contentType
              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}} 
  'contentType': contentType_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) 
            var contentType = contentType_example;  // String |  (optional) 

            try
            {
                // configure
                apiInstance.configure(body, sampleId, username, contentType);
            }
            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 | 
$contentType = contentType_example; // String | 

try {
    $api_instance->configure($body, $sampleId, $username, $contentType);
} 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 | 
my $contentType = contentType_example; # String | 

eval { 
    $api_instance->configure(body => $body, sampleId => $sampleId, username => $username, contentType => $contentType);
};
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)
contentType = contentType_example # String |  (optional)

try: 
    # configure
    api_instance.configure(body, sampleId, username=username, contentType=contentType)
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
Content-Type
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"\
"https://csa-sec-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: 400 - Bad sampling configuration.

Status: 200 - Polled results returned successfully.

Status: 500 - Unexpected server error.


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"\
"https://csa-sec-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: 200 - Session exists, properties returned successfully.

Status: 500 - Unexpected server error.


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"\
"https://csa-sec-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: 200 - New session created, properties returned successfully.

Status: 500 - Unexpected server error.