Search code examples
azureazure-devopspowerbiodatapowerbi-datasource

How to get the Builds for a project using OData in Azure Devops


I'm trying to get all the builds for a project using Odata for Azure Devops. However I found there was an endpoint for that https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/Builds but while trying the same for my Project I'm getting the below error

{"$id":"1","innerException":null,"message":"Resource not found for the segment 'Builds'.","typeName":"Microsoft.OData.UriParser.ODataUnrecognizedPathException, Microsoft.TeamFoundation.OData.Core","typeKey":"ODataUnrecognizedPathException","errorCode":0,"eventId":0}

Is this endpoint not available anymore. Or is there something wrong with my query?


Solution

  • Is this endpoint not available anymore. Or is there something wrong with my query?

    The entity set Build has been renamed. You can check this post from our User Voice forum.

    All entity sets and entity properties with names starting with Build will be renamed to start with PipelineRun.

    For e.g. Builds entity set will be called PipelineRuns, BuildId entity property will be called PipelineRunId.

    So what you should use is : https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/PipelineRuns. It works on my side :)