createTestResults
Create Test Results
The POST Test Result API endpoint provides possibility to return the list of Test Results based on the defined parameters. Parameters are as follows: modified date and/or ticket number and/or timeZone.
/v2/connex/{clientId}/test-results/search
Usage and SDK Samples
curl -X POST\
-H "x-api-key: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://api.commandalkon.io/v2/connex/{clientId}/test-results/search"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TestResultsApi;
import java.io.File;
import java.util.*;
public class TestResultsApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth api-key = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
api-key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api-key.setApiKeyPrefix("Token");
TestResultsApi apiInstance = new TestResultsApi();
TestResultsSearchRequest body = ; // TestResultsSearchRequest | Specifies query parameters for the Test Results Search.
String clientId = clientId_example; // String | A unique client identifier used to authorize the request.
try {
TestResultsSearchResponse result = apiInstance.createTestResults(body, clientId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TestResultsApi#createTestResults");
e.printStackTrace();
}
}
}
import io.swagger.client.api.TestResultsApi;
public class TestResultsApiExample {
public static void main(String[] args) {
TestResultsApi apiInstance = new TestResultsApi();
TestResultsSearchRequest body = ; // TestResultsSearchRequest | Specifies query parameters for the Test Results Search.
String clientId = clientId_example; // String | A unique client identifier used to authorize the request.
try {
TestResultsSearchResponse result = apiInstance.createTestResults(body, clientId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TestResultsApi#createTestResults");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
TestResultsSearchRequest *body = ; // Specifies query parameters for the Test Results Search.
String *clientId = clientId_example; // A unique client identifier used to authorize the request.
TestResultsApi *apiInstance = [[TestResultsApi alloc] init];
// Create Test Results
[apiInstance createTestResultsWith:body
clientId:clientId
completionHandler: ^(TestResultsSearchResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ConnexPlatform = require('connex_platform');
var defaultClient = ConnexPlatform.ApiClient.instance;
// Configure API key authorization: api-key
var api-key = defaultClient.authentications['api-key'];
api-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api-key.apiKeyPrefix['x-api-key'] = "Token"
var api = new ConnexPlatform.TestResultsApi()
var body = ; // {{TestResultsSearchRequest}} Specifies query parameters for the Test Results Search.
var clientId = clientId_example; // {{String}} A unique client identifier used to authorize the request.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createTestResults(bodyclientId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class createTestResultsExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.ApiKey.Add("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("x-api-key", "Bearer");
var apiInstance = new TestResultsApi();
var body = new TestResultsSearchRequest(); // TestResultsSearchRequest | Specifies query parameters for the Test Results Search.
var clientId = clientId_example; // String | A unique client identifier used to authorize the request.
try
{
// Create Test Results
TestResultsSearchResponse result = apiInstance.createTestResults(body, clientId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling TestResultsApi.createTestResults: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$api_instance = new Swagger\Client\ApiTestResultsApi();
$body = ; // TestResultsSearchRequest | Specifies query parameters for the Test Results Search.
$clientId = clientId_example; // String | A unique client identifier used to authorize the request.
try {
$result = $api_instance->createTestResults($body, $clientId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TestResultsApi->createTestResults: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TestResultsApi;
# Configure API key authorization: api-key
$WWW::SwaggerClient::Configuration::api_key->{'x-api-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-api-key'} = "Bearer";
my $api_instance = WWW::SwaggerClient::TestResultsApi->new();
my $body = WWW::SwaggerClient::Object::TestResultsSearchRequest->new(); # TestResultsSearchRequest | Specifies query parameters for the Test Results Search.
my $clientId = clientId_example; # String | A unique client identifier used to authorize the request.
eval {
my $result = $api_instance->createTestResults(body => $body, clientId => $clientId);
print Dumper($result);
};
if ($@) {
warn "Exception when calling TestResultsApi->createTestResults: $@\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: api-key
swagger_client.configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-api-key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.TestResultsApi()
body = # TestResultsSearchRequest | Specifies query parameters for the Test Results Search.
clientId = clientId_example # String | A unique client identifier used to authorize the request.
try:
# Create Test Results
api_response = api_instance.create_test_results(body, clientId)
pprint(api_response)
except ApiException as e:
print("Exception when calling TestResultsApi->createTestResults: %s\n" % e)
Parameters
Name | Description |
---|---|
clientId* |
String
A unique client identifier used to authorize the request.
Required
|
Name | Description |
---|---|
body * |