deviceDelete
Removes existing device
/devices
Usage and SDK Samples
curl -X delete -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://portal.trackme.lk/api/v1/devices?id=&uniqueId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .DevicesApi;
import java.io.File;
import java.util.*;
public class DevicesApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: TrackMe-Api-Key
ApiKeyAuth TrackMe-Api-Key = (ApiKeyAuth) defaultClient.getAuthentication("TrackMe-Api-Key");
TrackMe-Api-Key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TrackMe-Api-Key.setApiKeyPrefix("Token");
DevicesApi apiInstance = new DevicesApi();
Long id = 789; // Long | identifier of device to be deleted
String uniqueId = uniqueId_example; // String | IMEI of device to be deleted
try {
apiInstance.deviceDelete(id, uniqueId);
} catch (ApiException e) {
System.err.println("Exception when calling DevicesApi#deviceDelete");
e.printStackTrace();
}
}
}
import .DevicesApi;
public class DevicesApiExample {
public static void main(String[] args) {
DevicesApi apiInstance = new DevicesApi();
Long id = 789; // Long | identifier of device to be deleted
String uniqueId = uniqueId_example; // String | IMEI of device to be deleted
try {
apiInstance.deviceDelete(id, uniqueId);
} catch (ApiException e) {
System.err.println("Exception when calling DevicesApi#deviceDelete");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: TrackMe-Api-Key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"TrackMe-Api-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"TrackMe-Api-Key"];
Long *id = 789; // identifier of device to be deleted (optional)
String *uniqueId = uniqueId_example; // IMEI of device to be deleted (optional)
DevicesApi *apiInstance = [[DevicesApi alloc] init];
//
[apiInstance deviceDeleteWith:id
uniqueId:uniqueId
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var = require('');
var defaultClient = .ApiClient.instance;
// Configure API key authorization: TrackMe-Api-Key
var TrackMe-Api-Key = defaultClient.authentications['TrackMe-Api-Key'];
TrackMe-Api-Key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TrackMe-Api-Key.apiKeyPrefix['TrackMe-Api-Key'] = "Token"
var api = new .DevicesApi()
var opts = {
'id': 789, // {Long} identifier of device to be deleted
'uniqueId': uniqueId_example // {String} IMEI of device to be deleted
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.deviceDelete(opts, callback);
using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;
namespace Example
{
public class deviceDeleteExample
{
public void main()
{
// Configure API key authorization: TrackMe-Api-Key
Configuration.Default.ApiKey.Add("TrackMe-Api-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("TrackMe-Api-Key", "Bearer");
var apiInstance = new DevicesApi();
var id = 789; // Long | identifier of device to be deleted (optional)
var uniqueId = uniqueId_example; // String | IMEI of device to be deleted (optional)
try
{
//
apiInstance.deviceDelete(id, uniqueId);
}
catch (Exception e)
{
Debug.Print("Exception when calling DevicesApi.deviceDelete: " + e.Message );
}
}
}
}
setApiKey('TrackMe-Api-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// io.swagger.client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('TrackMe-Api-Key', 'Bearer');
$api_instance = new io.swagger.client\Api\DevicesApi();
$id = 789; // Long | identifier of device to be deleted
$uniqueId = uniqueId_example; // String | IMEI of device to be deleted
try {
$api_instance->deviceDelete($id, $uniqueId);
} catch (Exception $e) {
echo 'Exception when calling DevicesApi->deviceDelete: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Description |
---|---|
id | |
uniqueId |