Okappy Field Service Management
API and SDK Documentation
Default
getAllConnections
Get the list of customers or subcontractors
/connections/{type}
getAllCustomers
Get the list of customers
/customers
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://api.okappy.com/rest/v2/customers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
try {
getCustomersResponse result = apiInstance.getAllCustomers();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getAllCustomers");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
try {
getCustomersResponse result = apiInstance.getAllCustomers();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getAllCustomers");
e.printStackTrace();
}
}
}
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Get the list of customers
[apiInstance getAllCustomersWithCompletionHandler:
^(getCustomersResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAllCustomers(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getAllCustomersExample
{
public void main()
{
var apiInstance = new DefaultApi();
try
{
// Get the list of customers
getCustomersResponse result = apiInstance.getAllCustomers();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.getAllCustomers: " + e.Message );
}
}
}
}
getAllCustomers();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getAllCustomers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
eval {
my $result = $api_instance->getAllCustomers();
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->getAllCustomers: $@\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.DefaultApi()
try:
# Get the list of customers
api_response = api_instance.get_all_customers()
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->getAllCustomers: %s\n" % e)
Parameters
Responses
Status: 200 - OK
getAllDevices
Get the list of devices
/devices
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://api.okappy.com/rest/v2/devices"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
try {
getDevicesResponse result = apiInstance.getAllDevices();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getAllDevices");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
try {
getDevicesResponse result = apiInstance.getAllDevices();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getAllDevices");
e.printStackTrace();
}
}
}
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Get the list of devices
[apiInstance getAllDevicesWithCompletionHandler:
^(getDevicesResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAllDevices(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getAllDevicesExample
{
public void main()
{
var apiInstance = new DefaultApi();
try
{
// Get the list of devices
getDevicesResponse result = apiInstance.getAllDevices();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.getAllDevices: " + e.Message );
}
}
}
}
getAllDevices();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getAllDevices: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
eval {
my $result = $api_instance->getAllDevices();
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->getAllDevices: $@\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.DefaultApi()
try:
# Get the list of devices
api_response = api_instance.get_all_devices()
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->getAllDevices: %s\n" % e)
Parameters
Responses
Status: 200 - OK
getAllInvoices
Get the list of invoices
/invoices
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://api.okappy.com/rest/v2/invoices"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
try {
getInvoicesResponse result = apiInstance.getAllInvoices();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getAllInvoices");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
try {
getInvoicesResponse result = apiInstance.getAllInvoices();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getAllInvoices");
e.printStackTrace();
}
}
}
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Get the list of invoices
[apiInstance getAllInvoicesWithCompletionHandler:
^(getInvoicesResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAllInvoices(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getAllInvoicesExample
{
public void main()
{
var apiInstance = new DefaultApi();
try
{
// Get the list of invoices
getInvoicesResponse result = apiInstance.getAllInvoices();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.getAllInvoices: " + e.Message );
}
}
}
}
getAllInvoices();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getAllInvoices: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
eval {
my $result = $api_instance->getAllInvoices();
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->getAllInvoices: $@\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.DefaultApi()
try:
# Get the list of invoices
api_response = api_instance.get_all_invoices()
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->getAllInvoices: %s\n" % e)
Parameters
Responses
Status: 200 - OK
getAllJobs
Get the list of jobs
/jobs
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://api.okappy.com/rest/v2/jobs?limit=&offset="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
Integer limit = 56; // Integer | Limit the number of jobs returned. Minimum 1, Maximum 1000. Defaults to 1
Integer offset = 56; // Integer | Number of jobs to skip. Defaults to 0
try {
getJobsResponse result = apiInstance.getAllJobs(limit, offset);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getAllJobs");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
Integer limit = 56; // Integer | Limit the number of jobs returned. Minimum 1, Maximum 1000. Defaults to 1
Integer offset = 56; // Integer | Number of jobs to skip. Defaults to 0
try {
getJobsResponse result = apiInstance.getAllJobs(limit, offset);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getAllJobs");
e.printStackTrace();
}
}
}
Integer *limit = 56; // Limit the number of jobs returned. Minimum 1, Maximum 1000. Defaults to 1 (optional)
Integer *offset = 56; // Number of jobs to skip. Defaults to 0 (optional)
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Get the list of jobs
[apiInstance getAllJobsWith:limit
offset:offset
completionHandler: ^(getJobsResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var opts = {
'limit': 56, // {{Integer}} Limit the number of jobs returned. Minimum 1, Maximum 1000. Defaults to 1
'offset': 56 // {{Integer}} Number of jobs to skip. Defaults to 0
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAllJobs(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getAllJobsExample
{
public void main()
{
var apiInstance = new DefaultApi();
var limit = 56; // Integer | Limit the number of jobs returned. Minimum 1, Maximum 1000. Defaults to 1 (optional)
var offset = 56; // Integer | Number of jobs to skip. Defaults to 0 (optional)
try
{
// Get the list of jobs
getJobsResponse result = apiInstance.getAllJobs(limit, offset);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.getAllJobs: " + e.Message );
}
}
}
}
getAllJobs($limit, $offset);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getAllJobs: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $limit = 56; # Integer | Limit the number of jobs returned. Minimum 1, Maximum 1000. Defaults to 1
my $offset = 56; # Integer | Number of jobs to skip. Defaults to 0
eval {
my $result = $api_instance->getAllJobs(limit => $limit, offset => $offset);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->getAllJobs: $@\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.DefaultApi()
limit = 56 # Integer | Limit the number of jobs returned. Minimum 1, Maximum 1000. Defaults to 1 (optional)
offset = 56 # Integer | Number of jobs to skip. Defaults to 0 (optional)
try:
# Get the list of jobs
api_response = api_instance.get_all_jobs(limit=limit, offset=offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->getAllJobs: %s\n" % e)
Parameters
Name | Description |
---|---|
limit |
Integer
Limit the number of jobs returned. Minimum 1, Maximum 1000. Defaults to 1
|
offset |
Integer
Number of jobs to skip. Defaults to 0
|
Responses
Status: 200 - OK
getAllLocations
Get the list of locations
/locations
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://api.okappy.com/rest/v2/locations"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
try {
getLocationsResponse result = apiInstance.getAllLocations();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getAllLocations");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
try {
getLocationsResponse result = apiInstance.getAllLocations();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getAllLocations");
e.printStackTrace();
}
}
}
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Get the list of locations
[apiInstance getAllLocationsWithCompletionHandler:
^(getLocationsResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAllLocations(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getAllLocationsExample
{
public void main()
{
var apiInstance = new DefaultApi();
try
{
// Get the list of locations
getLocationsResponse result = apiInstance.getAllLocations();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.getAllLocations: " + e.Message );
}
}
}
}
getAllLocations();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getAllLocations: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
eval {
my $result = $api_instance->getAllLocations();
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->getAllLocations: $@\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.DefaultApi()
try:
# Get the list of locations
api_response = api_instance.get_all_locations()
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->getAllLocations: %s\n" % e)
Parameters
Responses
Status: 200 - OK
getAllUsers
Get the list of users
/users
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://api.okappy.com/rest/v2/users"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
try {
getUsersResponse result = apiInstance.getAllUsers();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getAllUsers");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
try {
getUsersResponse result = apiInstance.getAllUsers();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getAllUsers");
e.printStackTrace();
}
}
}
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Get the list of users
[apiInstance getAllUsersWithCompletionHandler:
^(getUsersResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAllUsers(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getAllUsersExample
{
public void main()
{
var apiInstance = new DefaultApi();
try
{
// Get the list of users
getUsersResponse result = apiInstance.getAllUsers();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.getAllUsers: " + e.Message );
}
}
}
}
getAllUsers();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getAllUsers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
eval {
my $result = $api_instance->getAllUsers();
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->getAllUsers: $@\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.DefaultApi()
try:
# Get the list of users
api_response = api_instance.get_all_users()
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->getAllUsers: %s\n" % e)
Parameters
Responses
Status: 200 - OK
getCustomer
Get details for a customer
/customers/{customerId}
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://api.okappy.com/rest/v2/customers/{customerId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
Integer customerId = 56; // Integer | The customer id of the customer.
try {
getCustomerDetailsResponse result = apiInstance.getCustomer(customerId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getCustomer");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
Integer customerId = 56; // Integer | The customer id of the customer.
try {
getCustomerDetailsResponse result = apiInstance.getCustomer(customerId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getCustomer");
e.printStackTrace();
}
}
}
Integer *customerId = 56; // The customer id of the customer.
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Get details for a customer
[apiInstance getCustomerWith:customerId
completionHandler: ^(getCustomerDetailsResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var customerId = 56; // {{Integer}} The customer id of the customer.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getCustomer(customerId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getCustomerExample
{
public void main()
{
var apiInstance = new DefaultApi();
var customerId = 56; // Integer | The customer id of the customer.
try
{
// Get details for a customer
getCustomerDetailsResponse result = apiInstance.getCustomer(customerId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.getCustomer: " + e.Message );
}
}
}
}
getCustomer($customerId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $customerId = 56; # Integer | The customer id of the customer.
eval {
my $result = $api_instance->getCustomer(customerId => $customerId);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->getCustomer: $@\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.DefaultApi()
customerId = 56 # Integer | The customer id of the customer.
try:
# Get details for a customer
api_response = api_instance.get_customer(customerId)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->getCustomer: %s\n" % e)
Parameters
Name | Description |
---|---|
customerId* |
Integer
The customer id of the customer.
Required
|
Responses
Status: 200 - OK
getDevice
Get the device details for a specific device
/devices/{deviceid}
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://api.okappy.com/rest/v2/devices/{deviceid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String deviceid = deviceid_example; // String | The device id of the device.
try {
getDeviceDetailsResponse result = apiInstance.getDevice(deviceid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getDevice");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String deviceid = deviceid_example; // String | The device id of the device.
try {
getDeviceDetailsResponse result = apiInstance.getDevice(deviceid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getDevice");
e.printStackTrace();
}
}
}
String *deviceid = deviceid_example; // The device id of the device.
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Get the device details for a specific device
[apiInstance getDeviceWith:deviceid
completionHandler: ^(getDeviceDetailsResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var deviceid = deviceid_example; // {{String}} The device id of the device.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getDevice(deviceid, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getDeviceExample
{
public void main()
{
var apiInstance = new DefaultApi();
var deviceid = deviceid_example; // String | The device id of the device.
try
{
// Get the device details for a specific device
getDeviceDetailsResponse result = apiInstance.getDevice(deviceid);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.getDevice: " + e.Message );
}
}
}
}
getDevice($deviceid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getDevice: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $deviceid = deviceid_example; # String | The device id of the device.
eval {
my $result = $api_instance->getDevice(deviceid => $deviceid);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->getDevice: $@\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.DefaultApi()
deviceid = deviceid_example # String | The device id of the device.
try:
# Get the device details for a specific device
api_response = api_instance.get_device(deviceid)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->getDevice: %s\n" % e)
Parameters
Name | Description |
---|---|
deviceid* |
String
The device id of the device.
Required
|
Responses
Status: 200 - OK
getInvoice
Get the invoice details for a specific invoice
/invoices/{invoiceid}
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://api.okappy.com/rest/v2/invoices/{invoiceid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
Integer invoiceid = 56; // Integer | The invoice id of the invoice.
try {
getInvoiceDetailsResponse result = apiInstance.getInvoice(invoiceid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getInvoice");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
Integer invoiceid = 56; // Integer | The invoice id of the invoice.
try {
getInvoiceDetailsResponse result = apiInstance.getInvoice(invoiceid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getInvoice");
e.printStackTrace();
}
}
}
Integer *invoiceid = 56; // The invoice id of the invoice.
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Get the invoice details for a specific invoice
[apiInstance getInvoiceWith:invoiceid
completionHandler: ^(getInvoiceDetailsResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var invoiceid = 56; // {{Integer}} The invoice id of the invoice.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getInvoice(invoiceid, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getInvoiceExample
{
public void main()
{
var apiInstance = new DefaultApi();
var invoiceid = 56; // Integer | The invoice id of the invoice.
try
{
// Get the invoice details for a specific invoice
getInvoiceDetailsResponse result = apiInstance.getInvoice(invoiceid);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.getInvoice: " + e.Message );
}
}
}
}
getInvoice($invoiceid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getInvoice: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $invoiceid = 56; # Integer | The invoice id of the invoice.
eval {
my $result = $api_instance->getInvoice(invoiceid => $invoiceid);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->getInvoice: $@\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.DefaultApi()
invoiceid = 56 # Integer | The invoice id of the invoice.
try:
# Get the invoice details for a specific invoice
api_response = api_instance.get_invoice(invoiceid)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->getInvoice: %s\n" % e)
Parameters
Name | Description |
---|---|
invoiceid* |
Integer
The invoice id of the invoice.
Required
|
Responses
Status: 200 - OK
getJob
Get the job details for a specific job
/jobs/{jobid}
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://api.okappy.com/rest/v2/jobs/{jobid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
Integer jobid = 56; // Integer | The job id of the job.
try {
getJobDetailsResponse result = apiInstance.getJob(jobid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getJob");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
Integer jobid = 56; // Integer | The job id of the job.
try {
getJobDetailsResponse result = apiInstance.getJob(jobid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getJob");
e.printStackTrace();
}
}
}
Integer *jobid = 56; // The job id of the job.
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Get the job details for a specific job
[apiInstance getJobWith:jobid
completionHandler: ^(getJobDetailsResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var jobid = 56; // {{Integer}} The job id of the job.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getJob(jobid, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getJobExample
{
public void main()
{
var apiInstance = new DefaultApi();
var jobid = 56; // Integer | The job id of the job.
try
{
// Get the job details for a specific job
getJobDetailsResponse result = apiInstance.getJob(jobid);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.getJob: " + e.Message );
}
}
}
}
getJob($jobid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getJob: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $jobid = 56; # Integer | The job id of the job.
eval {
my $result = $api_instance->getJob(jobid => $jobid);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->getJob: $@\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.DefaultApi()
jobid = 56 # Integer | The job id of the job.
try:
# Get the job details for a specific job
api_response = api_instance.get_job(jobid)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->getJob: %s\n" % e)
Parameters
Name | Description |
---|---|
jobid* |
Integer
The job id of the job.
Required
|
Responses
Status: 200 - OK
getJobTemplates
Get all job templates
/jobs/templates
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://api.okappy.com/rest/v2/jobs/templates"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
try {
getJobTemplatesResponse result = apiInstance.getJobTemplates();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getJobTemplates");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
try {
getJobTemplatesResponse result = apiInstance.getJobTemplates();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getJobTemplates");
e.printStackTrace();
}
}
}
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Get all job templates
[apiInstance getJobTemplatesWithCompletionHandler:
^(getJobTemplatesResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getJobTemplates(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getJobTemplatesExample
{
public void main()
{
var apiInstance = new DefaultApi();
try
{
// Get all job templates
getJobTemplatesResponse result = apiInstance.getJobTemplates();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.getJobTemplates: " + e.Message );
}
}
}
}
getJobTemplates();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getJobTemplates: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
eval {
my $result = $api_instance->getJobTemplates();
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->getJobTemplates: $@\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.DefaultApi()
try:
# Get all job templates
api_response = api_instance.get_job_templates()
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->getJobTemplates: %s\n" % e)
Parameters
Responses
Status: 200 - OK
getJobsForCustomer
Get all jobs for a customer
/customers/{customerId}/jobs
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://api.okappy.com/rest/v2/customers/{customerId}/jobs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
Integer customerId = 56; // Integer | The customer id of the customer.
try {
getJobsForCustomerResponse result = apiInstance.getJobsForCustomer(customerId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getJobsForCustomer");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
Integer customerId = 56; // Integer | The customer id of the customer.
try {
getJobsForCustomerResponse result = apiInstance.getJobsForCustomer(customerId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getJobsForCustomer");
e.printStackTrace();
}
}
}
Integer *customerId = 56; // The customer id of the customer.
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Get all jobs for a customer
[apiInstance getJobsForCustomerWith:customerId
completionHandler: ^(getJobsForCustomerResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var customerId = 56; // {{Integer}} The customer id of the customer.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getJobsForCustomer(customerId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getJobsForCustomerExample
{
public void main()
{
var apiInstance = new DefaultApi();
var customerId = 56; // Integer | The customer id of the customer.
try
{
// Get all jobs for a customer
getJobsForCustomerResponse result = apiInstance.getJobsForCustomer(customerId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.getJobsForCustomer: " + e.Message );
}
}
}
}
getJobsForCustomer($customerId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getJobsForCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $customerId = 56; # Integer | The customer id of the customer.
eval {
my $result = $api_instance->getJobsForCustomer(customerId => $customerId);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->getJobsForCustomer: $@\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.DefaultApi()
customerId = 56 # Integer | The customer id of the customer.
try:
# Get all jobs for a customer
api_response = api_instance.get_jobs_for_customer(customerId)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->getJobsForCustomer: %s\n" % e)
Parameters
Name | Description |
---|---|
customerId* |
Integer
The customer id of the customer.
Required
|
Responses
Status: 200 - OK
getUser
Get details of a user
/users/{userId}
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://api.okappy.com/rest/v2/users/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
Integer userId = 56; // Integer | The user id of the user.
try {
getUserDetailsResponse result = apiInstance.getUser(userId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getUser");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
Integer userId = 56; // Integer | The user id of the user.
try {
getUserDetailsResponse result = apiInstance.getUser(userId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getUser");
e.printStackTrace();
}
}
}
Integer *userId = 56; // The user id of the user.
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Get details of a user
[apiInstance getUserWith:userId
completionHandler: ^(getUserDetailsResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var userId = 56; // {{Integer}} The user id of the user.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getUser(userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getUserExample
{
public void main()
{
var apiInstance = new DefaultApi();
var userId = 56; // Integer | The user id of the user.
try
{
// Get details of a user
getUserDetailsResponse result = apiInstance.getUser(userId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.getUser: " + e.Message );
}
}
}
}
getUser($userId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $userId = 56; # Integer | The user id of the user.
eval {
my $result = $api_instance->getUser(userId => $userId);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->getUser: $@\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.DefaultApi()
userId = 56 # Integer | The user id of the user.
try:
# Get details of a user
api_response = api_instance.get_user(userId)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->getUser: %s\n" % e)
Parameters
Name | Description |
---|---|
userId* |
Integer
The user id of the user.
Required
|
Responses
Status: 200 - OK
postJob
Add a new job
/jobs
Usage and SDK Samples
curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://api.okappy.com/rest/v2/jobs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
PostJobPayload body = ; // PostJobPayload |
try {
postJobsResponse result = apiInstance.postJob(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#postJob");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
PostJobPayload body = ; // PostJobPayload |
try {
postJobsResponse result = apiInstance.postJob(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#postJob");
e.printStackTrace();
}
}
}
PostJobPayload *body = ; // (optional)
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Add a new job
[apiInstance postJobWith:body
completionHandler: ^(postJobsResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var opts = {
'body': // {{PostJobPayload}}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.postJob(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class postJobExample
{
public void main()
{
var apiInstance = new DefaultApi();
var body = new PostJobPayload(); // PostJobPayload | (optional)
try
{
// Add a new job
postJobsResponse result = apiInstance.postJob(body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.postJob: " + e.Message );
}
}
}
}
postJob($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->postJob: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $body = WWW::SwaggerClient::Object::PostJobPayload->new(); # PostJobPayload |
eval {
my $result = $api_instance->postJob(body => $body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->postJob: $@\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.DefaultApi()
body = # PostJobPayload | (optional)
try:
# Add a new job
api_response = api_instance.post_job(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->postJob: %s\n" % e)
Parameters
Name | Description |
---|---|
body |
Responses
Status: 200 - OK
updateJob
Update the job details for a specific job
/jobs/{jobid}
Usage and SDK Samples
curl -X PUT\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://api.okappy.com/rest/v2/jobs/{jobid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
Integer jobid = 56; // Integer | The job id of the job.
UpdateJobPayload body = ; // UpdateJobPayload |
try {
updateJobResponse result = apiInstance.updateJob(jobid, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#updateJob");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
Integer jobid = 56; // Integer | The job id of the job.
UpdateJobPayload body = ; // UpdateJobPayload |
try {
updateJobResponse result = apiInstance.updateJob(jobid, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#updateJob");
e.printStackTrace();
}
}
}
Integer *jobid = 56; // The job id of the job.
UpdateJobPayload *body = ; // (optional)
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Update the job details for a specific job
[apiInstance updateJobWith:jobid
body:body
completionHandler: ^(updateJobResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OkappyFieldServiceManagement = require('okappy_field_service_management');
var api = new OkappyFieldServiceManagement.DefaultApi()
var jobid = 56; // {{Integer}} The job id of the job.
var opts = {
'body': // {{UpdateJobPayload}}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.updateJob(jobid, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class updateJobExample
{
public void main()
{
var apiInstance = new DefaultApi();
var jobid = 56; // Integer | The job id of the job.
var body = new UpdateJobPayload(); // UpdateJobPayload | (optional)
try
{
// Update the job details for a specific job
updateJobResponse result = apiInstance.updateJob(jobid, body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.updateJob: " + e.Message );
}
}
}
}
updateJob($jobid, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->updateJob: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $jobid = 56; # Integer | The job id of the job.
my $body = WWW::SwaggerClient::Object::UpdateJobPayload->new(); # UpdateJobPayload |
eval {
my $result = $api_instance->updateJob(jobid => $jobid, body => $body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->updateJob: $@\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.DefaultApi()
jobid = 56 # Integer | The job id of the job.
body = # UpdateJobPayload | (optional)
try:
# Update the job details for a specific job
api_response = api_instance.update_job(jobid, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->updateJob: %s\n" % e)
Parameters
Name | Description |
---|---|
jobid* |
Integer
The job id of the job.
Required
|
Name | Description |
---|---|
body |