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
12
votes
3 answers

Enforcing a Squash merge on Azure DevOps Pull Request using GitPullRequestCompletionOptions

I am attempting to use the Azure DevOps Services REST API to set the PR Completion Options to enforce a squash merge on a Pull Request. Note: I can't set a branch policy to enforce a squash merge as I am testing certain conditions to see if a squash…
Brett McKenzie
  • 545
  • 4
  • 12
12
votes
5 answers

Get all organizations in Azure DevOps using REST API

I am trying to retrieve all the organizations in my account but in the documentation an organization is always required in the API call. https://dev.azure.com/{organization}/_apis/...
Kamil
  • 176
  • 2
  • 14
12
votes
4 answers

Why I get Internet Explorer enhanced security error message in Chrome if I call VSO API from Angularjs SPA?

I have a SPA implemented in Angularjs - Typescript calling VSO API and providing authentication data you can find below: ((): void => { "use strict"; angular .module("app") .config(config); config.$inject = [ …
11
votes
2 answers

Include code coverage report in VSTS, Is Test Adapter mandatory for VSTS?

I am generating code coverage using Karma-coverage. I can host my output coverage folder on http-server and view it locally. How do I make this report visible on VSTS code coverage tab? Do I need to re-format my coverage result in VSTS…
10
votes
5 answers

Azure DevOps Rest API to create a branch from a specific branch

I'm looking for an Azure DevOps Rest API to create a new branch from an existing branch.
irudne
  • 189
  • 1
  • 2
  • 8
9
votes
1 answer

Azure rest API (6.0-preview.1) Run Pipeline returns : "Value cannot be null.\r\nParameter name: runParameters" via postman

I try to invoke rest API to azure via postman first, I invoke get pipelines API to get the pipeline id and the result is: 2 the response : { "count": 1, "value": [ { "_links": { "self": { …
user63898
  • 29,839
  • 85
  • 272
  • 514
9
votes
3 answers

Azure DevOps REST API swagger url

Does Azure DevOps REST API has swagger url? I would like to be able to generate wrapper code in C# or Powershell around it, but cannot find it.
mark
  • 59,016
  • 79
  • 296
  • 580
8
votes
1 answer

Using OAuth and PowerShell to Update Azure DevOps Wiki Pages

I am trying to automate the creation of release notes in Azure DevOps release pipelines by creating a new page in the Azure DevOps wiki using it's Rest API. The issue I'm having is that I'm using a PowerShell script task to post to the Rest API and…
8
votes
2 answers

VSTS Pull request API - how to get the IdentityRef

I am using VSTS Pullrequest create API method to automate the PR creation, in the request i need to provide various IdentityRef id values for createdby/autocompleteby/reviewers properties. In my case all i have is user details (like full name, email…
Mahender
  • 5,554
  • 7
  • 38
  • 54
8
votes
1 answer

List files of a build artifact

I've seen that in the 5.0 preview of the REST API it seems possible to download a specific file from a build artifact using : GET…
Rémi Benoit
  • 1,307
  • 11
  • 17
8
votes
1 answer

How to add work item as child to parent?

I've been able to find documentation on creating work items via the VSTS REST API, however, I haven't been able to find anything creating a work item and linking it to a Parent work item. Searching around, I've seen some links regarding a…
Joe
  • 587
  • 1
  • 8
  • 15
8
votes
1 answer

How do I programmatically add attachments to test results during a build in VSTS?

I'm looking for a way to add my own attachments to test results so that I can see them after a build has completed here... I would like to add these programmatically, during a build and after a test has failed. The attachments will be…
Konzy262
  • 2,747
  • 6
  • 42
  • 71
7
votes
2 answers

Azure DevOps REST api - Run pipeline with variables

I have a pipeline on Azure Devops that I'm trying to run programatically/headless using the REST api: https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/run%20pipeline?view=azure-devops-rest-6.0 So far so good, I can auth and…
7
votes
3 answers

How to download pipeline artifacts from azure pipeline to local using powershell?

I need to download artifacts from azure pipeline on my local machine. Can anyone help in doing this using powershell script?
7
votes
2 answers

how to get target branch from a pull request using azure devops api or other methods?

I'm trying to make a single build pipeline for 3 env (dev, qa, prod) but with ability to choose which one to build from. The idea is to keep the pipeline on prod branch or another repo, and not having it in every env. The issue now is that on a PR…
dAn
  • 517
  • 1
  • 6
  • 10