TIBCO REST Pipeline API

Pipeline

data

Send a request to a pipeline and block waiting for the response.


/data

Usage and SDK Samples

curl -X POST\
-H "X-TIBCO-HCA-Data-Channel-Server-API-Token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"//data?waitTimeMilliseconds=&expectedResponseRecords="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PipelineApi;

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

public class PipelineApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiTokenKey
        ApiKeyAuth ApiTokenKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiTokenKey");
        ApiTokenKey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiTokenKey.setApiKeyPrefix("Token");

        PipelineApi apiInstance = new PipelineApi();
        InputData body = ; // InputData | 
        Integer waitTimeMilliseconds = 56; // Integer | The maximum scoring pipeline processing time in milliseconds.

Default value is 1000 milliseconds (1 second)

        Integer expectedResponseRecords = 56; // Integer | The expected number of results.

The operation is considered complete when this number
of results is received.

Default value is 1.

        try {
            array[OutputData] result = apiInstance.data(body, waitTimeMilliseconds, expectedResponseRecords);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PipelineApi#data");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PipelineApi;

public class PipelineApiExample {

    public static void main(String[] args) {
        PipelineApi apiInstance = new PipelineApi();
        InputData body = ; // InputData | 
        Integer waitTimeMilliseconds = 56; // Integer | The maximum scoring pipeline processing time in milliseconds.

Default value is 1000 milliseconds (1 second)

        Integer expectedResponseRecords = 56; // Integer | The expected number of results.

The operation is considered complete when this number
of results is received.

Default value is 1.

        try {
            array[OutputData] result = apiInstance.data(body, waitTimeMilliseconds, expectedResponseRecords);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PipelineApi#data");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiTokenKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-TIBCO-HCA-Data-Channel-Server-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-TIBCO-HCA-Data-Channel-Server-API-Token"];
InputData *body = ; //  (optional)
Integer *waitTimeMilliseconds = 56; // The maximum scoring pipeline processing time in milliseconds.

Default value is 1000 milliseconds (1 second)
 (optional) (default to 1000)
Integer *expectedResponseRecords = 56; // The expected number of results.

The operation is considered complete when this number
of results is received.

Default value is 1.
 (optional) (default to 1)

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

[apiInstance dataWith:body
    waitTimeMilliseconds:waitTimeMilliseconds
    expectedResponseRecords:expectedResponseRecords
              completionHandler: ^(array[OutputData] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var TibcoRestPipelineApi = require('tibco_rest_pipeline_api');
var defaultClient = TibcoRestPipelineApi.ApiClient.instance;

// Configure API key authorization: ApiTokenKey
var ApiTokenKey = defaultClient.authentications['ApiTokenKey'];
ApiTokenKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiTokenKey.apiKeyPrefix['X-TIBCO-HCA-Data-Channel-Server-API-Token'] = "Token"

var api = new TibcoRestPipelineApi.PipelineApi()
var opts = { 
  'body':  // {{InputData}} 
  'waitTimeMilliseconds': 56 // {{Integer}} The maximum scoring pipeline processing time in milliseconds.

Default value is 1000 milliseconds (1 second)

  'expectedResponseRecords': 56 // {{Integer}} The expected number of results.

The operation is considered complete when this number
of results is received.

Default value is 1.

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

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

            // Configure API key authorization: ApiTokenKey
            Configuration.Default.ApiKey.Add("X-TIBCO-HCA-Data-Channel-Server-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-TIBCO-HCA-Data-Channel-Server-API-Token", "Bearer");

            var apiInstance = new PipelineApi();
            var body = new InputData(); // InputData |  (optional) 
            var waitTimeMilliseconds = 56;  // Integer | The maximum scoring pipeline processing time in milliseconds.

Default value is 1000 milliseconds (1 second)
 (optional)  (default to 1000)
            var expectedResponseRecords = 56;  // Integer | The expected number of results.

The operation is considered complete when this number
of results is received.

Default value is 1.
 (optional)  (default to 1)

            try
            {
                array[OutputData] result = apiInstance.data(body, waitTimeMilliseconds, expectedResponseRecords);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PipelineApi.data: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiTokenKey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-TIBCO-HCA-Data-Channel-Server-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-TIBCO-HCA-Data-Channel-Server-API-Token', 'Bearer');

$api_instance = new Swagger\Client\ApiPipelineApi();
$body = ; // InputData | 
$waitTimeMilliseconds = 56; // Integer | The maximum scoring pipeline processing time in milliseconds.

Default value is 1000 milliseconds (1 second)

$expectedResponseRecords = 56; // Integer | The expected number of results.

The operation is considered complete when this number
of results is received.

Default value is 1.


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

# Configure API key authorization: ApiTokenKey
$WWW::SwaggerClient::Configuration::api_key->{'X-TIBCO-HCA-Data-Channel-Server-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-TIBCO-HCA-Data-Channel-Server-API-Token'} = "Bearer";

my $api_instance = WWW::SwaggerClient::PipelineApi->new();
my $body = WWW::SwaggerClient::Object::InputData->new(); # InputData | 
my $waitTimeMilliseconds = 56; # Integer | The maximum scoring pipeline processing time in milliseconds.

Default value is 1000 milliseconds (1 second)

my $expectedResponseRecords = 56; # Integer | The expected number of results.

The operation is considered complete when this number
of results is received.

Default value is 1.


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

# Configure API key authorization: ApiTokenKey
swagger_client.configuration.api_key['X-TIBCO-HCA-Data-Channel-Server-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-TIBCO-HCA-Data-Channel-Server-API-Token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PipelineApi()
body =  # InputData |  (optional)
waitTimeMilliseconds = 56 # Integer | The maximum scoring pipeline processing time in milliseconds.

Default value is 1000 milliseconds (1 second)
 (optional) (default to 1000)
expectedResponseRecords = 56 # Integer | The expected number of results.

The operation is considered complete when this number
of results is received.

Default value is 1.
 (optional) (default to 1)

try: 
    api_response = api_instance.data(body=body, waitTimeMilliseconds=waitTimeMilliseconds, expectedResponseRecords=expectedResponseRecords)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PipelineApi->data: %s\n" % e)

Parameters

Body parameters
Name Description
body
Query parameters
Name Description
waitTimeMilliseconds
Integer
The maximum scoring pipeline processing time in milliseconds. Default value is 1000 milliseconds (1 second)
expectedResponseRecords
Integer
The expected number of results. The operation is considered complete when this number of results is received. Default value is 1.

Responses

Status: 200 - Pipeline processing result. The array contains JSON encoded records from the output of the scoring flow. The schema of these records is defined by the Output processing step.

Status: 401 - Authentication information is missing or invalid.

Name Type Format Description
WWW-Authenticate String

Status: 404 - Connection lost to scoring pipeline

Status: 500 - Internal server error, contact support.


Session

login

Login to REST pipeline service.


/login

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Basic [[basicHash]]"\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"//login"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SessionApi;

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

public class SessionApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");


        SessionApi apiInstance = new SessionApi();
        try {
            apiInstance.login();
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionApi#login");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SessionApi;

public class SessionApiExample {

    public static void main(String[] args) {
        SessionApi apiInstance = new SessionApi();
        try {
            apiInstance.login();
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionApi#login");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: BasicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

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

[apiInstance loginWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var TibcoRestPipelineApi = require('tibco_rest_pipeline_api');
var defaultClient = TibcoRestPipelineApi.ApiClient.instance;
// Configure HTTP basic authorization: BasicAuth
var BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME'
BasicAuth.password = 'YOUR PASSWORD'


var api = new TibcoRestPipelineApi.SessionApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.login(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class loginExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new SessionApi();

            try
            {
                apiInstance.login();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SessionApi.login: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Swagger\Client\ApiSessionApi();

try {
    $api_instance->login();
} catch (Exception $e) {
    echo 'Exception when calling SessionApi->login: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SessionApi;
# Configure HTTP basic authorization: BasicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';

my $api_instance = WWW::SwaggerClient::SessionApi->new();

eval { 
    $api_instance->login();
};
if ($@) {
    warn "Exception when calling SessionApi->login: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.SessionApi()

try: 
    api_instance.login()
except ApiException as e:
    print("Exception when calling SessionApi->login: %s\n" % e)

Parameters

Responses

Status: 200 - Login was successful.

Name Type Format Description
X-TIBCO-HCA-Data-Channel-Server-API-Token String

Status: 401 - Authentication information is missing or invalid.

Name Type Format Description
WWW-Authenticate String

Status: 404 - Connection lost to scoring pipeline

Status: 500 - Internal server error, contact support.


logout

Terminate a REST pipeline login session.


/logout

Usage and SDK Samples

curl -X POST\
-H "X-TIBCO-HCA-Data-Channel-Server-API-Token: [[apiKey]]"\
-H "Accept: application/json"\
"//logout"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SessionApi;

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

public class SessionApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiTokenKey
        ApiKeyAuth ApiTokenKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiTokenKey");
        ApiTokenKey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiTokenKey.setApiKeyPrefix("Token");

        SessionApi apiInstance = new SessionApi();
        try {
            apiInstance.logout();
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionApi#logout");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SessionApi;

public class SessionApiExample {

    public static void main(String[] args) {
        SessionApi apiInstance = new SessionApi();
        try {
            apiInstance.logout();
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionApi#logout");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiTokenKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-TIBCO-HCA-Data-Channel-Server-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-TIBCO-HCA-Data-Channel-Server-API-Token"];

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

[apiInstance logoutWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var TibcoRestPipelineApi = require('tibco_rest_pipeline_api');
var defaultClient = TibcoRestPipelineApi.ApiClient.instance;

// Configure API key authorization: ApiTokenKey
var ApiTokenKey = defaultClient.authentications['ApiTokenKey'];
ApiTokenKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiTokenKey.apiKeyPrefix['X-TIBCO-HCA-Data-Channel-Server-API-Token'] = "Token"

var api = new TibcoRestPipelineApi.SessionApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.logout(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: ApiTokenKey
            Configuration.Default.ApiKey.Add("X-TIBCO-HCA-Data-Channel-Server-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-TIBCO-HCA-Data-Channel-Server-API-Token", "Bearer");

            var apiInstance = new SessionApi();

            try
            {
                apiInstance.logout();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SessionApi.logout: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiTokenKey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-TIBCO-HCA-Data-Channel-Server-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-TIBCO-HCA-Data-Channel-Server-API-Token', 'Bearer');

$api_instance = new Swagger\Client\ApiSessionApi();

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

# Configure API key authorization: ApiTokenKey
$WWW::SwaggerClient::Configuration::api_key->{'X-TIBCO-HCA-Data-Channel-Server-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-TIBCO-HCA-Data-Channel-Server-API-Token'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SessionApi->new();

eval { 
    $api_instance->logout();
};
if ($@) {
    warn "Exception when calling SessionApi->logout: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiTokenKey
swagger_client.configuration.api_key['X-TIBCO-HCA-Data-Channel-Server-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-TIBCO-HCA-Data-Channel-Server-API-Token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SessionApi()

try: 
    api_instance.logout()
except ApiException as e:
    print("Exception when calling SessionApi->logout: %s\n" % e)

Parameters

Responses

Status: 200 - Logout was successful.

Status: 401 - Token is expired, revoked, malformed, or invalid.

Name Type Format Description
WWW-Authenticate String

Status: 404 - Connection lost to scoring pipeline

Status: 500 - Internal server error, contact support.