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
36
votes
9 answers

Is it possible to have a link to raw content of file in Azure DevOps

It's possible to generate a link to raw content of the file in GitHub, is it possible to do with VSTS/DevOps?
Gregory Suvalian
  • 3,566
  • 7
  • 37
  • 66
16
votes
2 answers

Azure Devops 203 Non-Authoritative Information with REST API

While calling a REST API for Azure DevOps I am getting an error 203 Non-Authoritative Information. Actually I want to trigger a release pipeline line with the help of REST API.
16
votes
3 answers

How to set default branch policies in azure devops

Is it possible to set branch policies across all repo's? In other words, When creating a branch, a default branch policy is already set for master.
Igor
  • 323
  • 2
  • 13
16
votes
1 answer

Getting parent of work item through REST API

We are developing an Azure DevOps extension to push changes to work items to an external system. We would like to maintain/preserve the hierarchy in Azure DevOps (Epic-> Feature -> PBI/Bug) in the target system, so we need to figure out which parent…
15
votes
4 answers

API for automating Azure DevOps Pipelines?

I want to automate the queue-ing of Azure Pipelines with an API call, get information on the pipeline/build/job status, Azure Pipelines docs only mention "API" for the "Invoke HTTP Rest API" task:…
janpio
  • 10,645
  • 16
  • 64
  • 107
15
votes
5 answers

Start a build and passing variables through Azure DevOps Rest API

I would like to start a Azure Pipelines build through the REST API. There is an API for queuing builds but I couldn't find a way to define variables.
Pascal Berger
  • 4,262
  • 2
  • 30
  • 54
14
votes
2 answers

How to change pull request's target via Azure DevOps API

The documentation says that the TargetRefName can be updated when "PR retargeting feature is enabled" but I can't find this option anywhere and can't see any documentation about how to enable it either. How do I enable PR retargeting so that I can…
Gibb Sonn
  • 399
  • 4
  • 12
14
votes
1 answer

VSO REST API - Getting user profile image only works with basic authentication?

I'm using the VSO REST API to get all members in a team, from there I'm getting the ImageUrl of the member. If I just bind an Image control to ImageUrl it's blank because VSO requires that I be signed in to get a profile picture... so I created a…
14
votes
2 answers

Is out there any REST API for TFS 2013 On-Premises installation?

We use company Team Foundation Server 2013 for source code and task management. Is there a way how can I manipulate work items within backlog over REST API? Our project is accessible via web url:…
mimo
  • 6,221
  • 7
  • 42
  • 50
13
votes
7 answers

Publishing build artifacts failed with an error: Not found PathtoPublish: D:\a\1\s\$(buildStagingDirectory)

Building CI pipeline for .Net core APIs in VSTS. But while building getting the below error. Publishing build artifacts failed with an error: Not found PathtoPublish: D:\a\1\s\$(buildStagingDirectory) This is my build definition looks like I have…
13
votes
2 answers

How to get the associated changes, check-in comments and linked work items for a particular build/release in VSTS

I am using SendGrid email extension to trigger a custom email notification after the CI/CD process is complete in VSTS. This email task has HTML content in it which includes some content fetched using standard build/release variables…
13
votes
3 answers

Can I set default security and/or branch policies in Azure DevOps?

We're using Visual Studio Team Services for our git server. Each Azure DevOps Project hosts one or many git repos. We have the convention of keeping master and develop branches locked-down, but letting other branches remain unrestricted. I'd like…
STW
  • 44,917
  • 17
  • 105
  • 161
12
votes
4 answers

How to get all repos in Azure DevOps

I have number of projects in Azure DevOps. I want to able to iterate through all Repos in Azure DevOps and get the name of the Repo, Creator of Repo and Last Updated/commit. And get a notification when some one created new Repo?
Pradeep
  • 5,101
  • 14
  • 68
  • 140
12
votes
4 answers

Get all work items from a project azure devops REST API

I'm using Azure devops API to create a notification bot with AWS Lambda node.js. At this moment i need to check if each task work item is attached to a parent user story. The first step will be to get all the task work items on "given" project, for…
12
votes
6 answers

Azure DevOps YAML Pipeline Parameters Not Working from REST API Trigger

I'm trying to create a YAML based pipeline that takes a parameter, then trigger the pipeline to run from a Azure DevOps REST API. I'm able to see the build gets queued, but the parameter was not overridden from my POST body. My template…
little-eyes
  • 945
  • 2
  • 9
  • 14
1
2 3
99 100