# Media Streams - Interface Definition

Media Streams RESTful interface definition

Get all media streams
URL | http://<server>/dialogicwebservice/mediacontrol/mediastreams?appid=<appid>
Method | GET
Returns | 200 OK & XML (dialogic/mediastreams+xml)
Create a new media stream
URL | http://<server>/dialogicwebservice/mediacontrol/mediastreams?appid=<appid>
Method | POST
Request Body | XML (dialogic/mediastream+xml)
Returns | 201 Created & Location + XML (dialogic/mediastream+xml)
415 Unsupported Media Type
Get a specific media stream
URL | http://<server>/dialogicwebservice/mediacontrol/mediastreams/<identifier>?appid=<appid>
Method | GET
Returns | 200 OK & XML (dialogic/mediastream+xml)
404 Not Found
Delete a specific media stream
URL | http://<server>/dialogicwebservice/mediacontrol/mediastreams/<identifier>?appid=<appid>
Method | DELETE
Returns | 204 No Content
404 Not Found
Update a specific media stream
URL | http://<server>/dialogicwebservice/mediacontrol/mediastreams/<identifier>?appid=<appid>
Method | PUT
Request Body | XML (dialogic/mediastream+xml)
Returns | 201 Created & Location
404 Not Found
415 Unsupported Media Type

dialogic/mediastreams and dialogic/mediastream XML definitions

mediastreams size="<size>">
<mediastream identfier="<identifier>" appid="<appid>"
href="http://server/dialogicwebservice/mediacontrol/mediastreams/<identifier>"
clientipaddress="<clientip>" serveripaddress="<serverip>">
<audio codec="<codec>" clientport="<port>" serverport="<port>"
payload=”<payload>” fmtp=”<fmtp>” enable2833=”<boolean>”/>
<video codec="<codec>" clientport="<port>" serverport="<port>"
payload=”<payload>” fmtp=”<fmtp>”/>
</mediastream>
<mediastream identfier="<identifier>" appid="<appid>"
href="http://server/dialogicwebservice/mediacontrol/mediastreams/<identifier>"
clientipaddress="<clientip>" serveripaddress="<serverip>">
<audio codec="<codec>" clientport="<port>" serverport="<port>”
payload=”<payload>” fmtp=”<fmtp>” enable2833=”<boolean>”/>
<video codec="<codec>" clientport="<port>" serverport="<port>"
payload=”<payload>” fmtp=”<fmtp>”/>
</mediastream>
<mediastream identfier="<identifier>" appid="<appid>"
href="http://server/dialogicwebservice/mediacontrol/mediastreams/<identifier>"
clientipaddress="<clientip>" serveripaddress="<serverip>">
<audio codec="<codec>" clientport="<port>" serverport="<port>"
payload=”<payload>” fmtp=”<fmtp>” enable2833=”<boolean>”/>
<video codec="<codec>" clientport="<port>" serverport="<port>"
payload=”<payload>” fmtp=”<fmtp>”/>
</mediastream>
...
</mediastreams>

For more information refer to Media Stream.