Questions tagged [azure-devops-rest-api]

Azure DevOps Services REST API (previously: Visual Studio Team Services REST APIs) is a set of APIs allowing management of Azure DevOps (formerly: Visual Studio Team Services) accounts as well as TFS 2015/2017/2018/2019 servers.

What's your goal? APIs to use:

  • Accounts and Profiles
    • Access user accounts or profiles
  • Build (2.0)
    • Automatically kick off a build
    • Get details from a completed build
    • Add a tag to a build
  • Widgets
    • Add a widget to a dashboard
  • Git
    • Get Git repositories
    • Add status to a commit
    • Get details/status for a pull request
    • Create a file (push)
  • Project and Teams
    • Create a project
    • Get a list of projects
  • Work Item Tracking
    • Get a list of work items
    • Create a work item
    • Update a work item
    • Add a link to a work item

More Information

1869 questions
6
votes
1 answer

Is there a way to get the raw diff of a commit via the Azure Devops API?

As part of our application, we're building an ability to integrate with Azure DevOps' REST API. One key component that we're interested in is being able to see actual diffs of specific commits, so that we can look at and analyze the line content.…
6
votes
2 answers

How do you add tags to Product Backlog Items on DevOps using Rest API?

I'm using the DevOps API to post Backlog Product items to our DevOps. I know the reference names for title ("path": "/fields/System.Title"), description (path": "/fields/System.Description"), and comments ("path": "/fields/System.History"). But I…
Omega
  • 750
  • 1
  • 8
  • 24
6
votes
1 answer

How are "related" work items for pull requests determined in VSTS?

I've recently discovered that work items linked to pull requests can be used when seeing which work items are associated with different deployments. That said, I want to make sure the related work items are accurate. I could link my work items…
6
votes
2 answers

How to add Azure AD user to Azure DevOps organisation programmatically

My organisation is connected to Azure AD. I'd like to add AD users to my Azure DevOps organisation with C# or via Microsoft REST/Graph API.
6
votes
3 answers

How to get stage results from YAML pipelines in Azure DevOps

Until now, I am using the Azure DevOps REST Api to get the data from releases in Azure DevOps for reporting purpose. Obviously, this will change with the new way how to use CI/CD --> YAML and the Multi-Stage-Pipeline (currently preview). In that…
6
votes
1 answer

How I can get attachments detail for my workitem using Azure DevOps Rest API

I am trying to get the list of the attachments against my workitem along with that I need, attachment count, attachments name. which are attached to my workitem. I tried to read the documentation of Azure DevOps I can see the…
Sajjad Sarwar
  • 96
  • 1
  • 8
6
votes
2 answers

Azure Devops Rest API - Find out Queue Jobs on a specific Agent Pool

From the Azure-DevOps Rest API documentation https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-5.1 there is no clear way to query for the Jobs running on a specific Agent Pool. Went through the different API calls plus…
Joaquin
  • 85
  • 1
  • 6
6
votes
1 answer

Access file content within an Azure Dev Ops/VSTS artifact using REST API

I am looking to get the contents of a file I pushed as an artifact to Azure DevOps I was able to get a json response with a URL to the artifact zip by using this…
6
votes
2 answers

Azure Devops Rest API- Get builds currently queued in Agent Pool

Is there a way to only get the builds that are waiting in queue for an available agent in a specific pool from the Azure DevOps rest API? I currently have this endpoint that provides me with all the job requests that occurred in the…
Kevin
  • 89
  • 4
6
votes
1 answer

Source Providers - List Branches - What is the providerName?

Source Providers - List Branches: https://learn.microsoft.com/en-us/rest/api/azure/devops/build/source%20providers/list%20branches?view=azure-devops-rest-5.0 "GET…
ar.dll
  • 767
  • 4
  • 16
  • 35
6
votes
1 answer

Get pull request attached to work item

I would like to access information about all pull requests that are linked to a particular work item. The relations on a work item result (e.g. https://.../_apis/wit/workItems/12345?$expand=all) shows links to the pull requests in this…
JoeGaggler
  • 1,207
  • 1
  • 13
  • 28
6
votes
2 answers

How to connect TFS Online using PAT or OAUT?

Can't believe I'm stuck with a LOGIN :( hate when this happens. Can somebody enlight me how to connect TF.EXE by using PAT password or in the best case an OAuth token? I might add that I already have a Pat token and an OAuth token, not a problem…
Yogurtu
  • 2,656
  • 3
  • 23
  • 23
6
votes
1 answer

Using VsConnection WorkItemTrackingHttpClient patch to add parent relation via VSTS client API

I am trying to programmatically add a parent-child relationship between two work items. I am using the Microsoft Team Foundation and Visual Studio Services libraries to export and import TFS 2015 and VSTS backlog objects.…
Ross
  • 163
  • 2
  • 9
5
votes
1 answer

How to use Powershell 7 Get-AzVMImage to get latest version

I'm trying to use the Azure Powershell 7 commandlet to get the latest version of the Canonical UbuntuServer 18.04-LTS. Here is an example of my query: >> Get-AzVMImage -Location "eastus" -PublisherName "Canonical" -Offer "UbuntuServer" -Skus…
5
votes
4 answers

Azure Devops Get a repositoryId by using repository name

I am writing a BASH script, where its creating an azure repo and then pushing code. post this step it will go-ahead and create an azure pipeline via azure-pipeline.yaml file present in the Azure repo. At this step we need to pass the repository ID…