Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get SHA256 hash for Visual Studio Code installer file programmatically #122396

Closed
amtadev opened this issue Apr 27, 2021 · 6 comments
Closed

Get SHA256 hash for Visual Studio Code installer file programmatically #122396

amtadev opened this issue Apr 27, 2021 · 6 comments
Assignees
Labels
feature-request Request for new features or functionality install-update VS Code installation and upgrade system issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@amtadev
Copy link

amtadev commented Apr 27, 2021

Hello,

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

@joaomoreno joaomoreno added the feature-request Request for new features or functionality label Apr 28, 2021
@joaomoreno joaomoreno added this to the May 2021 milestone Apr 28, 2021
@joaomoreno joaomoreno added the install-update VS Code installation and upgrade system issues label Apr 28, 2021
@joaomoreno joaomoreno modified the milestones: May 2021, June 2021 Jun 3, 2021
@amtadev
Copy link
Author

amtadev commented Jun 9, 2021

@joaomoreno what was the resolution for this?

@joaomoreno joaomoreno added author-verification-requested Issues potentially verifiable by issue author verification-needed Verification of issue is requested labels Jun 9, 2021
@joaomoreno
Copy link
Member

@amtadev I was waiting for the code to be deployed.

You now have the following API available:

https://update.code.visualstudio.com/api/versions/commit:COMMIT_ID/PLATFORM/QUALITY

Examples:

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

@joaomoreno
Copy link
Member

joaomoreno commented Jun 9, 2021

@amtadev, you can help us out by confirming things are working as expected. If things look good, please leave a comment with the text /verified to let us know.

@amtadev
Copy link
Author

amtadev commented Jun 9, 2021

@joaomoreno , This is /verified .. Thank you.

I accessed the link:
https://update.code.visualstudio.com/api/versions/1.56.0/win32-x64/stable
and got a json:
{"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}
The sha256hash key gives the requested hash which is matching the hash calculated locally.

@amtadev
Copy link
Author

amtadev commented Jun 9, 2021

@joaomoreno is there any documentation for the update.code.visualstudio.com API?

@joaomoreno
Copy link
Member

To some extent: https://update.code.visualstudio.com/swagger.json

@github-actions github-actions bot locked and limited conversation to collaborators Jul 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality install-update VS Code installation and upgrade system issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants
@joaomoreno @amtadev and others