Is there a web API (or otherwise) which would allow an automatic downloader script to fetch vscode installer's SHA256 hash, for any version of vscode including the latest? This would allow the script to verify the downloaded files automatically by comparing the hashes.
The hashes, for the latest version only, are currently shown in the bottom of the download page in a folded mode (i.e. it needs to be expanded for the browser to fetch the hashes and show them). This doesn't present an easy way for an automatic script to fetch them.
Thanks
There was no available API for this so I raised a request to Microsoft and they implemented the following API, which gets the HASH as needed (along with other things).
https://update.code.visualstudio.com/api/versions/commit:COMMIT_ID(or version)/PLATFORM/QUALITY
Examples:
https://update.code.visualstudio.com/api/versions/1.56.0/win32-x64/stable
https://update.code.visualstudio.com/api/versions/commit:c7119ae8b6390a5700f6b28f0f1511d676c96562/win32-x64/insider
https://update.code.visualstudio.com/api/versions/commit:c7119ae8b6390a5700f6b28f0f1511d676c96562/darwin/insider
https://update.code.visualstudio.com/api/versions/commit:054a9295330880ed74ceaedda236253b4f39a335/darwin/stable
Example returned value:
{"url":"https://az764295.vo.msecnd.net/stable/cfa2e218100323074ac1948c885448fdf4de2a7f/VSCodeSetup-x64-1.56.0.exe","name":"1.56.0","version":"cfa2e218100323074ac1948c885448fdf4de2a7f","productVersion":"1.56.0","hash":"ab40232ae7fd669effe6c35ea34948349c273a11","timestamp":1620165132598,"sha256hash":"9719979567f6788bcddc675df29a028e995c2724b7a714280c1e14302c2d6faa","supportsFastUpdate":true}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With