Skip to main content

FileWave Anywhere API (v2)

What

Hopefully it is now clear that FileWave Anywhere (formerly called WebAdmin) functionstalks byto makingFileWave Server through API callscalls. toYou can use the FileWave server; meaning these same APIstyle of calls can be used infrom scripts or by other 3rd third-party tools.tools when you need automation that matches what FileWave Anywhere does.

When/Why

PerhapsUse this when a workflow needs to makeGET, automatedPOST, APIPATCH, callsor DELETE FileWave Server data from withina Scriptsscript, ran on devicesintegration, or 3rdmanaged party tools to GET or POST/PATCH/DELETE entries on the FileWave server.device.

How

InMost the main, the queries willrequests look almostsimilar the same as theto Command Line RESTful commands.API Notrequests. only are the commands the same, but it is also necessary to useUse a base64 FileWave Administrator Token.token, Pleaseand viewreview the Working with APIs KB pagearticle for moretoken detailssetup ifand required.general API guidance.

Read a current Inventory QueryReport (formerly Query)

ImagineFor it was desirableexample, to read an already existing Inventory QueryReport with an ID of 191.191, The below showscompare the Command Line API call,path followed bywith the FileWave Anywhere API call.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:/server_dns/api/inv/api/v1/query_result/191

As indicated in an earlier API KB document, FileWave Anywhere uses HTTPS on port 443 (by default if not specified) and theadds URL has an additional '/api'api at the beginning of the URL path.

In an example setup, both ofcalls these would report exactlyreturn the same output, which might look somethinglike 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

Since FileWave Anywhere iscovers amore tool with a broader range of control, the API options extend beyond justthan basic queries.inventory-report Asreads. justThis oneexample example, the below shows a method to sendsends an MDM command to a device, in this instance arestart command to restart an Android device,device basedby upon the Devicedevice ID:

curl -X POST "https://${server}/api/android/restart_devices" \
  -H  "Content-Type: application/json" \
  -H "authorization: ${auth}" \
  -d '{"device_ids": ["3aa9cea3eb7ea992"]}'

AlthoughSome FileWave Anywhere hasAPI muchworkflows widerhave scopelimits thanthat thematter Commandwhen Line,choosing therebetween areAPI some considerations with this API.paths.

  • UnlikeFileWave theAnywhere Command Line, it is not possible at this time, tocannot run an ad hoc Inventory QueryReport withresult through this endpoint unless the FileWave Anywhere API, without actually creating an Inventory QueryReport already exists on the FileWave server.Server.
  • Access to Custom Fields values for devices at this time, is only accessible via an Internal API path and this method reports all associated 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 for a device usingthrough the FileWave Anywhere API does not allow the inclusion ofinclude a time stamptimestamp.

AsFor such,those cases, prefer the Command Line API shouldwhen beit favouredgives foryou thesethe aboveneeded options.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.device_id. Depending uponon the use case, it may also be desirable to considerworth using the Command Line RESTful API instead,instead if this value is not readily available.

WhereWhen FileWave runs API calls arefrom madescripts, throughyou FileWavecan pass inventory values as scripts, any inventory value may be supplied as either a Launch ArgumentArguments or Environmentenvironment Variable.variables. This couldcan include device_id.device_id.