Create Devices
/unified/mdm/devices
Query Parameters
Refer Specifying query parameters in Truto APIs
The type/category of the device
desktoplaptopmobileotherservertabletvirtual_machineworkstation
1 supported1 required
mobiledesktopShow Truto-specific parameters
The ID of the integrated account to use for the request.
62f44730-dd91-461e-bd6a-aedd9e0ad79dThe format of the response.
unifiedreturns the response with unified mappings applied.rawreturns the unprocessed, raw response from the remote API.normalizedapplies the unified mappings and returns the data in a normalized format.streamreturns the response as a stream, which is ideal for transmitting large datasets, files, or binary data. Using streaming mode helps to efficiently handle large payloads or real-time data flows without requiring the entire data to be buffered in memory.
Defaults to unified.
unifiedunifiedrawnormalizedstream
Excludes the remote_data attribute from the response.
Array of fields to exclude from the response.
truto_exclude_fields[]=id&truto_exclude_fields[]=nameQuery parameters to pass to the underlying API without any transformations. Refer this guide to see how to structure the query parameters.
remote_query[foo]=barRequest Body
Refer Writing data using Unified APIs
The asset tag / inventory tag of the device
The date and time the last backup succeeded
Whether the host firewall is enabled on the device
The date and time the device was most recently enrolled
Pass this value only when type is desktop.
Whether MDM management is enabled on the device
The display name of the device
1 supported1 required
The platform family of the device
windowsmacoslinuxiosipadosandroidchromeosunknown
Any additional data that should be passed as part of the request body. This data is not transformed by Truto and is passed as is to the remote API.
The serial number of the device
Pass this value only when type is desktop.
Response Body
The unique identifier for the device
Whether a management agent is installed
The management agent version
Approval state if the provider requires approval
approvedpendingrejectedunknown
The asset tag / inventory tag of the device
The date and time the last backup failed
The date and time the last backup succeeded
Total backup usage in bytes
The date and time the device record was created
The number of critical severity vulnerabilities detected on the device
Provider or customer specific fields mapped into a flexible key-value object
Whether the disk encryption is enabled on the device
The DNS name of the device
Whether an endpoint detection and response (EDR) agent is installed or detected on the device
The health/status of the EDR agent on the device, when available from the underlying product
healthyunhealthydegradedunknown
Enrollment state of the device in the provider
enrolledpendingremovedmissingunknown
Whether the host firewall is enabled on the device
The date and time the device was first enrolled
The number of high severity vulnerabilities detected on the device
The host/system name of the device
The private IP addresses of the device
Whether the device is corporate-owned (as opposed to personally-owned/BYOD)
Whether the device is currently offline
The date and time of the last recorded activity for the device
The date and time the device was most recently enrolled
The date and time the device was last scanned for vulnerabilities or security posture signals, when supported by the underlying product
The MAC addresses of the device
The date and time maintenance ends
The maintenance reason message
The date and time maintenance starts
The maintenance status
nonependingactivecompletedunknown
The hardware manufacturer of the device
Whether MDM management is enabled on the device
The hardware model of the device
The display name of the device
The NetBIOS name of the device (Windows)
Notes attached to the device
The note's unique identifier
The note's content
The note's owner
1 property
The note's owner's unique identifier
The note's title
The organization/account the device belongs to
The unique identifier for an organization
The name of the organization
The operating system build identifier
The operating system name
The operating system version
Additional operating system version information
The assigned owner of the device
The emails of the user
3 properties
The email address
Whether the email address is primary
The type of email address
The unique identifier for a user
The name of the user
The patch compliance status of the device, based on signals available in the underlying product
up_to_dateupdates_availableunknown
The platform family of the device
windowsmacoslinuxiosipadosandroidchromeosunknown
The applied policy / blueprint
The unique identifier for a policy
The name of the policy
The public IP address of the device
Raw data returned from the remote API call.
The serial number of the device
The device's tags
The tag's unique identifier
The tag's name
The type/category of the device
workstationservermobiletabletlaptopdesktopvirtual_machineother
The date and time the device record was last updated
The date and time warranty ends
The manufacturer fulfillment date
The date and time warranty starts
curl -X POST 'https://api.truto.one/unified/mdm/devices?integrated_account_id=<integrated_account_id>' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json' \
-d '{
"name": "your_name",
"serial_number": "your_serial_number",
"asset_tag": "your_asset_tag",
"mac_addresses": [],
"warranty_start_at": "your_warranty_start_at",
"mdm_enabled": true,
"last_enrolled_at": "your_last_enrolled_at",
"platform": "windows",
"backup_last_success_at": "your_backup_last_success_at",
"firewall_enabled": true,
"remote_data": {}
}'const integratedAccountId = '<integrated_account_id>';
const body = {
"name": "your_name",
"serial_number": "your_serial_number",
"asset_tag": "your_asset_tag",
"mac_addresses": [],
"warranty_start_at": "your_warranty_start_at",
"mdm_enabled": true,
"last_enrolled_at": "your_last_enrolled_at",
"platform": "windows",
"backup_last_success_at": "your_backup_last_success_at",
"firewall_enabled": true,
"remote_data": {}
};
const response = await fetch(`https://api.truto.one/unified/mdm/devices?integrated_account_id=${integratedAccountId}`, {
method: 'POST',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/unified/mdm/devices"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
"integrated_account_id": "<integrated_account_id>"
}
payload = {
"name": "your_name",
"serial_number": "your_serial_number",
"asset_tag": "your_asset_tag",
"mac_addresses": [],
"warranty_start_at": "your_warranty_start_at",
"mdm_enabled": True,
"last_enrolled_at": "your_last_enrolled_at",
"platform": "windows",
"backup_last_success_at": "your_backup_last_success_at",
"firewall_enabled": True,
"remote_data": {}
}
response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())import Truto from '@truto/truto-ts-sdk';
const truto = new Truto({
token: '<your_api_token>',
});
const result = await truto.unifiedApi.create(
'mdm',
'devices',
{
"name": "your_name",
"serial_number": "your_serial_number",
"asset_tag": "your_asset_tag",
"mac_addresses": [],
"warranty_start_at": "your_warranty_start_at",
"mdm_enabled": true,
"last_enrolled_at": "your_last_enrolled_at",
"platform": "windows",
"backup_last_success_at": "your_backup_last_success_at",
"firewall_enabled": true,
"remote_data": {}
},
{ integrated_account_id: '<integrated_account_id>' }
);
console.log(result);import asyncio
from truto_python_sdk import TrutoApi
truto_api = TrutoApi(token="<your_api_token>")
async def main():
result = await truto_api.unified_api.create(
"mdm",
"devices",
{
"name": "your_name",
"serial_number": "your_serial_number",
"asset_tag": "your_asset_tag",
"mac_addresses": [],
"warranty_start_at": "your_warranty_start_at",
"mdm_enabled": True,
"last_enrolled_at": "your_last_enrolled_at",
"platform": "windows",
"backup_last_success_at": "your_backup_last_success_at",
"firewall_enabled": True,
"remote_data": {}
},
{"integrated_account_id": "<integrated_account_id>"}
)
print(result)
asyncio.run(main())