Is there a way to also get the size of the deployment image? I suppose I can just use curl to get this information from the header, but I was just hoping there was a standard way to get it from Mender that I’m just not seeing.
To add to this, I found a way to get the image size via curl, but not in a straight forward way. The following command is supposed to only get the header information from the URL without actually downloading the file but I always get back a “403 forbidden” error.
curl -sI $URL
If this worked I would be able to inspect the Content-Length and be done but it seems that the hosted Mender option doesn’t respond to header requests. Is this true or am I just doing this wrong? My workaround was to start a regular curl download but abort immediately after starting. This still retrieved the header and I was able to get the Content-Length without issue.
Ah yes, thanks! I wasn’t looking at the management API so I missed this.
A question though: in what cases would you get multiple artifact IDs for a given deployment? Maybe if you were using update modules? I think in my case there should only be one so I would assume to use the zero element of the “artifacts” array.
I believe you can get multiple artifacts if you have artifacts for multiple device types under the same Release name. For example two artifacts named reboot-script-v1.0 for the device types raspberrypi3 and raspberrypi4, respectively.