Is there a way to check what "version" is deployed given an "Environment" and "application" parameter via API?

We’re on XLDeploy 7.0, but upgrading to 9.7 soon.

Right now we have a CI/CD process where we deploy an application every day at 6 PM. Whether or not the latest build changes, we deploy blindly and it’s time consuming. We have 10 components, so maybe 4 of them change and the other 6 don’t, so we just want to end up deploying 4; but in reality we keep deploying all 10 anyway. We want to implement something “smarter” by checking if the latest version is the same version that’s already been deployed the previous night because we don’t trigger new builds everyday unless commits come in.

We use Bamboo to build our artifacts and it’s easy to see what the latest build # (aka version) is.

On the XLDeploy API side, I can’t seem to find a way to do it by scanning the REST API docs.

I was hoping there would be ways I can ask the API to do either:

  1. given environment and application, return me the last version that got deployed or the current state of that environment/application combination
  2. Or… if I know the latest version is “abc_2.0” from bamboo, ask XLDeploy if “abc_2.0” and the environment “abc_windows” has already been deployed.

Any suggestions if this is possible via the java or rest api? Or maybe there’s a better way? I found one possible way maybe ot use “deployment/prepare/undeploy” given a “deployedapplication”, but it feels hacky.

Thanks in advance