DEV Community

Cover image for Wowza REST API Kullanımı
Emre Emanet
Emre Emanet

Posted on

Wowza REST API Kullanımı

Wowza Streaming Engine REST API ile kolaylıkla yönetilebilir. Sunucu güvenliği düşünülerek REST API'yi sunucu içerisinde kullanmanızı öneriyorum.

Yetkilendirme için aşağıdaki komutu curl ile kullanabilirsiniz.

--digest -u "user:passwd"  \
Enter fullscreen mode Exit fullscreen mode

Stream file'larını listelemek için:

curl -X GET \
-H "Accept:application/json; charset=utf-8" \
-H "Content-Type:application/json; charset=utf-8" \
http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/streamfiles
Enter fullscreen mode Exit fullscreen mode

Bir stream file bağlamak için:

curl -X PUT \
-H 'Accept:application/json; charset=utf-8' \
-H 'Content-type:application/json; charset=utf-8' \
"http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/streamfiles/creedence/actions/connect?connectAppName=live&appInstance=_definst_&mediaCasterType=rtp"
Enter fullscreen mode Exit fullscreen mode

Bir stream'i disconnect etmek için:

curl -X PUT \
-H 'Accept:application/json; charset=utf-8' \
-H 'Content-Type:application/json; charset=utf-8' \
http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/incomingstreams/creedence.stream/actions/disconnectStream
Enter fullscreen mode Exit fullscreen mode

Bir stream file'ı silmek için:

curl -X DELETE \
-H 'Accept:application/json; charset=utf-8' \
http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/streamfiles/creedence
Enter fullscreen mode Exit fullscreen mode

Daha fazla REST API örnekleri için:
https://www.wowza.com/docs/wowza-streaming-engine-rest-api

Top comments (0)