Webhook & API questions

I’ve only been working with the Stream API for about a week, but I have a few questions about things that seem to be missing.

I setup a webhook and I’ve been able to verify the data received by my hook, but it only seems to be called when videos are ready to be streamed after a livestream has completed. Are there plans to include calls to the hooks for when a livestream both starts and ends?

Although I have been looking through the API and discovering new things on a regular basis, I have not seen any way to temporarily suspend (disable and later re-enable) a stream key. The only option seems to be to delete the key and create a new one to replace it. Is this a feature that will become available eventually?

Is it possible to list videos for a specific stream key by searching for either the stream key or UID associated with that key? My attempts to do so have generally failed, unless I’m willing to get videos created by any key and filter them myself.

I think that about does it for now, but any help or answers would be appreciated.

Thank you!

Yes, we are actively building webhook support for common events that occur during the lifecycle of a live stream session. We expect to have webhooks for live by end of the year.

I have not seen any way to temporarily suspend (disable and later re-enable) a stream key.

Can you share your use case around temporarily disabling a Stream Input? We don’t support this but curious to learn more so we can consider adding support or offering alternatives.

Is it possible to list videos for a specific stream key by searching for either the stream key or UID associated with that key?

This is a good idea and we’ll look into providing granular filter options for inputs.

Thanks for using Stream Live and providing such valuable feedback! We really appreciate it.

1 Like

Regarding key suspension, a business case might be a user didn’t pay their bill or has policy violations within my service. In such a case I’d rather prevent them from streaming again until the issue(s) are resolved; deleting the stream key is a bit of a heavy hammer for a temporary issue, though it might only be a minor inconvenience for my user.

Regarding the other points, than you very much and I look forward to seeing the progress!

Is it possible to list videos for a specific stream key by searching for either the stream key or UID associated with that key?

Btw I just re-read your original ask around getting video IDs:from Input IDs/Stream Keys. While the API doesn’t let you filter by Stream Key, the API supports getting a list of video IDs associated with a given Input ID.

Following code snippet shows getting a list of video given an input id:

let video_list = await fetch("https://api.cloudflare.com/client/v4/accounts/$INSERT_ACCOUNT_ID/stream/live_inputs/$INSERT_INPUT_ID/videos", {
  "method": "GET",
  "headers": {
    "Authorization": "Bearer $REDACTED_TOKEN"
  }
});
video_list = await video_list.json();
1 Like

That appears to have worked perfectly; I tried https://api.cloudflare.com/client/v4/accounts/$INSERT_ACCOUNT_ID/stream/live_inputs/$INSERT_INPUT_ID without any luck but adding the “/videos” at the end seems to have made the difference.

1 Like

Just updating to prevent this thread from closing without getting a[n updated] response to suspending stream keys. Did my clarification by example make sense and generate any new thoughts?

Thanks