Batch Create Downloads from Script
-
I have some Downloads in Download Monitor, which receive new versions, whenever I release a new version of my Software.
If have the whole build process automated including the upload of the file to the ftp server.
The only manual thing I need to do every time, is to go to the Download Moniitor Backend, open the Download, create a new version, navigate to the correct folder on the server, select the new version of the file and update the download. Then I need to do this for the next download and so on.
This is a tedious and time consuming process.
If Download Monitor would offer a Rest API Endpoint, I could automate this whole process.
I already tried some things, but nothing worked.
For example I tried to create a new Post in WordPress via REST and give it the post type “dlm_download”.
DOWNLOAD_ID=62092
curl -X POST “$SITE_URL/wp-json/wp/v2/posts” -d “title=$TITLE&content=$CONTENT&post_type=dlm_download&meta[download_id]=$DOWNLOAD_ID&meta[file_path]=$FILE_PATH” -H “Authorization: Bearer $TOKEN”
$DOWNLOAD_ID is the ID of the current download, I was hoping that this would link the new file as new version to the download.
$FILE_PATH is the path of the new file on the server.
Unfortunately this creates a post, no download.
Maybe you could point me in the right direction on how to add a new version to an existing download from a shell script.
Thank you very much!
- The topic ‘Batch Create Downloads from Script’ is closed to new replies.