Hey @peternixey,
As @fool says here:
The most important advice I can give you about using our API is to watch how we do it! Our entire admin UI works via this API, so checking to see how we use the API in-app will be the best guide to using every feature.
So that’s one thing! Another thing is that the open-api site is a great overview, but does not document everything and is not as well maintained as, well, our UI.
Now into your TL;DR:
- Is there a way via the CLI or API to ask Netlify to “git pull this particular commit” and then to “build but not deploy the commit” and then to return the ID of that build?
I’m… not sure what you’re asking here. Maybe @luke will know?
- Is there an explicit API endpoing for unlocking deploys or should I just continue using the
restoreSiteDeploy
one?
The UI is your friend on this one! I think a POST to https://api.netlify.com/api/v1/deploys/DEPLOY_ID/unlock
will unlock, but then you will have you restore. I believe we’ve decoupled these because people who “unlock” in the UI don’t necessarily want to publish whatever deploy they’ve unlocked.
- I’d prefer to use Netlify to do the build work rather than building it on my CI and then sending the files over but would that be the only other best option? It seems much more laborious than having Netlify do it.
We’re biased, but we think you should Netlify do the build work Our whole product is meant to make building and deploying smooth and straightforward. There are obviously assumptions baked in that might not align with what you want to build, but we think they’re good assumptions that make people’s lives easier. If there are improvements you want, let us know here, see what you can accomplish with build plugins, or check out some of other repos that handle different parts of the build process.
Hope this is somewhat helpful- let us know if you have more questions!