Introduction
How to use this document
Each data endpoint of Keydeploy is accessible via connection with the API. The API documentation gives reference to connect to each data endpoint with command examples. The API will allow the information to be shared with other enterprise systems such as an ERP. The user of the API will need to construct their commands to read out the information necessary for their business use case.
Assumptions, clarifications, and exceptions
- The API user will have the requisite skills to construct their API connection to support the business use case.
- There are no implied warranties or merchantability for the results of the API.
- Any necessary support for the implementation of the users API connection will require a T&M PO to Blair Technology Group prior to the initiation of the support.
Base URL
https://api.keydeploy.netAuthenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
Your token can be created and issued upon request to support@keydeploy.com
Diagnostics
Endpoint for all information related to hardware diagnostics
Get Diag History
requires authentication
Get all matching diagnostic history events
Limit of 1000 records
**The query parameters startDate or endDate are mutually required, if one is present the other must also be.
Example request:
curl -X GET \
-G "https://api.keydeploy.net/api/v1/diag/history?machineSerial=ABCDEFG&type=CPU&status=PASSED&startDate=2020-01-01+00%3A00%3A00&endDate=2020-01-01+23%3A59%3A59" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.keydeploy.net/api/v1/diag/history"
);
let params = {
"machineSerial": "ABCDEFG",
"type": "CPU",
"status": "PASSED",
"startDate": "2020-01-01 00:00:00",
"endDate": "2020-01-01 23:59:59",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.keydeploy.net/api/v1/diag/history',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'query' => [
'machineSerial'=> 'ABCDEFG',
'type'=> 'CPU',
'status'=> 'PASSED',
'startDate'=> '2020-01-01 00:00:00',
'endDate'=> '2020-01-01 23:59:59',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.keydeploy.net/api/v1/diag/history'
params = {
'machineSerial': 'ABCDEFG',
'type': 'CPU',
'status': 'PASSED',
'startDate': '2020-01-01 00:00:00',
'endDate': '2020-01-01 23:59:59',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200, Success):
{
"message": "Records pulled successfully",
"data": {
"ABCDEFG": [
{
"ID": "1",
"Type": "MEMORY",
"Status": "STARTED",
"Date": "2020-01-01 00:00:00"
},
{
"ID": "2",
"Type": "CPU",
"Status": "STARTED",
"Date": "2020-01-01 00:00:00"
},
{
"ID": "3",
"Type": "STORAGE",
"Status": "STARTED",
"Date": "2020-01-01 00:00:00"
},
{
"ID": "4",
"Type": "CPU",
"Status": "PASSED",
"Date": "2020-01-01 23:59:59"
},
{
"ID": "5",
"Type": "STORAGE",
"Status": "FAILED",
"Date": "2020-01-01 23:59:59"
},
{
"ID": "6",
"Type": "MEMORY",
"Status": "PASSED",
"Date": "2020-01-01 23:59:59"
}
]
}
}
Example response (400, No matching records):
{
"message": "No records found"
}
Received response:
Request failed with error:
DPK
All information related to Digital Product Keys
Get DPK Info
requires authentication
Get information for any matching Digital Product Keys for the given search criteria
You must select at least one filter for your search
Limit of 1000 records
Example request:
curl -X GET \
-G "https://api.keydeploy.net/api/v1/dpk?machineSerial=ABCDEFG&productKeyID=0123456789012&productKey=AAAAA-BBBBB-CCCCC-DDDDD-EEEEE" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.keydeploy.net/api/v1/dpk"
);
let params = {
"machineSerial": "ABCDEFG",
"productKeyID": "0123456789012",
"productKey": "AAAAA-BBBBB-CCCCC-DDDDD-EEEEE",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.keydeploy.net/api/v1/dpk',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'query' => [
'machineSerial'=> 'ABCDEFG',
'productKeyID'=> '0123456789012',
'productKey'=> 'AAAAA-BBBBB-CCCCC-DDDDD-EEEEE',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.keydeploy.net/api/v1/dpk'
params = {
'machineSerial': 'ABCDEFG',
'productKeyID': '0123456789012',
'productKey': 'AAAAA-BBBBB-CCCCC-DDDDD-EEEEE',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200, Success):
{
"message": "Records pulled successfully",
"data": [
{
"InstanceID": "1",
"ProductKeyID": "0123456789012",
"ProductKey": "AAAAA-BBBBB-CCCCC-DDDDD-EEEEE",
"MachineSerial": "ABCDEFG",
"CoaType": "10P",
"BusinessID": "10001",
"DateAdded": "2020-01-01 00:00:00"
}
]
}
Example response (400, No matching records):
{
"message": "No records found"
}
Received response:
Request failed with error:
Machines
APIs endpoints and calls for Machines
Get Machine Info
requires authentication
Get all the basic information for a machine
You must select at least one filter for your search
Example request:
curl -X GET \
-G "https://api.keydeploy.net/api/v1/machine?machineSerial=ABCDEFG&assetTag=ASSET123&purchaseOrder=PO123&brand=HP&model=800G3&formFactor=Tower&grade=A%2B&gradeComment=Broken+screen&generalComment=Stickers+on+lid&webcam=Yes&touchscreen=No&wifi=Yes&bluetooth=No&cardreader=Yes&defect=Lid+Damage" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.keydeploy.net/api/v1/machine"
);
let params = {
"machineSerial": "ABCDEFG",
"assetTag": "ASSET123",
"purchaseOrder": "PO123",
"brand": "HP",
"model": "800G3",
"formFactor": "Tower",
"grade": "A+",
"gradeComment": "Broken screen",
"generalComment": "Stickers on lid",
"webcam": "Yes",
"touchscreen": "No",
"wifi": "Yes",
"bluetooth": "No",
"cardreader": "Yes",
"defect": "Lid Damage",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.keydeploy.net/api/v1/machine',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'query' => [
'machineSerial'=> 'ABCDEFG',
'assetTag'=> 'ASSET123',
'purchaseOrder'=> 'PO123',
'brand'=> 'HP',
'model'=> '800G3',
'formFactor'=> 'Tower',
'grade'=> 'A+',
'gradeComment'=> 'Broken screen',
'generalComment'=> 'Stickers on lid',
'webcam'=> 'Yes',
'touchscreen'=> 'No',
'wifi'=> 'Yes',
'bluetooth'=> 'No',
'cardreader'=> 'Yes',
'defect'=> 'Lid Damage',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.keydeploy.net/api/v1/machine'
params = {
'machineSerial': 'ABCDEFG',
'assetTag': 'ASSET123',
'purchaseOrder': 'PO123',
'brand': 'HP',
'model': '800G3',
'formFactor': 'Tower',
'grade': 'A+',
'gradeComment': 'Broken screen',
'generalComment': 'Stickers on lid',
'webcam': 'Yes',
'touchscreen': 'No',
'wifi': 'Yes',
'bluetooth': 'No',
'cardreader': 'Yes',
'defect': 'Lid Damage',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200, Success):
{
"message": "Records pulled successfully",
"data": {
"ABCDEFG": {
"serial": "ABCDEFG",
"AssetTag": "ASSET123",
"PurchaseOrder": "PO123",
"Grade": "A+",
"GradeComments": "stickers on lid",
"GeneralComments": "backlit keyboard",
"Brand": "Hewlett-Packard",
"Model": "HP EliteBook 8440p",
"FormFactor": "Laptop",
"CurrentSpecs": {
"Processor": "Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz",
"Memory": [
{
"sku": "RAM-SODIMM-2048-DDR3-1333",
"serial": "12345"
},
{
"sku": "RAM-SODIMM-2048-DDR3-1333",
"serial": "67890"
}
],
"Storage": [
{
"sku": "HDD-SATA-250GB",
"serial": "123"
},
{
"sku": "HDD-SATA-16GB",
"serial": "456"
}
],
"Opticals": [
{
"sku": "hp CDDVDW TS-L633R"
}
],
"VideoCards": [
{
"sku": "VEN_80EE&DEV_BEEF&SUBSYS_040515AD"
}
]
},
"Webcam": "Yes",
"Touchscreen": "No",
"Wifi": "Yes",
"Bluetooth": "No",
"Cardreader": "Yes",
"Defects": [
"Bad Battery"
]
}
}
}
Example response (400, No matching records):
{
"message": "No records found"
}
Received response:
Request failed with error:
Get Spec History
requires authentication
Get the spec history events for the specs captured in a machine
**The query parameters startDate or endDate are mutually required, if one is present the other must also be.
Example request:
curl -X GET \
-G "https://api.keydeploy.net/api/v1/machine/specs/history?machineSerial=ABCDEFG&startDate=2020-01-01+00%3A00%3A00&endDate=2020-01-01+23%3A59%3A59" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.keydeploy.net/api/v1/machine/specs/history"
);
let params = {
"machineSerial": "ABCDEFG",
"startDate": "2020-01-01 00:00:00",
"endDate": "2020-01-01 23:59:59",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.keydeploy.net/api/v1/machine/specs/history',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'query' => [
'machineSerial'=> 'ABCDEFG',
'startDate'=> '2020-01-01 00:00:00',
'endDate'=> '2020-01-01 23:59:59',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.keydeploy.net/api/v1/machine/specs/history'
params = {
'machineSerial': 'ABCDEFG',
'startDate': '2020-01-01 00:00:00',
'endDate': '2020-01-01 23:59:59',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200, Success):
{
"message": "Records pulled successfully",
"data": {
"ABCDEFG": [
{
"EventID": "2",
"Date": "2020-01-01 23:59:59",
"MachineSerial": "ABCDEFG",
"EventType": "SPEC-CAPTURE",
"Processor": "Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz",
"Memory": [
{
"sku": "RAM-SODIMM-4096-DDR3-1600",
"serial": "12345"
},
{
"sku": "RAM-SODIMM-4096-DDR3-1600",
"serial": "67890"
}
],
"Storage": [
{
"sku": "HDD-SATA-128GB-SSD",
"serial": "123"
}
],
"Opticals": [
{
"sku": "hp CDDVDW TS-L633R"
}
],
"VideoCards": [ [
{
"sku": "VEN_80EE&DEV_BEEF&SUBSYS_040515AD"
}
]
},
{
"EventID": "1",
"Date": "2020-01-01 00:00:00",
"MachineSerial": "ABCDEFG",
"EventType": "EDIT",
"Processor": "Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz",
"Memory": [
{
"sku": "RAM-SODIMM-4096-DDR3-1600",
"serial": "12345"
}
],
"Storage": [],
"Opticals": [],
"VideoCards": []
}
]
}
}
Example response (400, No matching records):
{
"message": "No records found"
}
Received response:
Request failed with error:
Get History
requires authentication
Get a list of all history events for a given machine serial **The query parameters startDate or endDate are mutually required, if one is present the other must also be.
Example request:
curl -X GET \
-G "https://api.keydeploy.net/api/v1/machine/history?machineSerial=ABCDEFG&startDate=2020-01-01+00%3A00%3A00&endDate=2020-01-01+23%3A59%3A59&employeeID=101" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.keydeploy.net/api/v1/machine/history"
);
let params = {
"machineSerial": "ABCDEFG",
"startDate": "2020-01-01 00:00:00",
"endDate": "2020-01-01 23:59:59",
"employeeID": "101",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.keydeploy.net/api/v1/machine/history',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'query' => [
'machineSerial'=> 'ABCDEFG',
'startDate'=> '2020-01-01 00:00:00',
'endDate'=> '2020-01-01 23:59:59',
'employeeID'=> '101',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.keydeploy.net/api/v1/machine/history'
params = {
'machineSerial': 'ABCDEFG',
'startDate': '2020-01-01 00:00:00',
'endDate': '2020-01-01 23:59:59',
'employeeID': '101',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200, Success):
{ * {
"message": "Records pulled successfully",
"data": {
"ABCDEFG": [
{
"EventID": "2",
"Date": "2020-01-01 23:59:59",
"Event": "Machine Specs Captured",
"EventType": "SPEC-CAPTURE",
"EmployeeID": "22",
"MachineSerial": "ABCDEFG"
},
{
"EventID": "1",
"Date": "2020-01-01 00:00:00",
"Event": "Machine Specs Captured",
"EventType": "SPEC-CAPTURE",
"EmployeeID": "11",
"MachineSerial": "ABCDEFG"
}
]
}
}
Example response (400, No matching records):
{
"message": "No records found"
}
Received response:
Request failed with error:
Get Imaging history
requires authentication
Get a list of the machine imaging history **The query parameters startDate or endDate are mutually required, if one is present the other must also be.
Example request:
curl -X GET \
-G "https://api.keydeploy.net/api/v1/machine/imaging/history?machineSerial=ABCDEFG&startDate=2020-01-01+00%3A00%3A00&endDate=2020-01-01+23%3A59%3A59" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.keydeploy.net/api/v1/machine/imaging/history"
);
let params = {
"machineSerial": "ABCDEFG",
"startDate": "2020-01-01 00:00:00",
"endDate": "2020-01-01 23:59:59",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.keydeploy.net/api/v1/machine/imaging/history',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'query' => [
'machineSerial'=> 'ABCDEFG',
'startDate'=> '2020-01-01 00:00:00',
'endDate'=> '2020-01-01 23:59:59',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.keydeploy.net/api/v1/machine/imaging/history'
params = {
'machineSerial': 'ABCDEFG',
'startDate': '2020-01-01 00:00:00',
'endDate': '2020-01-01 23:59:59',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200, Success):
{{
"message": "Records pulled successfully",
"data": {
"ABCDEFG": [
{
"EventID": "2",
"Date": "2020-01-01 23:59:59",
"Event": "Sealing Windows To OOBE",
"WindowsEdition": "Windows 10 Home",
"MachineSerial": "ABCDEFG"
},
{
"EventID": "1",
"Date": "2020-01-01 00:00:00",
"Event": "Booting To Audit Mode",
"WindowsEdition": "Windows 10 Home",
"MachineSerial": "ABCDEFG"
}
]
}
}
Example response (400, No matching records):
{
"message": "No records found"
}
Received response:
Request failed with error:
Update Machine Purchase Order
requires authentication
Update the purchase order for a given machine
Example request:
curl -X POST \
"https://api.keydeploy.net/api/v1/machine/purchaseOrder" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"machineSerial":"ABCDEFG","purchaseOrder":"PO-123"}'
const url = new URL(
"https://api.keydeploy.net/api/v1/machine/purchaseOrder"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"machineSerial": "ABCDEFG",
"purchaseOrder": "PO-123"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.keydeploy.net/api/v1/machine/purchaseOrder',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'json' => [
'machineSerial' => 'ABCDEFG',
'purchaseOrder' => 'PO-123',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.keydeploy.net/api/v1/machine/purchaseOrder'
payload = {
"machineSerial": "ABCDEFG",
"purchaseOrder": "PO-123"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200, Success):
{
"message": "Records updated successfully (1)",
"data": []
}
Example response (400, Purchase order already set):
{
"message": "The given serial already has the specified purchase order number, update was not run",
"data": []
}
Example response (400, No matching machine serial):
{
"message": "No records found"
}
Received response:
Request failed with error:
Update Machine Asset Tag
requires authentication
Update the asset tag for a given machine
Example request:
curl -X POST \
"https://api.keydeploy.net/api/v1/machine/assetTag" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"machineSerial":"ABCDEFG","assetTag":"XYZ-123"}'
const url = new URL(
"https://api.keydeploy.net/api/v1/machine/assetTag"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"machineSerial": "ABCDEFG",
"assetTag": "XYZ-123"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.keydeploy.net/api/v1/machine/assetTag',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'json' => [
'machineSerial' => 'ABCDEFG',
'assetTag' => 'XYZ-123',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.keydeploy.net/api/v1/machine/assetTag'
payload = {
"machineSerial": "ABCDEFG",
"assetTag": "XYZ-123"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200, Success):
{
"message": "Records updated successfully (1)",
"data": []
}
Example response (400, Asset tag already set):
{
"message": "The given serial already has the specified asset tag, update was not run",
"data": []
}
Example response (400, No matching machine serial):
{
"message": "No records found"
}
Received response:
Request failed with error:
Scheduled Tasks
View or Add scheduled tasks for a given computer serial
Get Tasks
requires authentication
Get a list of all scheduled tasks
You must select at least one filter for your search
Limit of 1000 records
**The query parameters startDate or endDate are mutually required, if one is present the other must also be.
Example request:
curl -X GET \
-G "https://api.keydeploy.net/api/v1/task?machineSerial=ABCDEFG&type=Imaging&status=Imaging&startDate=2020-01-01+00%3A00%3A00&endDate=2020-01-01+23%3A59%3A59" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.keydeploy.net/api/v1/task"
);
let params = {
"machineSerial": "ABCDEFG",
"type": "Imaging",
"status": "Imaging",
"startDate": "2020-01-01 00:00:00",
"endDate": "2020-01-01 23:59:59",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.keydeploy.net/api/v1/task',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'query' => [
'machineSerial'=> 'ABCDEFG',
'type'=> 'Imaging',
'status'=> 'Imaging',
'startDate'=> '2020-01-01 00:00:00',
'endDate'=> '2020-01-01 23:59:59',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.keydeploy.net/api/v1/task'
params = {
'machineSerial': 'ABCDEFG',
'type': 'Imaging',
'status': 'Imaging',
'startDate': '2020-01-01 00:00:00',
'endDate': '2020-01-01 23:59:59',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200, Success):
{
"message": "Records pulled successfully",
"data": [
{
"ID": "4",
"MachineSerial": "ABCDEFG",
"Status": "COMPLETED",
"Type": "Diag",
"Settings": [
"Hard-Drive"
],
"ScheduledDate": "2020-01-01 00:00:00"
},
{
"ID": "3",
"MachineSerial": "ABCDEFG",
"Status": "SCHEDULED",
"Type": "Specs",
"Settings": [
"CaptureSpecs"
],
"ScheduledDate": "2020-01-01 00:00:00"
},
{
"ID": "2",
"MachineSerial": "ABCDEFG",
"Status": "CANCELED",
"Type": "Specs",
"Settings": [
"CaptureSpecs"
],
"ScheduledDate": "2020-01-01 00:00:00"
},
{
"ID": "1",
"MachineSerial": "ABCDEFG",
"Status": "SCHEDULED",
"Type": "Wiping",
"Settings": [
"wipe_type":"NIST 800-88 Clear"
],
"ScheduledDate": "2020-01-01 00:00:00"
}
]
}
Example response (400, No matching records):
{
"message": "No records found"
}
Received response:
Request failed with error:
Schedule a Wiping Task
requires authentication
Schedule a wiping task for a given computer serial
Example request:
curl -X POST \
"https://api.keydeploy.net/api/v1/task/wiping" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"machineSerial":"ABCDEFG","wipeType":"NIST 800-88 Clear"}'
const url = new URL(
"https://api.keydeploy.net/api/v1/task/wiping"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"machineSerial": "ABCDEFG",
"wipeType": "NIST 800-88 Clear"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.keydeploy.net/api/v1/task/wiping',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'json' => [
'machineSerial' => 'ABCDEFG',
'wipeType' => 'NIST 800-88 Clear',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.keydeploy.net/api/v1/task/wiping'
payload = {
"machineSerial": "ABCDEFG",
"wipeType": "NIST 800-88 Clear"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200, Success):
{
"message": "Task has been successfully scheduled. Any previously scheduled tasks for the same task type have been canceled.",
"data": {
"taskID": "1"
}
}
Received response:
Request failed with error:
Schedule a Spec Capture Task
requires authentication
Schedule a spec capture task for a given computer serial
Example request:
curl -X POST \
"https://api.keydeploy.net/api/v1/task/specs" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"machineSerial":"ABCDEFG"}'
const url = new URL(
"https://api.keydeploy.net/api/v1/task/specs"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"machineSerial": "ABCDEFG"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.keydeploy.net/api/v1/task/specs',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'json' => [
'machineSerial' => 'ABCDEFG',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.keydeploy.net/api/v1/task/specs'
payload = {
"machineSerial": "ABCDEFG"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200, Success):
{
"message": "Task has been successfully scheduled. Any previously scheduled tasks for the same task type have been canceled.",
"data": {
"taskID": "1"
}
}
Received response:
Request failed with error:
Schedule a Imaging Task
requires authentication
Schedule a imaging task for a given computer serial
Example request:
curl -X POST \
"https://api.keydeploy.net/api/v1/task/imaging" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"machineSerial":"ABCDEFG","imageName":"Windows 10 Home 64-bit","useDPK":true}'
const url = new URL(
"https://api.keydeploy.net/api/v1/task/imaging"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"machineSerial": "ABCDEFG",
"imageName": "Windows 10 Home 64-bit",
"useDPK": true
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.keydeploy.net/api/v1/task/imaging',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'json' => [
'machineSerial' => 'ABCDEFG',
'imageName' => 'Windows 10 Home 64-bit',
'useDPK' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.keydeploy.net/api/v1/task/imaging'
payload = {
"machineSerial": "ABCDEFG",
"imageName": "Windows 10 Home 64-bit",
"useDPK": true
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200, Success):
{
"message": "Task has been successfully scheduled. Any previously scheduled tasks for the same task type have been canceled.",
"data": {
"taskID": "1"
}
}
Received response:
Request failed with error:
Schedule a Diag Task
requires authentication
Schedule a diagnostics task for a given computer serial
Example request:
curl -X POST \
"https://api.keydeploy.net/api/v1/task/diag" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"machineSerial":"ABCDEFG","testType":"Memory"}'
const url = new URL(
"https://api.keydeploy.net/api/v1/task/diag"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"machineSerial": "ABCDEFG",
"testType": "Memory"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.keydeploy.net/api/v1/task/diag',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'json' => [
'machineSerial' => 'ABCDEFG',
'testType' => 'Memory',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.keydeploy.net/api/v1/task/diag'
payload = {
"machineSerial": "ABCDEFG",
"testType": "Memory"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200, Success):
{
"message": "Task has been successfully scheduled. Any previously scheduled tasks for the same task type have been canceled.",
"data": {
"taskID": "1"
}
}
Received response:
Request failed with error:
Storage Drive
Get information related to storage drives / hard drives
Get Wiping History
requires authentication
Get the storage drive wiping history events for a given computer serial or hard drive serial.
Limit of 1000 records
**The query parameters startDate or endDate are mutually required, if one is present the other must also be.
Example request:
curl -X GET \
-G "https://api.keydeploy.net/api/v1/storageDrive/wiping?machineSerial=ABCDEFG&storageDriveSerial=0123456789&startDate=2020-01-01+00%3A00%3A00&endDate=2020-01-01+23%3A59%3A59" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.keydeploy.net/api/v1/storageDrive/wiping"
);
let params = {
"machineSerial": "ABCDEFG",
"storageDriveSerial": "0123456789",
"startDate": "2020-01-01 00:00:00",
"endDate": "2020-01-01 23:59:59",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.keydeploy.net/api/v1/storageDrive/wiping',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'query' => [
'machineSerial'=> 'ABCDEFG',
'storageDriveSerial'=> '0123456789',
'startDate'=> '2020-01-01 00:00:00',
'endDate'=> '2020-01-01 23:59:59',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.keydeploy.net/api/v1/storageDrive/wiping'
params = {
'machineSerial': 'ABCDEFG',
'storageDriveSerial': '0123456789',
'startDate': '2020-01-01 00:00:00',
'endDate': '2020-01-01 23:59:59',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200, Success):
{
"message": "Records pulled successfully"
"data": {
"Serial": "0123456789",
"SKU": "HDD-SATA-500GB",
"Capacity": "500",
"MachineSerial": "ABCDEFG",
"WipeEvents": {
"NIST 800-88 Clear": [
{
"ID": "1",
"Date": "2020-01-01 00:00:00",
"Status": "STARTED"
},
{
"ID": "2",
"Date": "2020-01-01 00:01:00",
"Status": "COMPLETED"
}
]
}
}
}
Example response (400, No matching records):
{
"message": "No records found"
}
Received response:
Request failed with error: