# Get duration of recorded stream (REST API)

**URL:** https://community.wowza.com/t/get-duration-of-recorded-stream-rest-api/53952
**Category:** Wowza Streaming Engine
**Created:** [September 16, 2019, 2:47pm UTC](https://community.wowza.com/t/get-duration-of-recorded-stream-rest-api/53952 "2019-09-16T14:47:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Anders\_Gunnarsson](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@Anders\_Gunnarsson](https://community.wowza.com/u/Anders_Gunnarsson)
#### Post date: [September 16, 2019, 2:47pm UTC](https://community.wowza.com/t/get-duration-of-recorded-stream-rest-api/53952/1 "2019-09-16T14:47:16Z")

</div>

Hi

I’m using the REST API to start a streamrecorder.

How can I get the final duration of the recorded mp4 file? (Via API or at least from my other server)

I could kepp track of when I start and stop, but that doesn’t give me the exact duration and the streaming camera can stop without my server knowing about it.

---

<div class="post-metadata">

### Author: ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)
#### Post date: [September 16, 2019, 4:39pm UTC](https://community.wowza.com/t/get-duration-of-recorded-stream-rest-api/53952/2 "2019-09-16T16:39:01Z")

</div>

Checking for you @Anders Gunnarsson. I know you can do this through JAVA API, but I’ll be back shortly re: REST API.

---

<div class="post-metadata">

### Author: ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)
#### Post date: [September 16, 2019, 5:23pm UTC](https://community.wowza.com/t/get-duration-of-recorded-stream-rest-api/53952/3 "2019-09-16T17:23:17Z")

</div>

The specific stream recorder name can retrieve the **currentDuration**

```auto
GET /v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/instances/{instanceName}/streamrecorders/{recorderName}

```

or

```auto
GET /v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/instances/{instanceName}/streamrecorders/{recorderName}/default

```

Let me know if this works for you @Anders Gunnarsson,

[https://www.wowza.com/docs/stream-recording-query-examples](https://www.wowza.com/docs/stream-recording-query-examples)
