deleteJob
Delete vrp job
Kill the job. This operation may have delay, since if the job is working it will be killed during the next iteration.
/0.1/vrp/jobs/{id}
Usage and SDK Samples
curl -X DELETE "http://optimizer.mapotempo.com/0.1/vrp/jobs/{id}?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VrpApi;
import java.io.File;
import java.util.*;
public class VrpApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key_query_param
ApiKeyAuth api_key_query_param = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query_param");
api_key_query_param.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key_query_param.setApiKeyPrefix("Token");
VrpApi apiInstance = new VrpApi();
String id = id_example; // String | Job id returned by creating VRP problem.
try {
apiInstance.deleteJob(id);
} catch (ApiException e) {
System.err.println("Exception when calling VrpApi#deleteJob");
e.printStackTrace();
}
}
}
import io.swagger.client.api.VrpApi;
public class VrpApiExample {
public static void main(String[] args) {
VrpApi apiInstance = new VrpApi();
String id = id_example; // String | Job id returned by creating VRP problem.
try {
apiInstance.deleteJob(id);
} catch (ApiException e) {
System.err.println("Exception when calling VrpApi#deleteJob");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key_query_param)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
String *id = id_example; // Job id returned by creating VRP problem.
VrpApi *apiInstance = [[VrpApi alloc] init];
// Delete vrp job
[apiInstance deleteJobWith:id
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OptimizersApi = require('optimizers_api');
var defaultClient = OptimizersApi.ApiClient.instance;
// Configure API key authorization: api_key_query_param
var api_key_query_param = defaultClient.authentications['api_key_query_param'];
api_key_query_param.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key_query_param.apiKeyPrefix['api_key'] = "Token"
var api = new OptimizersApi.VrpApi()
var id = id_example; // {String} Job id returned by creating VRP problem.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.deleteJob(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class deleteJobExample
{
public void main()
{
// Configure API key authorization: api_key_query_param
Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("api_key", "Bearer");
var apiInstance = new VrpApi();
var id = id_example; // String | Job id returned by creating VRP problem.
try
{
// Delete vrp job
apiInstance.deleteJob(id);
}
catch (Exception e)
{
Debug.Print("Exception when calling VrpApi.deleteJob: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key_query_param
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');
$api_instance = new Swagger\Client\Api\VrpApi();
$id = id_example; // String | Job id returned by creating VRP problem.
try {
$api_instance->deleteJob($id);
} catch (Exception $e) {
echo 'Exception when calling VrpApi->deleteJob: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VrpApi;
# Configure API key authorization: api_key_query_param
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";
my $api_instance = WWW::SwaggerClient::VrpApi->new();
my $id = id_example; # String | Job id returned by creating VRP problem.
eval {
$api_instance->deleteJob(id => $id);
};
if ($@) {
warn "Exception when calling VrpApi->deleteJob: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key_query_param
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.VrpApi()
id = id_example # String | Job id returned by creating VRP problem.
try:
# Delete vrp job
api_instance.delete_job(id)
except ApiException as e:
print("Exception when calling VrpApi->deleteJob: %s\n" % e)
Parameters
Name | Description |
---|---|
id* |
String
Job id returned by creating VRP problem.
Required
|
Name | Description |
---|