Page 1 of 1

Solved : REST API (learning) troubles

Posted: Sat Nov 18, 2023 16:48
by Resoresoreso
Hi everyone,

I have been working with the REST API in Resolume.

I use the official http://127.0.0.1:8080/api/docs/rest/ to test.
The specific problem I have is that I get the JSON file from the endpoint "/composition/clips/selected" just fine with a GET, and I verified in a few JSON checkers.

HOWEVER, when I do the reverse, and I input that JSON file back to "/composition/clips/selected" but with PUT, I get an error :

Code: Select all

 error reading field "selected": This field is read-only
I am assuming I am doing something wrong here, but I am curious what that wrong is :)

I also noticed in the dashboard example, that it has an endpoint "/parameter/by-id/#" , but is not documented in the SwaggerUI example.

Re: REST API (learning) troubles --official example not working

Posted: Sun Nov 19, 2023 11:22
by Resoresoreso
I was able to get a few things working by looking at an example I found on the forum. I just noticed the local SwaggerUI is different than the one which is hosted here : https://resolume.com/docs/restapi/

I don't have the schema's for instance, so hopefully I can work things out further from there.

I am specifically looking to change the opacity of a clip , and to change an effect value at this point. Hopefully I can get it to work.

Re: REST API (learning) troubles --official example not working

Posted: Sun Nov 19, 2023 11:32
by Resoresoreso
Also : Admins/mods, I think this post might be a better fit for "developers" , so feel free to move it there if need be.

Re: REST API (learning) troubles --official example not working

Posted: Sun Nov 19, 2023 12:07
by Resoresoreso
And with the added documentation at https://resolume.com/docs/restapi/ , I was able to figure out the details that went wrong. So yay :)