I’m trying to use the REST API to work out if the latest release for a project has been deployed to a particular environment and tenant. I can get the latest release for a Project, and I know how to get the correct Tenant and Environment but what I cant seem to work out is how to check if that has been deployed to e.g. the Production Environment for the UK tenant. Can you give me some pointers as to what endpoints I should be using to achieve this?
Your best bet is probably the /deployments endpoint https://github.com/OctopusDeploy/OctopusDeploy-Api/wiki/Deployments. That will let you filter by Project, Environment and State (that is, the deploy was successful). Then you will need to filter by Release and Tenant at the client end to see if there was a successful deployment.
Your query string would look something like:
By default most of our endpoints will only return 30 records, hence the
take parameter. Or else you can use
skip to page through. Note that projects and environments can take a comma separated list of ids, although it doesn’t look like you need that.
I hope that helps.