How can I view the release history records programmatically?

One of the user asked how he can access the comment that he entered while starting the environment programmatically. These comment can be seen in the history records of the Release UI as shown below.

But to access them via APIs, we have not documented our release revision APIs publicly but will do so shortly. Till then you can use the below API to get the same history records.

https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}/history?api-version=5.0-preview

For the above release image, the equivalent request/response are: -

Request https://vsrm.dev.azure.com/mseng/AzureDevops/_apis/release/releases/8409800/history?api-version=5.0-preview
Response { "count": 8, "value": [ { "releaseId": 8409800, "changedDate": "2019-02-26T23:13:22.893Z", "changeType": "Start", "changeDetails": "Started 'TFS - Prod Config Change 8726'", "comment": "Set up tfs-uks-1 for AX Everywhere & shadow testing" }, { "releaseId": 8409800, "changedDate": "2019-02-26T23:13:27.027Z", "changeType": "Deploy", "changeDetails": "Queued deployment on 'Single ScaleUnit'", "comment": "" }, { "releaseId": 8409800, "changedDate": "2019-02-26T23:13:27.577Z", "changeType": "Deploy", "changeDetails": "Triggered deployment on 'Single ScaleUnit'" }, { "releaseId": 8409800, "changedDate": "2019-02-26T23:48:06.163Z", "changeType": "Approve", "changeDetails": "Approved pre-deployment approval on 'Single ScaleUnit'", "comment": "" }, { "releaseId": 8409800, "changedDate": "2019-02-26T23:55:55.393Z", "changeType": "Deploy", "changeDetails": "Succeeded deployment on 'Single ScaleUnit'" }, { "releaseId": 8409800, "definitionSnapshotRevision": 1, "changedDate": "2019-02-26T23:11:21.67Z", "changeType": "Create", "changeDetails": "Created 'Draft-8510'" }, { "releaseId": 8409800, "definitionSnapshotRevision": 2, "changedDate": "2019-02-26T23:11:50.72Z", "changeType": "Update", "changeDetails": "Updated 'Draft-8510'" }, { "releaseId": 8409800, "definitionSnapshotRevision": 3, "changedDate": "2019-02-26T23:13:22.72Z", "changeType": "Update", "changeDetails": "Updated 'Draft-8510'" } ] }

Enjoy !!