Using Powershell:
Clear-Host
$deviceID = ""
$baseAPIurl = "https://as#.awmdm.com/api"
$credentials = Get-Credential -Credential "domain\"
$user = $credentials.GetNetworkCredential().Domain + "\" + $credentials.GetNetworkCredential().UserName
$pass = $credentials.GetNetworkCredential().Password
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $user, $pass)))
$headerAuth = "Basic " + $base64AuthInfo + ""
$headerTenant = ""
$headerApplication = "application/json;version=3"
$headers = @{
'Authorization' = $headerAuth
'aw-tenant-code' = $headerTenant
'Accept' = $headerApplication
}
$deviceQueriedByID = Invoke-RestMethod -Method get -Uri "$baseAPIurl/mdm/devices/$deviceID" -Headers $headers | ConvertTo-Json
$Uuid = $deviceQueried | ConvertFrom-Json | Select Uuid
$UuidToQuery = $Uuid.Uuid
$deviceQueriedByUUID = Invoke-RestMethod -Method get -Uri "$baseAPIurl/mdm/devices/$UuidToQuery" -Headers $headers | ConvertTo-Json
$internalStorageUsage = $deviceQueriedByUUID | ConvertFrom-Json | Select total_storage_bytes, available_physical_memory_bytes
$internalStorageUsage