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 |