I am using Azure DevOps rest API to get list all releases and artifact build ID's associated with each release. The call function:
GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?api-version=7.1-preview.8
list all releases. From there, I can get the release IDs, which I input manually into the call function:
GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}?api-version=7.1-preview.8
The response from this call has artifacts, and I can get the build ID of that artifact through artifacts/definitionReference/version/id
Is there any way to get to artifacts through the list releases call? I have used $expand=$artifactsadded to the first list function, but no artifact appeared in the response.
Any advice would be appreciated.
You could loop the release IDs from the first list function to get all the artifacts by the
ForEach ($ReleaseId in $ReleaseIds ).