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
7
votes
4 answers

VS30063: You are not authorized to access https://dev.azure.com

I am trying to connect Azure DevOps using below code in asp.net core(2.1) mvc app Uri orgUrl = new Uri("https://dev.azure.com/xxxxx/"); String personalAccessToken = "xxxxx"; VssConnection connection = new VssConnection(orgUrl, new…
nakul89
  • 117
  • 1
  • 1
  • 7
7
votes
3 answers

Cloning all remote repositories from TFS

Is there a way to clone all the master branches from all the projects uploaded under 1 account. I have a requirement to backup all the code in master branch every week. Is there a way to accomplish this using git, Powershell or any other way? Note…
Harsha W
  • 3,162
  • 5
  • 43
  • 77
7
votes
4 answers

How to count all Pull Requests with Azure DevOps REST API

I am trying to use the Azure DevOps REST API to count the total number of Pull Requests in our repository, and eventually use it to hopefully get some more useful info out of the git data. I have tried using a GET request to the repository to…
Shep Sims
  • 698
  • 9
  • 27
7
votes
1 answer

How do you get available Area Paths from Azure DevOps Services REST API?

I cannot find how to retrieve the Area Paths from the API. I was able to get to the Iteration Paths but not Area Paths. I'm technically using the c# wrapper I've tried going through…
Ryan E.
  • 977
  • 8
  • 16
7
votes
1 answer

DevOps : Non-Interactive login in new DevOps(VSTS) not working getting error 'TF30063: You are not authorized to access

I am trying to connect to Azure DevOps previously known as VSTS using c#. I want to connect to it without the login screen of azure DevOps. I am currently trying the following code but some how it is not working NetworkCredential netCred =…
Student
  • 304
  • 3
  • 15
7
votes
3 answers

getting 203 with error when using vsts rest api

When I'm trying to create a new work item in VSTS with the POST request: https://galilinetsky.visualstudio.com/Automatiom/_apis/wit/workitems/$Test%20Case?api-version=5.0-preview.2 I get the next response : Microsoft Internet Explorer's Enhanced…
Gal I.
  • 201
  • 3
  • 12
7
votes
3 answers

How to list all the files that are in TFS GIT repo using REST API

All, I am trying to get the list of all the files that are in a particular repo in TFS GIT using REST API. I found the below one but it only display the contents of the specific file name mentioned after "scopePath=/buld.xml", it only display the…
7
votes
1 answer

Issue when updating build definition using the REST api of VSTS

I want to update a variable in my build definition but when it tries to run the Invoke-RestMethod I receive the following exception: Invoke-RestMethod : {"$id":"1","innerException":null,"message":"This request expects an object in the request body,…
Mivaweb
  • 5,580
  • 3
  • 27
  • 53
7
votes
2 answers

How to return the full comments when using the VSTS Api to get a list of commits?

I have a script for using the VSTS api to generate a log of commits between two different versions, however the response from the VSTS api returns the comments as truncated. This is the most important part of the log for my purposes and as such…
7
votes
1 answer

AJAX cross domain issue with Visual Studio Team Services REST API

I'm trying to write a JavaScript client for Visual Studio Team Services REST API which send AJAX requests to our self hosted Team Foundation Server 2015 but I'm facing to a cross domain issue. The API requires credentials to authenticate but due to…
Jérôme MEVEL
  • 7,031
  • 6
  • 46
  • 78
7
votes
1 answer

Using WIQL, how do you query VSTS Work Items on System.Tags

This is not an on-premise install, just VSTS. I'm new to working with the VSTS REST API and WIQL. I am trying to run a query that filters my work items on System.Tags = 'User Generated'. When I retrieve my Work Item, I can see in the…
Papa Burgundy
  • 6,397
  • 6
  • 42
  • 48
7
votes
2 answers

How to add a comment to a work item using Visual Studio Team Services REST API

Is it possible to add a comment to a work item in Visual Studio Team Services using the REST API? I've checked the work item doc and fields doc but I couldn't see anything in the fields JSON which looked like it's the comments field. The scenario…
Kevin Kuszyk
  • 1,958
  • 24
  • 37
6
votes
1 answer

How to link a work item to a pull request using REST API in Azure DevOps?

Within a release pipeline a new Pull Requested is created using REST API. How to link a specific (already existing) Work Item to the Pull Request using REST API? In the current version (DevOps 2019) it is not supported to link Work Items using Pull…
lg2de
  • 616
  • 4
  • 16
6
votes
3 answers

Azure-devops rest api - pagination and rate limit

I am trying to pull Azure-Devops entities data (teams, projects, repositories, members etc...) and process that data locally, I cannot find any documentation regarding rate-limiting and pagination, does anyone has any experience with that? There is…
Samion
  • 85
  • 1
  • 5
6
votes
3 answers

How to get the userId field in Azure Devops API

I have to use this API : PATCH https://vsaex.dev.azure.com/{organisation}/_apis/userentitlements/{userId} to give read access to some projects to all users in my organisation. I am able to call this API, with success, but I don't know how to get the…
Frip
  • 129
  • 1
  • 8