# Adding/Deleting/Modifying Startup Streams and Stream Files from the JAVA API

**URL:** <https://community.wowza.com/t/adding-deleting-modifying-startup-streams-and-stream-files-from-the-java-api/48030>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [February 3, 2017, 4:38pm UTC](https://community.wowza.com/t/adding-deleting-modifying-startup-streams-and-stream-files-from-the-java-api/48030 "2017-02-03T16:38:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allan\_Johns](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@Allan\_Johns](https://community.wowza.com/u/Allan_Johns)\
**Post date:** [February 3, 2017, 4:38pm UTC](https://community.wowza.com/t/adding-deleting-modifying-startup-streams-and-stream-files-from-the-java-api/48030/1 "2017-02-03T16:38:27Z")

</div>

Hello,

I have been using Wowza to interface with RTSP sources. One of the features I have made use of is startup streams and stream files. The stream files have the rtsp information in them, and they’re automatically connected to Wowza when the server boots up.

I am calling the Wowza REST API from another server to set up these files and startup streams, however I now have a need to dynamically modify these stream files and start up streams within our Java code in the Wowza server itself. Specifically if an rtsp source is detected no longer valid, I want to automatically delete it from our server using the Java server API, but I am not able to find an appropriate method to do so.

I was able to find the methods getStartupStreams and addStartupStream on page 2787 of this document: [https://www.wowza.com/resources/WowzaStreamingEngine\_ServerSideAPI.pdf](https://www.wowza.com/resources/WowzaStreamingEngine_ServerSideAPI.pdf), but I don’t see a corresponding modify or delete API. [https://www.wowza.com/resources/WowzaStreamingEngine\_ServerSideAPI.pdf](https://www.wowza.com/resources/WowzaStreamingEngine_ServerSideAPI.pdf)

I was also not able to find any APIs to deal with stream files directly.

Are there any JAVA Server APIs to add/edit/delete the entries in [Wowza install dir]/conf/StartupStreams.xml as well as add/edit/delete the stream files in [Wowza install dir]/content?

Thanks very much,

Allan

---

<div class="post-metadata">

**Author:** ![Theodore\_Sands](https://avatars.discourse-cdn.com/v4/letter/t/6f9a4e/32.png) [@Theodore\_Sands](https://community.wowza.com/u/Theodore_Sands)\
**Post date:** [October 25, 2017, 5:35pm UTC](https://community.wowza.com/t/adding-deleting-modifying-startup-streams-and-stream-files-from-the-java-api/48030/2 "2017-10-25T17:35:03Z")

</div>

I’ve done some work with this and use [java.io](http://java.io) to write .stream files to the appropriate content directory for an application. I haven’t worked with auto-start APIs, though.

---

<div class="post-metadata">

**Author:** ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)\
**Post date:** [November 10, 2017, 1:25am UTC](https://community.wowza.com/t/adding-deleting-modifying-startup-streams-and-stream-files-from-the-java-api/48030/3 "2017-11-10T01:25:08Z")

</div>

Hi Allan,

StartupStream objects that are added through the `addStartupStream()` method are only held in memory for the duration of the Wowza Server’s running time (wiped on restart). There is a `stopStartupStreams()` method, but this would stop all startup stream objects. It may be best to use the [MediaCaster API](https://www.wowza.com/docs/how-to-mediacaster-api-to-start-native-rtp-and-mpeg-ts-streams) to start and stop these streams in your code.

Michelle
