Skip to main content

FileWave Anywhere Documentation

What

TBC

FileWave

When/Why

Anywhere


has

How

a

Thededicated documentation forpage, this new APIwhich is available once you have authenticated to FileWave Anywhere...you simply go to https://my.server.name/api/doc to see the documentation as built by Swagger and OpenAPIis OpenAPI.

The documentation should only list public (non-internal) URL paths.  Not only does it list possible commands, but there is quitean extensive).option to Each'Try it Out', allowing execution of the command from the documentation.

Executing a command from the Swagger API documentation is a live action on the FileWave Server, it will act as requested and can be testeddestructive.  Be 100% sure before of any command before executing.

When/Why

Unsure if an API call exists for the intended action?  Need to confirm the format or name of a key in the JSON?  Are some keys in the JSON required?  What is the ID of the item to be targeted?

These are some of the questions the Swagger documentation can answer.

Executing commands from the Swagger documentation requires an active login to the FileWave Anywhere web admin.  If this login times out, a fresh login action will be required.

How

Documentation page may be accessed without logging in first, but it may then only be viewed as 'read only'. 

If wishing to execute commands from the documentation directlypage, asfirst you'lllog see below, but be careful, some of the calls are destructive! 

API calls are not something to be taken lightly, and you should make 100% sure that you understand your intended actions before taking them.

WebAdminAPI.png

If wanting to call the API without ainto FileWave Anywhere sessionthrough active,a yourweb headerbrowser.  wouldThe address should be in the formsame of "Authorization: base_64_token" rather than the X-CSRFTokenas shown in the FileWave Central Mobile Preferences:

image.png

The URL for the Swagger documents page is the server address appended with /api/doc/. From the example above, it would look as follows:

https://demoz.filewave.com/api/doc/

Example GET

The below shows an example of using a 'GET' to return the DEP Profiles:

image.gif

The response section from an executed action shows the curl command, the requested URL and the returned response (code and body)

image.png

Authentication through the Swagger documentation uses a X-CSRFToken.  This token is for use in Swagger alone.  The base64 token should be used elsewhere, as shown in all other examples.  If copying this command to paste into a script or alternative tool, ensure to remove this part of the line and insert the correct authentication token from FileWave Central.

Discovering Content

Swagger can not only be used for testing API calls and discovering the URL paths, but also the necessary content of the key/value pairs.

To simply locate all paths relating to queries, for example, the browse 'find' feature could easily assist:

image.png

Executing a list of all queries:

image.png

The response could then be searched to find the ID of a particular query:

image.png

Using Query ID 191 as an example, that ID may then be used in a following GET, which will respond with the definition of that query:

 

image.png

The Query Definition shows the various key/value pairs and can be used to identify values which could then be submitted in other API calls.

To discover the name used as a value for a particular item, consider building a query in FileWave Central, then using the above steps to locate the name to be used within the API call.  For example: interface_name, device_name, DesktopClient.

Taking that another step forward, the same ID could be used to show the response of query results:

image.png

The same documentation can therefore be used to assist with the Command Line RESTful API, just remember the path needs to be altered if copying them.

Hopefully this has shown the Swagger documentation to be a great way to discover JSON formatting, key/value names, URL paths and list the commands available through the API.

Digging Deeper

Because it can be a topic that can trip someone up it is important to note that API calls are done on TCP 443. You may see references to 20445 in some documentation, but that is the RESTful API (v1 API) and it is on TCP 20445 however you can make a small change in the URL for the API endpoint and use TCP 443 for all calls. Simply prepend /api/ on the URL and you can use TCP 443 for the /inv/ endpoint URLs.