Stream API mismatch with CloudFlare Stream page

Hello folks, Im using the stream API to upload videos, we are currently in testing phase, so I usually delete all videos using the SDK before uploading a bunch of videos. However, after several 30-37 seconds videos (15-16MB) uploaded, I get the following:
{"result":null,"success":false,"errors":[{"code":10011,"message":"Storage capacity exceeded: You have exceeded your allocated storage quota. Delete videos or purchase more minutes to continue uploading content."}],"messages":[{"code":10011,"message":"You have uploaded 1080.00 minutes and are allocated 1000 minutes."}]}
{"result":null,"success":false,"errors":[{"code":10011,"message":"Storage capacity exceeded: You have exceeded your allocated storage quota. Delete videos or purchase more minutes to continue uploading content."}],"messages":[{"code":10011,"message":"You have uploaded 1080.00 minutes and are allocated 1000 minutes."}]}
when I go to stream dashboard page, I can see:
Storage Capacity
You have 27 videos in your Stream library.
You have 15 minutes of video content in your Stream library.
Your storage capacity is 1,000 minutes (98% remaining).
Storage Capacity
You have 27 videos in your Stream library.
You have 15 minutes of video content in your Stream library.
Your storage capacity is 1,000 minutes (98% remaining).
Im wondering, is there a mismatch between the API and the dashboard? and what happens to deleted videos? do you actually delete them or they are just hidden? Thanks in advance!
2 Replies
Kosh
KoshOP2w ago
I even have this function:
async deleteAllVideos() {
const videos = await this.client.stream.list({
account_id: this.accoundId,
})

await Promise.all(
videos.result.map((video) =>
this.client.stream.delete(video.uid!, {
account_id: this.accoundId,
})
)
)

await new Promise((resolve) => setTimeout(resolve, 2000))
const verifyVideos = await this.client.stream.list({
account_id: this.accoundId,
})

if (verifyVideos.result.length > 0) {
throw new Error("Videos not fully deleted")
}
}
async deleteAllVideos() {
const videos = await this.client.stream.list({
account_id: this.accoundId,
})

await Promise.all(
videos.result.map((video) =>
this.client.stream.delete(video.uid!, {
account_id: this.accoundId,
})
)
)

await new Promise((resolve) => setTimeout(resolve, 2000))
const verifyVideos = await this.client.stream.list({
account_id: this.accoundId,
})

if (verifyVideos.result.length > 0) {
throw new Error("Videos not fully deleted")
}
}
Which guarentee that no videos are there and passes with flying flags. Hi folks any comments regards this? its rather urgent for us.
Vero
Vero2w ago
Hi @Kosh can you please share your account ID and some video IDs?

Did you find this page helpful?