Horton API

Horton Logo

Account

login

Log in

Attempts to log a user in


/login

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/login"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountApi;

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

public class AccountApiExample {

    public static void main(String[] args) {

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

public class AccountApiExample {

    public static void main(String[] args) {
        AccountApi apiInstance = new AccountApi();
        Inline_object body = ; // Inline_object |
        try {
            apiInstance.login(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountApi#login");
            e.printStackTrace();
        }
    }
}
Inline_object *body = ; //

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

// Log in
[apiInstance loginWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HortonApi = require('horton_api');

var api = new HortonApi.AccountApi()
var body = ; // {{Inline_object}}

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.login(body, 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()
        {

            var apiInstance = new AccountApi();
            var body = new Inline_object(); // Inline_object |

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

$api_instance = new Swagger\Client\ApiAccountApi();
$body = ; // Inline_object |

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

my $api_instance = WWW::SwaggerClient::AccountApi->new();
my $body = WWW::SwaggerClient::Object::Inline_object->new(); # Inline_object |

eval {
    $api_instance->login(body => $body);
};
if ($@) {
    warn "Exception when calling AccountApi->login: $@\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.AccountApi()
body =  # Inline_object |

try:
    # Log in
    api_instance.login(body)
except ApiException as e:
    print("Exception when calling AccountApi->login: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 204 - Login successful

Name Type Format Description
Set-Cookie String

Status: 403 - Login Unsuccessful

{"code":403,"messages":"Invalid Name and/or password"}

Status: 500 - Unable to process request

{"code":500,"messages":"Unable to process request"}

register

Registers User

Attempts to register a new user


/register

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/register"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountApi;

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

public class AccountApiExample {

    public static void main(String[] args) {

        AccountApi apiInstance = new AccountApi();
        Inline_object body = ; // Inline_object |
        try {
            apiInstance.register(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountApi#register");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountApi;

public class AccountApiExample {

    public static void main(String[] args) {
        AccountApi apiInstance = new AccountApi();
        Inline_object body = ; // Inline_object |
        try {
            apiInstance.register(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountApi#register");
            e.printStackTrace();
        }
    }
}
Inline_object *body = ; //

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

// Registers User
[apiInstance registerWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HortonApi = require('horton_api');

var api = new HortonApi.AccountApi()
var body = ; // {{Inline_object}}

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

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

            var apiInstance = new AccountApi();
            var body = new Inline_object(); // Inline_object |

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

$api_instance = new Swagger\Client\ApiAccountApi();
$body = ; // Inline_object |

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

my $api_instance = WWW::SwaggerClient::AccountApi->new();
my $body = WWW::SwaggerClient::Object::Inline_object->new(); # Inline_object |

eval {
    $api_instance->register(body => $body);
};
if ($@) {
    warn "Exception when calling AccountApi->register: $@\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.AccountApi()
body =  # Inline_object |

try:
    # Registers User
    api_instance.register(body)
except ApiException as e:
    print("Exception when calling AccountApi->register: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 204 - Successfully registered a new User

Status: 400 - Problem with username or password

{"code":400,"messages":"Password insufficiently complex"}
{"code":400,"messages":"Name too short"}

Status: 409 - username is already taken

{"code":409,"messages":"username is already taken"}

Status: 500 - Unable to process request

{"code":500,"messages":"Unable to process request"}

JobReport

createReport

Create a report

Creates a new instance of a Job Report.


/jobReports

Usage and SDK Samples

curl -X POST\
\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/jobReports?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.JobReportApi;

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

public class JobReportApiExample {

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

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

        JobReportApi apiInstance = new JobReportApi();
        JobReport body = ; // JobReport | A new report to be created.
        try {
            apiInstance.createReport(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobReportApi#createReport");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.JobReportApi;

public class JobReportApiExample {

    public static void main(String[] args) {
        JobReportApi apiInstance = new JobReportApi();
        JobReport body = ; // JobReport | A new report to be created.
        try {
            apiInstance.createReport(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobReportApi#createReport");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: LoginRequired)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"session_id"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"session_id"];
JobReport *body = ; // A new report to be created.

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

// Create a report
[apiInstance createReportWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HortonApi = require('horton_api');
var defaultClient = HortonApi.ApiClient.instance;

// Configure API key authorization: LoginRequired
var LoginRequired = defaultClient.authentications['LoginRequired'];
LoginRequired.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//LoginRequired.apiKeyPrefix['session_id'] = "Token"

var api = new HortonApi.JobReportApi()
var body = ; // {{JobReport}} A new report to be created.

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

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

            // Configure API key authorization: LoginRequired
            Configuration.Default.ApiKey.Add("session_id", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("session_id", "Bearer");

            var apiInstance = new JobReportApi();
            var body = new JobReport(); // JobReport | A new report to be created.

            try
            {
                // Create a report
                apiInstance.createReport(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling JobReportApi.createReport: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LoginRequired
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('session_id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('session_id', 'Bearer');

$api_instance = new Swagger\Client\ApiJobReportApi();
$body = ; // JobReport | A new report to be created.

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

# Configure API key authorization: LoginRequired
$WWW::SwaggerClient::Configuration::api_key->{'session_id'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'session_id'} = "Bearer";

my $api_instance = WWW::SwaggerClient::JobReportApi->new();
my $body = WWW::SwaggerClient::Object::JobReport->new(); # JobReport | A new report to be created.

eval {
    $api_instance->createReport(body => $body);
};
if ($@) {
    warn "Exception when calling JobReportApi->createReport: $@\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: LoginRequired
swagger_client.configuration.api_key['session_id'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['session_id'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.JobReportApi()
body =  # JobReport | A new report to be created.

try:
    # Create a report
    api_instance.create_report(body)
except ApiException as e:
    print("Exception when calling JobReportApi->createReport: %s\n" % e)

Parameters

Body parameters
Name Description
body *
Query parameters
Name Description

Responses

Status: 201 - Successful response.

Status: 500 - Unable to create a new job report

{"code":500,"messages":"Unable to create a new report"}

deleteReport

Delete a Job Report

Deletes an existing report.


/jobReports/{jobReportId}

Usage and SDK Samples

curl -X DELETE\
\
-H "Accept: application/json"\
"/api/v1/jobReports/{jobReportId}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.JobReportApi;

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

public class JobReportApiExample {

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

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

        JobReportApi apiInstance = new JobReportApi();
        Integer jobReportId = 56; // Integer | A unique identifier for a Report.
        try {
            apiInstance.deleteReport(jobReportId);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobReportApi#deleteReport");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.JobReportApi;

public class JobReportApiExample {

    public static void main(String[] args) {
        JobReportApi apiInstance = new JobReportApi();
        Integer jobReportId = 56; // Integer | A unique identifier for a Report.
        try {
            apiInstance.deleteReport(jobReportId);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobReportApi#deleteReport");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: LoginRequired)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"session_id"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"session_id"];
Integer *jobReportId = 56; // A unique identifier for a Report.

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

// Delete a Job Report
[apiInstance deleteReportWith:jobReportId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HortonApi = require('horton_api');
var defaultClient = HortonApi.ApiClient.instance;

// Configure API key authorization: LoginRequired
var LoginRequired = defaultClient.authentications['LoginRequired'];
LoginRequired.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//LoginRequired.apiKeyPrefix['session_id'] = "Token"

var api = new HortonApi.JobReportApi()
var jobReportId = 56; // {{Integer}} A unique identifier for a Report.

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

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

            // Configure API key authorization: LoginRequired
            Configuration.Default.ApiKey.Add("session_id", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("session_id", "Bearer");

            var apiInstance = new JobReportApi();
            var jobReportId = 56;  // Integer | A unique identifier for a Report.

            try
            {
                // Delete a Job Report
                apiInstance.deleteReport(jobReportId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling JobReportApi.deleteReport: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LoginRequired
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('session_id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('session_id', 'Bearer');

$api_instance = new Swagger\Client\ApiJobReportApi();
$jobReportId = 56; // Integer | A unique identifier for a Report.

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

# Configure API key authorization: LoginRequired
$WWW::SwaggerClient::Configuration::api_key->{'session_id'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'session_id'} = "Bearer";

my $api_instance = WWW::SwaggerClient::JobReportApi->new();
my $jobReportId = 56; # Integer | A unique identifier for a Report.

eval {
    $api_instance->deleteReport(jobReportId => $jobReportId);
};
if ($@) {
    warn "Exception when calling JobReportApi->deleteReport: $@\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: LoginRequired
swagger_client.configuration.api_key['session_id'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['session_id'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.JobReportApi()
jobReportId = 56 # Integer | A unique identifier for a Report.

try:
    # Delete a Job Report
    api_instance.delete_report(jobReportId)
except ApiException as e:
    print("Exception when calling JobReportApi->deleteReport: %s\n" % e)

Parameters

Path parameters
Name Description
jobReportId*
Integer
A unique identifier for a Report.
Required
Query parameters
Name Description

Responses

Status: 204 - Successful response.

Status: 404 - Could not locate Report

{"code":404,"messages":"Report not found"}

Status: 500 - Unable to process request

{"code":500,"messages":"Unable to process request"}

getReportById

Get a job report

Gets the details of a single instance of a report.


/jobReports/{jobReportId}

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json"\
"/api/v1/jobReports/{jobReportId}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.JobReportApi;

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

public class JobReportApiExample {

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

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

        JobReportApi apiInstance = new JobReportApi();
        Integer jobReportId = 56; // Integer | A unique identifier for a report.
        try {
            JobReport result = apiInstance.getReportById(jobReportId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobReportApi#getReportById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.JobReportApi;

public class JobReportApiExample {

    public static void main(String[] args) {
        JobReportApi apiInstance = new JobReportApi();
        Integer jobReportId = 56; // Integer | A unique identifier for a report.
        try {
            JobReport result = apiInstance.getReportById(jobReportId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobReportApi#getReportById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: LoginRequired)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"session_id"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"session_id"];
Integer *jobReportId = 56; // A unique identifier for a report.

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

// Get a job report
[apiInstance getReportByIdWith:jobReportId
              completionHandler: ^(JobReport output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HortonApi = require('horton_api');
var defaultClient = HortonApi.ApiClient.instance;

// Configure API key authorization: LoginRequired
var LoginRequired = defaultClient.authentications['LoginRequired'];
LoginRequired.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//LoginRequired.apiKeyPrefix['session_id'] = "Token"

var api = new HortonApi.JobReportApi()
var jobReportId = 56; // {{Integer}} A unique identifier for a report.

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

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

            // Configure API key authorization: LoginRequired
            Configuration.Default.ApiKey.Add("session_id", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("session_id", "Bearer");

            var apiInstance = new JobReportApi();
            var jobReportId = 56;  // Integer | A unique identifier for a report.

            try
            {
                // Get a job report
                JobReport result = apiInstance.getReportById(jobReportId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling JobReportApi.getReportById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LoginRequired
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('session_id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('session_id', 'Bearer');

$api_instance = new Swagger\Client\ApiJobReportApi();
$jobReportId = 56; // Integer | A unique identifier for a report.

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

# Configure API key authorization: LoginRequired
$WWW::SwaggerClient::Configuration::api_key->{'session_id'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'session_id'} = "Bearer";

my $api_instance = WWW::SwaggerClient::JobReportApi->new();
my $jobReportId = 56; # Integer | A unique identifier for a report.

eval {
    my $result = $api_instance->getReportById(jobReportId => $jobReportId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling JobReportApi->getReportById: $@\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: LoginRequired
swagger_client.configuration.api_key['session_id'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['session_id'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.JobReportApi()
jobReportId = 56 # Integer | A unique identifier for a report.

try:
    # Get a job report
    api_response = api_instance.get_report_by_id(jobReportId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling JobReportApi->getReportById: %s\n" % e)

Parameters

Path parameters
Name Description
jobReportId*
Integer
A unique identifier for a report.
Required
Query parameters
Name Description

Responses

Status: 200 - Successful response - returns a single job report.

Status: 404 - Could not locate Report

{"code":404,"messages":"Report not found"}

Status: 500 - Unable to process request

{"code":500,"messages":"Unable to process request"}

getReports

Get all reports for logged in worker

Get all reports for the worker logged in.


/jobReports

Usage and SDK Samples

curl -X GET\
\
-H "Accept: application/json"\
"/api/v1/jobReports?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.JobReportApi;

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

public class JobReportApiExample {

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

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

        JobReportApi apiInstance = new JobReportApi();
        try {
            array[JobReport] result = apiInstance.getReports();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobReportApi#getReports");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.JobReportApi;

public class JobReportApiExample {

    public static void main(String[] args) {
        JobReportApi apiInstance = new JobReportApi();
        try {
            array[JobReport] result = apiInstance.getReports();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobReportApi#getReports");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: LoginRequired)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"session_id"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"session_id"];

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

// Get all reports for logged in worker
[apiInstance getReportsWithCompletionHandler:
              ^(array[JobReport] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HortonApi = require('horton_api');
var defaultClient = HortonApi.ApiClient.instance;

// Configure API key authorization: LoginRequired
var LoginRequired = defaultClient.authentications['LoginRequired'];
LoginRequired.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//LoginRequired.apiKeyPrefix['session_id'] = "Token"

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

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

            // Configure API key authorization: LoginRequired
            Configuration.Default.ApiKey.Add("session_id", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("session_id", "Bearer");

            var apiInstance = new JobReportApi();

            try
            {
                // Get all reports for logged in worker
                array[JobReport] result = apiInstance.getReports();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling JobReportApi.getReports: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LoginRequired
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('session_id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('session_id', 'Bearer');

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

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

# Configure API key authorization: LoginRequired
$WWW::SwaggerClient::Configuration::api_key->{'session_id'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'session_id'} = "Bearer";

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

eval {
    my $result = $api_instance->getReports();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling JobReportApi->getReports: $@\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: LoginRequired
swagger_client.configuration.api_key['session_id'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['session_id'] = 'Bearer'

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

try:
    # Get all reports for logged in worker
    api_response = api_instance.get_reports()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling JobReportApi->getReports: %s\n" % e)

Parameters

Query parameters
Name Description

Responses

Status: 200 - Successful response - returns an array of Job Report entities.

Status: 500 - Unable to retrieve reports

{"code":500,"messages":"Unable to retrieve reports"}

updateReport

Update a job report

Updates an existing job report.


/jobReports/{jobReportId}

Usage and SDK Samples

curl -X PUT\
\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/jobReports/{jobReportId}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.JobReportApi;

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

public class JobReportApiExample {

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

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

        JobReportApi apiInstance = new JobReportApi();
        JobReport body = ; // JobReport | Updated report information.
        Integer jobReportId = 56; // Integer | A unique identifier for a report.
        try {
            apiInstance.updateReport(body, jobReportId);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobReportApi#updateReport");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.JobReportApi;

public class JobReportApiExample {

    public static void main(String[] args) {
        JobReportApi apiInstance = new JobReportApi();
        JobReport body = ; // JobReport | Updated report information.
        Integer jobReportId = 56; // Integer | A unique identifier for a report.
        try {
            apiInstance.updateReport(body, jobReportId);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobReportApi#updateReport");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: LoginRequired)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"session_id"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"session_id"];
JobReport *body = ; // Updated report information.
Integer *jobReportId = 56; // A unique identifier for a report.

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

// Update a job report
[apiInstance updateReportWith:body
    jobReportId:jobReportId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HortonApi = require('horton_api');
var defaultClient = HortonApi.ApiClient.instance;

// Configure API key authorization: LoginRequired
var LoginRequired = defaultClient.authentications['LoginRequired'];
LoginRequired.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//LoginRequired.apiKeyPrefix['session_id'] = "Token"

var api = new HortonApi.JobReportApi()
var body = ; // {{JobReport}} Updated report information.
var jobReportId = 56; // {{Integer}} A unique identifier for a report.

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

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

            // Configure API key authorization: LoginRequired
            Configuration.Default.ApiKey.Add("session_id", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("session_id", "Bearer");

            var apiInstance = new JobReportApi();
            var body = new JobReport(); // JobReport | Updated report information.
            var jobReportId = 56;  // Integer | A unique identifier for a report.

            try
            {
                // Update a job report
                apiInstance.updateReport(body, jobReportId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling JobReportApi.updateReport: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: LoginRequired
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('session_id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('session_id', 'Bearer');

$api_instance = new Swagger\Client\ApiJobReportApi();
$body = ; // JobReport | Updated report information.
$jobReportId = 56; // Integer | A unique identifier for a report.

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

# Configure API key authorization: LoginRequired
$WWW::SwaggerClient::Configuration::api_key->{'session_id'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'session_id'} = "Bearer";

my $api_instance = WWW::SwaggerClient::JobReportApi->new();
my $body = WWW::SwaggerClient::Object::JobReport->new(); # JobReport | Updated report information.
my $jobReportId = 56; # Integer | A unique identifier for a report.

eval {
    $api_instance->updateReport(body => $body, jobReportId => $jobReportId);
};
if ($@) {
    warn "Exception when calling JobReportApi->updateReport: $@\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: LoginRequired
swagger_client.configuration.api_key['session_id'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['session_id'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.JobReportApi()
body =  # JobReport | Updated report information.
jobReportId = 56 # Integer | A unique identifier for a report.

try:
    # Update a job report
    api_instance.update_report(body, jobReportId)
except ApiException as e:
    print("Exception when calling JobReportApi->updateReport: %s\n" % e)

Parameters

Path parameters
Name Description
jobReportId*
Integer
A unique identifier for a report.
Required
Body parameters
Name Description
body *
Query parameters
Name Description

Responses

Status: 204 - Job report has been updated.

Status: 404 - Could not locate job report

{"code":404,"messages":"Job report not found"}

Status: 500 - Unable to process request

{"code":500,"messages":"Unable to process request"}