# How to pass filename to record via REST API

**URL:** <https://community.wowza.com/t/how-to-pass-filename-to-record-via-rest-api/94678>\
**Category:** Wowza Developer Dojo\
**Created:** [March 10, 2022, 6:58pm UTC](https://community.wowza.com/t/how-to-pass-filename-to-record-via-rest-api/94678 "2022-03-10T18:58:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Purdy](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Michael\_Purdy](https://community.wowza.com/u/Michael_Purdy)\
**Post date:** [March 10, 2022, 6:58pm UTC](https://community.wowza.com/t/how-to-pass-filename-to-record-via-rest-api/94678/1 "2022-03-10T18:58:12Z")

</div>

Hi. I’m trying to pass in a filename via the REST API via curl that Wowza should use when it records the stream being requested. I’ve tried “baseFile”: “thefilename.mp4” and “currentFile”: “thefilename.mp4”, but both revert to the name of the stream as it is in Wowza. So, for example, instead of recording the file as thefilename.mp4, it records as cam22.stream.mp4.

Is there a different element that I should pass in to set the filename?

Thank you

---

<div class="post-metadata">

**Author:** ![Karel\_Boek](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/karel_boek/32/454_2.png) [@Karel\_Boek](https://community.wowza.com/u/Karel_Boek)\
**Post date:** [March 11, 2022, 11:54am UTC](https://community.wowza.com/t/how-to-pass-filename-to-record-via-rest-api/94678/2 "2022-03-11T11:54:50Z")

</div>

Please post the code you have so far (or dump it in a text file an attach it, if it’s a lot of code)

---

<div class="post-metadata">

**Author:** ![Michael\_Purdy](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Michael\_Purdy](https://community.wowza.com/u/Michael_Purdy)\
**Post date:** [March 11, 2022, 4:22pm UTC](https://community.wowza.com/t/how-to-pass-filename-to-record-via-rest-api/94678/3 "2022-03-11T16:22:25Z")

</div>

curl -X POST  
-H ‘Accept:application/json; charset=utf-8’  
-H ‘Content-Type:application/json; charset=utf-8’  
[http://wowzaserverIPaddress:8087/v2/servers/](http://wowzaserverIPaddress:8087/v2/servers/)_defaultServer_/vhosts/_defaultVHost_/applications/icd/instances/_definst_/streamrecorders/cam22.stream\_aac  
-d ’  
{  
“instanceName”: “”,  
“fileVersionDelegateName”: “”,  
“serverName”: “”,  
“recorderName”: “cam22.stream\_aac”,  
“currentSize”: 0,  
“segmentSchedule”: “”,  
“startOnKeyFrame”: true,  
“outputPath”: “”,  
“currentFile”: “cam22\_031122.mp4”,  
“recordData”: false,  
“applicationName”: “”,  
“moveFirstVideoFrameToZero”: false,  
“recorderErrorString”: “”,  
“segmentSize”: 0,  
“defaultRecorder”: false,  
“splitOnTcDiscontinuity”: false,  
“version”: “”,  
“baseFile”: “”,  
“segmentDuration”: 0,  
“recordingStartTime”: “”,  
“fileTemplate”: “”,  
“backBufferTime”: 0,  
“segmentationType”: “”,  
“currentDuration”: 0,  
“fileFormat”: “”,  
“recorderState”: “”,  
“option”: “”  
}’

Also replaced “currentFile” with “baseFile”, but got the same results.

---

<div class="post-metadata">

**Author:** ![Karel\_Boek](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/karel_boek/32/454_2.png) [@Karel\_Boek](https://community.wowza.com/u/Karel_Boek)\
**Post date:** [June 19, 2022, 8:19am UTC](https://community.wowza.com/t/how-to-pass-filename-to-record-via-rest-api/94678/4 "2022-06-19T08:19:13Z")

</div>

Try to add parameter `outputFile` or else try to specify the filename in `outputPath`. You may also use `fileTemplate` and fill in something like `"cam22_${RecordingStartTime}"`
