I feel like I’ve done this before, but I can’t work out if something has changed, or I was doing it incorrect all along, but we’re using the rest api to download the latest checkpoint of a project by first getting the required branch using /projects/${project_id}/branches. This gives us a checkpoint for the branch, something along the lines of the following;
Then we take the first part of the id up to the ‘-’ and use that to construct a download request using { version: ‘0e542s3c’ } in this scenario. This all works correctly, no errors are raised and we eventually get a download link, however once we download the zip it seems to contain the current working state of the project and not the state at the given checkpoint. So any files that we’re added or changed since the checkpoint are also included.
The documentation isn’t totally clear on how the version parameter should be structured other than it should me a max of 20 characters. Could I potentially be making a wrong assumption about the version parameter and it therefore just downloads the latest project contents? Any help would be awesome
Aha, that would explain it. I totally misunderstood what that parameter was. So I guess without a valid version it just gets whatever the latest state of the project is? I guess a follow up question would be, is there a way to get the latest published build number from one of the api endpoints?