FileWave Anywhere API (v2)
What
FileWave Anywhere (formerly WebAdmin) talks to FileWave Server through API calls. You can use the same style of calls from scripts or third-party tools when you need automation that matches what FileWave Anywhere does.
When/Why
Use this when a workflow needs to GET, POST, PATCH, or DELETE FileWave Server data from a script, integration, or managed device.
How
Most requests look similar to Command Line RESTful API requests. Use a base64 FileWave Administrator token, and review the Working with APIs KB article for token setup and general API guidance.
Read a current Inventory Report (formerly Query)
For example, to read an existing Inventory Report with an ID of 191, compare the Command Line API path with the FileWave Anywhere API path below.
Command Line:
curl -s -H "Authorization: $auth" https://$server_dns:20445/inv/api/v1/query_result/191
FileWave Anywhere:
curl -s -H "Authorization: $auth" https://$server_dns/api/inv/api/v1/query_result/191
FileWave Anywhere uses HTTPS on port 443 by default and adds /api at the beginning of the URL path.
In an example setup, both calls return the same output, which might look like this:
{
"offset":0,
"fields":
[
"Client_device_name"
],
"values":
[
["C02Z90WDLVDQ"],
["FW1063"],
["mac0001"],
["macadmin1"],
["mini"],
["ML1015VMNEWNAME"],
["ml1063"],
["Orac"],
["pro"]
],
"filter_results":9,
"total_results":9,
"version":3
}
Send an MDM Command
FileWave Anywhere covers more than basic inventory-report reads. This example sends an MDM restart command to an Android device by device ID:
curl -X POST "https://${server}/api/android/restart_devices" \
-H "Content-Type: application/json" \
-H "authorization: ${auth}" \
-d '{"device_ids": ["3aa9cea3eb7ea992"]}'
Some FileWave Anywhere API workflows have limits that matter when choosing between API paths.
- FileWave Anywhere cannot run an ad hoc Inventory Report result through this endpoint unless the Inventory Report already exists on the FileWave Server.
- Custom Field values for a device are available through an internal API path, and that method returns all Custom Field values associated with the device.
- Setting Custom Field values through the FileWave Anywhere API does not include a timestamp.
For those cases, prefer the Command Line API when it gives you the needed object or value directly.
Please see the FileWave Anywhere Documentation for a more in-depth look at the possible API options available.
When referring to devices, the FileWave Anywhere API calls always use device_id. Depending on the use case, it may also be worth using the Command Line RESTful API instead if this value is not readily available.
When FileWave runs API calls from scripts, you can pass inventory values as Launch Arguments or environment variables. This can include device_id.
No comments to display
No comments to display