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

**URL:** <https://community.wowza.com/t/how-to-set-live-application-streaming-file-directory-via-api/48558>\
**Category:** Wowza Developer Dojo\
**Created:** [April 19, 2017, 11:16am UTC](https://community.wowza.com/t/how-to-set-live-application-streaming-file-directory-via-api/48558 "2017-04-19T11:16:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeremy\_Salisbury](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@Jeremy\_Salisbury](https://community.wowza.com/u/Jeremy_Salisbury)\
**Post date:** [April 19, 2017, 11:16am UTC](https://community.wowza.com/t/how-to-set-live-application-streaming-file-directory-via-api/48558/1 "2017-04-19T11:16:00Z")

</div>

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/](http://localhost:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/customer1 -d’ { “restURI”: “[http://localhost:8087/v2/servers/](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/](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

---

<div class="post-metadata">

**Author:** ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)\
**Post date:** [April 19, 2017, 2:50pm UTC](https://community.wowza.com/t/how-to-set-live-application-streaming-file-directory-via-api/48558/2 "2017-04-19T14:50:25Z")

</div>

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/](http://localhost:8087/v2/servers/wse/vhosts/)_defaultVHost_/applications -d ’  
{  
“restURI”: “[http://localhost:8087/v2/servers/wse/vhosts/](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/](http://localhost:8087/v2/servers/wse/vhosts/)_defaultVHost_/applications/customer1 -d ’  
{  
“restURI”: “[http://localhost:8087/v2/servers/wse/vhosts/](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
