Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Delete Original Using the API

6 replies [Last post]
Reply

Is there a way with the API to delete the original video? Trying to make some tools to clean out originals on already encoded videos. I can't find a command. I see one to delete the original and all conversions, all conversion, but not just originals.

-Chuck

Reply

You will first have to use the /videos/conversions/list call to find the key of the original conversion of a video and you would then be able to use the /videos/conversions/delete call to delete only the original conversion of a video.

Reply

As a follow up to this, is there a way to mass select or mass delete videos by encoding. IE, select all videos that have originals, or delete a number of videos at once. I have around 45000 videos that don't need their originals (I store them in my own system as backups) but to select all videos (which fails if you request more than about 2500 at a time), get versions of each one by one, and then delete the original of each is around 9000+ calls to the API.

Is there a better and more efficient way?

Thanks.

Reply

Unfortunately this inefficient method is the only way. That is a lot of calls through, you might have to throttle them a bit in order to make sure they all come through.

Reply

Would it be possible to show some php example code of how to do this?

1. List videos in an account
2. Select the key for all of them and store in array
3. Iterate through the array and delete all originals

Thanks for your help

Reply

Probably has to be some checking code as well in case original has already been deleted.

Reply

I'm afraid we don't have example code for this, but this would be the appropriate approach.

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options