Page 1 of 1
Loading Video Filenames via API.
Posted: Mon Mar 03, 2025 16:53
by ScottCoumbe
I am trying to load filenames via the request URL.
The command in question is:
POST /composition/layers/{layer-index}/clips/{clip-index}/open
but I am struggling on where to insert my file directory in the string.
the API document gives me the following request URL:
"
http://192.168.187.205:8080/api/v1/comp ... ips/1/open"
But this does not have the file location.
Does this have to be done via Curl?
Re: Loading Video Filenames via API.
Posted: Tue Mar 04, 2025 17:05
by yannick.fullrez
You need to send the file directory string as a text/plain POST request to that API endpoint, you don't insert it anywhere. Anything that can send HTTP requests can be used, cURL is only a very popular tool for this purpose :)
Re: Loading Video Filenames via API.
Posted: Wed Mar 05, 2025 00:07
by ScottCoumbe
Sorry if I was not clear. I need to add the filename to the HTML string. but no matter where I put it. I get an error.
Example:
POST /composition/layers/{layer-index}/clips/{clip-index}/open file:///C:/Users/Resolume/Video.mp4
This returns an error that the file cannot be found and i need to use file:// or media://
but I know the file is there and the test function in the API web interface works fine.
Re: Loading Video Filenames via API.
Posted: Wed Mar 05, 2025 03:59
by moldybeats
When making a POST request, the request will have a URL and a separate body (that is, the data you're sending *to* the URL). So in this case the filename doesn't go anywhere in the URL.
A simple cURL command might be something like:
Code: Select all
curl -X POST http://192.168.187.205:8080/api/v1/composition/layers/1/clips/1/open --data "file:///C:/Users/Resolume/Video.mp4"
Re: Loading Video Filenames via API.
Posted: Thu Apr 10, 2025 03:47
by kentledgeathens
A POST request will have a URL and a distinct body, which is the data you are sending *to* the URL. In this instance, the filename appears nowhere in the URL.