Reputation: 1295
We need to add domains to all of our videos. But I cant find a API call to add a domain to all of the videos - only one video at a time.
Right now I am doing two steps: https://api.vimeo.com/me/videos.... Here I get all of our videos and their IDs and a hell of lot of stuff I dont need.
Then I loop through all of the videoIDs and call https://api.vimeo.com/videos/{videoId}/privacy/domains/{newDomain} for each video.
This results in 1200 put requests which is not good. Furthermore I am not sure if we get banned with to many requests.
Is there som APIs that I have missed which supports what I am trying to do ?
Any help is appreciated.
Upvotes: 0
Views: 1244
Reputation: 3018
Instead of using the API to do this, I suggest setting the default video privacy for all your videos at https://vimeo.com/settings/videos/upload_defaults - this includes the ability to add domain privacy.
Upvotes: 1
Reputation: 1295
Looking through the documentation I found an option for reducing the amount of data return. By adding e.g. &fields=uri,privacy to my api calls I reduced the amount of data returned.
I still have to loop each video and do a put however the first step is a lot faster.
Upvotes: 0