How to retrieve asset version ID

I’m porting a websites content to contentful and am trying to move all the assets with a script. At the moment I am fetching all the images and pdf links from the existing website and upload them to Contentful. Next I want to change all the links in the blog posts etc with the new Contentful asset links. I have the space ID, environment, CMA key, asset ID, however I can not figure out how to get the asset version ID. It is not included in the response when creating an asses and not when getting the asset by ID. Therefore I can’t build the link within the script.

I’m using the .Net SDK, but have also tried with normal get requests, curl etc.

//assets.ctfassets.net/(SpaceID)/(AssetID)/(VersionID - How can I retrieve this??)/(FileName).pdf

Potentially, if theres any other way to just get the asset URL via an API call that’s just as good

I figured this out(sort of). The link to the asset is not included in the get request before it has been processed, so you can’t simply loop through and create/get ID instantly.