Skip to main content

Return FileWave Device Details as JSON

WhatGet one device's inventory details

The FileWave device-details endpoint returns the inventory shown under Client Info > Device Details ofas JSON. A help desk, inventory integration, or local Fileset script can use the response without scraping the Central interface.

The endpoint requires a particularDevice client,ID.
An containsexternal a wealth of information thatintegration may beneed usefulone request to repurpose in other systems (Help Desks, centralised inventory systems, etc). Using the FileWave API, this information could be pulled by alternate systems or to a file locally on the client

Since the command refers to Device IDs, it may be necessary to make 2 calls from external systems.  The first to obtainfind Device IDs and thea second request to targetretrieve particulardetails devicesfor basedthe uponselected their Device ID.device.

WhenA ranFileset throughcan Filesets,receive the current Device ID mayas bea sentlaunch withargument or environment variable, avoiding the Filesetlookup ascall eitheron athat Launch Argument or Environment Variabledevice.

HOWRequest the JSON response

This information could be returned usingUse either the FileWave Anywhere API path or the Commandcommand-line Line RESTfulREST API path shown below.

RemoveThe python3 -m json.tool pipe formats the JSON for reading. Remove that pipe toif Python if3 notis installed.unavailable This just displaysor the outputcalling assystem multipleneeds linesthe insteadcompact of one long line.response.

FileWave Anywhere API from macOS or Linux:

curl -s -H "Authorization: $auth" \
  https://$server_dns/api/inv/api/v1/client/details/${device_id}/DesktopClient \
  -H "Content-Type: application/json" \
  | python3 -mjson.m json.tool

Command Line RESTful API from macOS or Linux:

curl -s -H "Authorization: $auth" \
    https://$server_dns:20445/inv/api/v1/client/details/${device_id}/DesktopClient \
    -H "Content-Type: application/json" \
    | python3 -mjson.m json.tool

Note, the commands look almost identical, but just the additional /api at the beginning of the path for the FileWave Anywhere API call.

The output should look similar to the below, where an appropriate device_id is supplied:

{
    "CustomFields__ldap_username": {
        "status": 0,
        "type": "string",
        "updateTime": "2018-06-21T19:37:23.585851Z",
        "value": "mdm mdm"
    },
    "CustomFields__local_ip_address": {
        "status": 0,
        "type": "string",
        "updateTime": "2018-06-21T19:49:51Z",
        "value": "10.20.30.29"
    },
    "CustomFields__malwarebytes_installed": {
        "status": 0,
        "type": "bool",
        "updateTime": "2018-06-21T19:49:51Z",
        "value": false
    },
    "CustomFields__po_number": {
        "status": 0,
        "type": "string",
        "updateTime": "2018-06-21T19:49:51Z",
        "value": "54654561"
    },
    "CustomFields__property_tag": {
		"status": 0,
        "updateTime": "2018-06-21T19:49:51Z",
        "type": "string",
        "value": "Device Owned by FileWave"
    },
    "CustomFields__purchase_date": {
        "updateTime": null,
        "value": null
    },
    "CustomFields__school_name": {
       	"status": 0,
        "type": "string",
        "updateTime": "2018-06-21T19:49:51Z",
        "value": "Landing Trail Elementary"
    },
    "CustomFields__site_description": {
        "updateTime": null,
        "value": null
    },
    "CustomFields__textedit_version": {
        "status": 0,
        "type": "string",
        "updateTime": "2018-06-21T19:49:51Z",
        "value": "1.13"
    },
    "CustomFields__user_role": {
        "updateTime": null,
        "value": null
    },
    "archived": null,
    "auth_username": "mdm",
    "building": null,
    "cpu_count": 2,
    "cpu_speed": 2759000000,
    "cpu_type": "Intel(R) Core(TM) i5-3470S CPU @ 2.90GHz",
    "current_ip_address": "10.20.30.29",
    "deleted_from_admin": false,
    "department": null,
    "device_id": "f96b8c66c50b358889ba2fbf2dc53bc21036406a",
    "device_manufacturer": "VMware, Inc.",
    "device_name": "FUSION-VM1-10.12",
    "device_product_name": "VMware7,1",
    "enroll_date": "2018-06-17T17:11:08.709785Z",
    "enrollment_state": 2,
    "filewave_client_locked": false,
    "filewave_client_name": "FUSION-VM1-10.13",
    "filewave_client_version": "12.8.1",
    "filewave_id": 219,
    "filewave_model_number": 617,
    "free_disk_space": 56772587520,
    "is_system_integrity_protection_enabled": true,
    "is_tracking_enabled": false,
    "last_check_in": "2018-06-21T19:54:31.615710Z",
    "last_enterprise_app_validation_date": null,
    "last_ldap_username": null,
    "last_logged_in_username": "dhadmin",
    "last_state_change_date": "2018-06-21T19:50:09.339609Z",
    "location": null,
    "management_mode": 0,
    "monitor_id": null,
    "operating_system__build": "17B48",
    "operating_system__edition": "Desktop",
    "operating_system__name": "macOS 10.13 High Sierra",
    "operating_system__type": "OSX",
    "operating_system__version": "10.13.1",
    "operating_system__version_major": 10,
    "operating_system__version_minor": 13,
    "operating_system__version_patch": 1,
    "ram_size": 2147483648,
    "rom_bios_version": "VMW71.00V.0.B64.1706210604",
    "security__enrolled_via_dep": null,
    "security__fde_enabled": false,
    "security__firmware_password_change_pending": false,
    "security__firmware_password_exists": false,
    "security__firmware_password_rom_enabled": true,
    "security__hardware_encryption_caps": null,
    "security__passcode_is_compliant": null,
    "security__passcode_is_compliant_with_profiles": null,
    "security__passcode_lock_grace_period": null,
    "security__passcode_lock_grace_period_enforced": null,
    "security__passcode_present": null,
    "security__system_integrity_protection_enabled": true,
    "security__user_approved_enrollment": null,
    "serial_number": "VMx4NvUkh/Co",
    "state": 0,
    "total_disk_space": 85689589760,
    "unenrolled": false
}

If desired,Redirect the informationformatted couldresponse be stored intoto a JSONfile file:when another process or support workflow needs a saved snapshot:

curl -s -H "Authorization: $auth" \
  https://$server_dns/api/inv/api/v1/client/details/${device_id}/DesktopClient \
  -H "Content-Type: application/json" \
  | python3 -mjson.m json.tool > /my/path/device_info_${device_id}.json

The filename includes the same $device_id variablevalue. hasReplace been/my/path usedwith a writable location appropriate for the device and protect exported inventory according to defineyour theorganization's namedata-handling of the JSON file also.  Alter /my/path for a path of choice.rules.

Obtaining Device IDs

One way to retrieve a bulk list of Device IDs in bulk is viato an Inventory Query.  First makecreate a queryFileWave Report (formerly Query) that includes Device ID and any fields needed to include desired columns, one of which will need to be Device ID.  Inidentify the target devices. The example below exampleincludes Device ID and Device Name have been included as columns for the Fields:Name.

image.png

OnceAfter saved, usesaving the detailsReport, outlined in theuse FileWave Anywhere Documentation, to locate theits ID of this Inventory Query.ID. The queryReport result maycan then beprovide used to pull a list ofthe Device IDs. FromIn the belowexamples example,below, set $query_id to the valueselected ofReport ID and provide the chosenserver Inventory Query. Make sure to set $auth to the tokenaddress and serverauthorization to your server:token:

#!/bin/zsh
# Shell script for macOS/Linux
$server = server="widget.filewave.net"
$token = "ezMyxxxM2UyLTNjN2ItNxxxS04ZjQ5LTkxMxxxxzEzODZmNn0="
$query_id = query_id="65"

curl -ssS -H "Authorization: $auth" \
  "https://$server/api/inv/api/v1/query_result/$query_idquery_id"
#PowerShell# PowerShell for Windows
$server = "widget.filewave.net"
$token = "ezMyxxxM2UyLTNjN2ItNxxxS04ZjQ5LTkxMxxxxzEzODZmNn0="replace-with-token"
$header = @{Authorization=“ Authorization = $token"token }
$query_idqueryId = "65"

Invoke-RestMethod -Method GETGet \`
    -Headers $header \`
    -ContentType "application/jsonjson" \`
    -Uri "https://$server:/server/api/inv/api/v1/query_result/$query_idqueryId"