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
0
votes
1 answer

How to get completed/remaining value from work item using web hooks in azure devops?

I would like to create web hook at work items updating event in azure devops server. Is there a possibility to get old and new value of fields 'Completed work' and 'Remaining work' from the http request? Or any workarounds? I want to write tool to…
Fiztex
  • 103
  • 2
0
votes
1 answer

How can I create a PR across forks using the Azure DevOps Service API?

I have two repos on Azure DevOps, let's call them parent_repo and child_repo. The child_repo is a fork of the parent. What I'd like to do is create a PR to merge master of child_repo to master of parent_repo using the Azure DevOps Services API, by…
Zev Averbach
  • 1,044
  • 1
  • 11
  • 25
0
votes
1 answer

Run pre validation builds if PR's are raised by a specific Team in VSTS/Azure devops

Problem Statement: I have a shared repository shared between 3 teams. They have some shared components and some individual components. We have a mainline branch A wherein all 3 teams merge their feature branches. Presently there are no build…
B.T Anand
  • 549
  • 1
  • 13
  • 26
0
votes
1 answer

Use Python requests to filter Azure DevOps Services REST API agent pools

What specific changes need to be made to the below code in order to successfully filter the list of Agent Pools by the properties name and isHosted using the Python requests module and the Azure DevOps Services REST API endpoint documented at this…
CodeMed
  • 9,527
  • 70
  • 212
  • 364
0
votes
1 answer

Update defaultBranch of build definition via Azure DevOps API

I need to update the defaultBranch of build definition via Azure API. The is the documentation for PUT request: https://learn.microsoft.com/en-us/rest/api/azure/devops/build/definitions/update?view=azure-devops-rest-5.1 The problem is that I don't…
Basil Kosovan
  • 888
  • 1
  • 7
  • 30
0
votes
1 answer

missing devops REST API asOf parameter for workitem comments

devops REST API provides a very handy asOf paramater for workitems in order to get a past snapshot of their state. https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/list?view=azure-devops-rest-5.1#uri-parameters we would like…
camous
  • 998
  • 11
  • 27
0
votes
1 answer

Trying to get TFS bug State change dates by Reading defect History from TFS ticket using rest api

I am trying to chart out the ticket state change dates to uncover the average time each ticket sits in each of its states (Bug Life cycle). Using rest API's able to get the Create/closed/Resolved dates etc but how can I get the state change…
0
votes
1 answer

Git diff api limit issue | azure-devops-rest-5.1

I started using azure git diff api, to find out the difference between two branches. My problem is I can not able the whole set of difference between the two base and target branch. I read somewhere in the document that default 100 diff we can…
Indrajeet Gour
  • 4,020
  • 5
  • 43
  • 70
0
votes
1 answer

Update Service Hook in Azure DevOps Using PowerShell

Wondering if someone knows how to do this as I've been struggling to do so. I'm attempting to put together a PowerShell script that will hopefully update any service hooks which we have setup in Azure DevOps, so their statuses become enabled.…
0
votes
1 answer

Query Pull Requests by CommitID without Repository ID

Can I get the Pull Requests by commit ID without providing a repository ID? I am auditing releases and need information provided by PRs. I am starting without repository info in the data so currently need to query the Repository api and then…
0
votes
1 answer

How to Create an Azure DevOps Iteration Across Multiple Projects via the APIs

The answer here works for a single project, Azure DevOps Rest API - Unable To Create New Iteration But fails when you loop through multiple projects as it seems the way the the API works in the link above it creates an iteration which has a name…
Michael Cropper
  • 872
  • 1
  • 10
  • 28
0
votes
1 answer

How to get the list of work items linked to a build pipeline via the REST API in Azure

I'd like to get the list of work items (id) that are linked to a current build pipeline from some PowerShell script using the Azure Rest API, how can I do that? Azure Devops Server 2019
fduff
  • 3,671
  • 2
  • 30
  • 39
0
votes
1 answer

How to work item get history items for changes where only links changed

I work with the Azure DevOps API and use the Revisions function to get the work item history. I have seen a strange behavior when the work item (test case in my example) changed only by removing a work item link (no comment added nor other fields…
Gaspar Nagy
  • 4,422
  • 30
  • 42
0
votes
2 answers

UPDATE: Azure DevOps API: Sending commands to the REST API that are JSON instead of a URI

I am a little new to using the REST API for Azure DevOps and have it working fine where I can send my requests that are basically the URIs I see on the website for the API. Then I get that JSON response and de-serialize it into a class from the…
JMZ
  • 1
  • 1
0
votes
0 answers

CI / CD Pipeline - Azure Result Update

I have created my Build definition and was able to execute the scripts. But we have scripts (We have used Rest API's) to update the results in Azure. But we are gettign error message while running in pipeline stating that Test Plan does not exists…
karthik
  • 19
  • 4