Urbancode IBM getting Versions

1.7k views Asked by At

Is there any Rest API that can be used to get the versions of an application in DEV Environment in Urbancode.

I tried using supported Rest API to get List of application and Snapshots(If any) but now I need to get the versions (if any) of that particular application inside DEV Environment.

How do I go about it ?

Any suggestions would be appreciated.

Thanks.

1

There are 1 answers

4
Tim McMackin On

In IBM UrbanCode Deploy, applications don't have versions. Components have versions.

If you've got the snapshot that has been deployed to the environment, you can get the component versions in that snapshot with this command:

https://www.ibm.com/support/knowledgecenter/SS4GSP_6.2.4/com.ibm.udeploy.api.doc/topics/rest_cli_snapshot_getsnapshotversions_get.html

If you don't have a snapshot, you can use the internal, unsupported API to get the current desired inventory. The command would be something like this:

GET https://ucdserver.example.com:8443/rest/deploy/environment/9e022848-ca4f-447e-9311-3d77103c612c/latestDesiredInventory/true?rowsPerPage=50&pageNumber=1&orderField=name&sortType=desc

That command returns JSON with the versions that have most recently been deployed to the environment and a lot of other info about the environment inventory.