Sure. My current task is to sort out where the AV files being served by our Wowza Streaming Engine instance actually live, i.e. how the storage directories for each application map to our various NFS servers. To do this, I need the filesystem path on the server for each application.
The first REST query I’m making is to
http://{host}:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications
which gets me the list of applications. I then loop through this and for each application I make a request to
/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/{application}
which gets me the information for that specific application. Part of that result is a streamConfig block, e.g.:
"streamConfig": {
"serverName": "_defaultServer_",
"streamType": "default",
"storageDir": "${com.wowza.wms.context.VHostConfigHome}/content/ucb_only",
"createStorageDir": false,
"storageDirExists": true,
"keyDir": "${com.wowza.wms.context.VHostConfigHome}/keys",
"httpRandomizeMediaName": false
}
The field storageDir has the value I’m looking for, but as you can see it’s expressed in terms of VHostConfigHome.
If I get the VHost information with a request to
/v2/servers/_defaultServer_/vhosts/_defaultVHost_
I can see the following:
"configurationDir": "${com.wowza.wms.ConfigHome}"
I assume the VHost configurationDir property is the same as VHostConfigHome, but that’s only an inference on my part. Assuming it’s correct, however, the value of this property is expressed in terms of ConfigHome, so it doesn’t actually get me closer to the filesystem path on the server.
Now, as it happens, I know that the server configuration directory is
/usr/local/WowzaStreamingEngine/conf
which is enough to let me get the task done. But going forward, it would be much easier to build reliable tooling around this if I didn’t have to assume this knowledge from outside the system.