How to set Live Application 'Streaming File Directory' via api

Hi,

I’m trying to create a Live Application and set the ‘Streaming File Directory’ or ‘StorageDir’ to a specific path using the api. The api call returns a ‘success":true’ and creates the new Live Application, but the Streaming File Directory is set to default ‘${com.wowza.wms.context.VHostConfigHome}/content’. The folder exists and I can set it via the Wowza web manager, but not the api. What am I doing wrong?

The call I’m placing is:

curl -X PUT --header ‘Accept:application/json; charset=utf-8’ --header ‘Content-Type:application/json; charset=utf-8’ http://localhost:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/customer1 -d’ { “restURI”: “http://localhost:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/customer1”, “name”: “customer1”, “appType”: “Live”, “clientStreamReadAccess”: “", “clientStreamWriteAccess”: "”, “description”: “A basic live-recording application”, “streamConfig”: { “restURI”: “http://localhost:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/customer1/streamconfiguration”, “streamType”: “live-record”, “StorageDir”: “/usr/local/WowzaStreamingEngine-4.6.0/media/recordings/customer1”, “CreateStorageDir”: false, “storageDirExists”: true } } ’

Thanks,

Ben

Hello Ben,

Here’s an example of creating an application and specifying your own StorageDir.

Creating an app:

curl -X POST --header ‘Accept:application/json; charset=utf-8’ --header ‘Content-type:application/json; charset=utf-8’ http://localhost:8087/v2/servers/wse/vhosts/defaultVHost/applications -d ’
{
“restURI”: “http://localhost:8087/v2/servers/wse/vhosts/defaultVHost/applications/customer1”,
“name”: “customer1”,
“appType”: “Live”,
“streamConfig”: {
“streamType”: “live”,
“liveStreamPacketizer”: [“cupertinostreamingpacketizer”,“sanjosestreamingpacketizer”],
“storageDir”:"/my/path/"
}
}’

Updating the StorageDir in an existing app

curl -X PUT --header ‘Accept:application/json; charset=utf-8’ --header ‘Content-type:application/json; charset=utf-8’ http://localhost:8087/v2/servers/wse/vhosts/defaultVHost/applications/customer1 -d ’
{
“restURI”: “http://localhost:8087/v2/servers/wse/vhosts/defaultVHost/applications/customer1”,
“name”: “customer1”,
“appType”: “Live”,
“streamConfig”: {
“streamType”: “live”,
“liveStreamPacketizer”: [“cupertinostreamingpacketizer”,“sanjosestreamingpacketizer”],
“storageDir”:"/my/new/path/"
}
}’

Regards,

Paul