get all clips on all decks via rest api

Post your questions here and we'll all try to help.
Post Reply
sonofx
Posts: 6
Joined: Tue Nov 30, 2021 01:53

get all clips on all decks via rest api

Post by sonofx »

Hello,

Just wondering if it is possible to retrieve all the clips of all decks in a composition via the rest api?

As far as I can tell, the /composition GET response has a /layers/clips section, however it only includes data for clips in the currently selected deck. Additionally the /decks section of thee doesn't include the list of clips (and their layer/column id) for each deck.

Please let me know if you would like any additional info.

Thanks

tijnisfijn
Team Resolume
Posts: 320
Joined: Fri Dec 06, 2019 00:01

Re: get all clips on all decks via rest api

Post by tijnisfijn »

You're right that calling GET /api/v1/composition gives you the full details of all layers and clips — but only for the currently active deck. So if you're trying to get all clips across all decks, it won't give you everything in one go.

The good news is that you can switch decks programmatically using the WebSocket API. You can send a message like this:

Code: Select all

action('trigger', '/composition/decks/1/select');
That will activate deck 1, and then when you call GET /api/v1/composition, you'll get the clip data for that deck. So by looping through all the decks, selecting each one and fetching the composition afterward, you can build a complete list of all clips in the composition.

It’s not all-in-one, but with a bit of scripting, it’s totally doable. Hope that helps!

sonofx
Posts: 6
Joined: Tue Nov 30, 2021 01:53

Re: get all clips on all decks via rest api

Post by sonofx »

Hi tijnisfijn,

Thanks for the quick reply. Had considered doing it the way you suggested, but was hoping there might be a simpler option. Nonetheless, that approach should work.

Joe

Post Reply