azure-devops-rest-api

Query VSTS for all PBI's with no open tasks

半腔热情 提交于 2019-12-14 03:25:23
问题 I would like to be able to create a query in VSTS that will return a list of PBI's (from a specific sprint/area) where all tasks are "Done". It this possible? From what I can see around SO this requires using the REST API of VSTS. Would I be able to create a chart in a dashboard with a hierarchy list? Thanks :-) 回答1: You should be able to do this, although you will also get the tasks returned, but you should be able to easily filter those out depending on what you are trying to do. Use the

How to limit build task only to VSTS not TFS

假装没事ソ 提交于 2019-12-13 17:16:14
问题 I have a VSTS extension with two build tasks, one build task should be available for both VSTS and TFS, the other one only for TFS. Is it possible to configure this for each build task via extension manifest? 回答1: I have used the following workaround to display message and discontinue the build in TFS. var collectionUrl = process.env["SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"]; var regExpression = new RegExp("^((https?)\:\/\/)(([a-z0-9])+\.)*(visualstudio\.com)"); if(regExpression.test

vNext and new task RunDistributedTests - parallel testing

穿精又带淫゛_ 提交于 2019-12-13 07:20:14
问题 In TFS update 2 is available new task "RunDistributedTests" it can work with test plans and test suites. In my case I want run test suite on 5 machines at the same time (parallel testing) My test suite include Coded UI tests. The machine group to consists of 5 tests machine. After execution I see the next result: The tests running only one machine that is the first at the list of Machine group. Other machines doesn't have any action. I checked the log file DTAExecutionHost.exe.log and found

How can I get the PullRequestId via a BuildId?

旧城冷巷雨未停 提交于 2019-12-13 03:54:28
问题 How can I get the Pull Request Id via a Build Id? Is there any existing Rest API to support this? 回答1: You can get the build details with Builds - Get Rest API (you just need the Build Id): GET https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}?api-version=5.0 In the JSON response, you got also the Pull Request Id: "parameters":"{ \"system.pullRequest.pullRequestId\":\"1\",\"system.pullRequest.sourceBranch\":\"refs/heads/build\",\"system.pullRequest.targetBranch\":\

VSTS Rest API return specific item from Changeset API

懵懂的女人 提交于 2019-12-13 03:24:26
问题 I'm calling the REST API to return all of the files that are changed from a particular changeset, what I really want to do is just return the URL property of a specific item that has a known path. So what I have now is the Changeset API calling https://someplace.visualstudio.com/_apis/tfvc/changesets/19483/changes This return something like { "count": 10, "value": [ { "item": { "version": 19483, "size": 882, "hashValue": "ACWU0KSlO+jbsSJB5IwU4Q==", "path": "$/WaveDatabases/MasterData/Custom

Obtain TFS GIT Commit Details From TFS Work Item Artifact Link

谁说我不能喝 提交于 2019-12-12 18:08:51
问题 Is it possible to leverage TFS or TS REST api to obtain details for a GIT commit by leveraging the work item commit "ArtifiactLink" url? 回答1: So you want to get detail commit information based on a work item artifacts link (while the artifact link type contains commit). You can achieve that with two REST API, detail steps as below: 1. Get the work item with full expanded GET https://{instance}/DefaultCollection/_apis/wit/workitems/{id}?api-version1.0&$expand=all For TFS2015, the format looks

VSTS API Refresh Token Expires

时间秒杀一切 提交于 2019-12-12 05:35:27
问题 I'm using the VSTS REST API. I use the refresh token, as instructed, to refresh the access token. This morning, the refresh tokens stopped working. Do they expire? If the access token and refresh token have both expired, how do I proceed? I can't find anything on this. For reference: https://www.visualstudio.com/en-us/docs/integrate/get-started/auth/oauth#refresh-an-expired-access-token 回答1: Yes, the refresh token will be expired, you need to send request to re-authorize to get access token

Cannot create batch work items using batch operations in TFS

不羁的心 提交于 2019-12-12 05:15:36
问题 I am getting below errors while trying to create workitems with batch creation method Error 1 "Message":"No MediaTypeFormatter is available to read an object of type 'JsonBatchHttpRequest' from content with media type 'application/json-patch+json'." Error 2 {"count":1,"value":{"Message":"One or more errors occurred."}} I have referred to this documentation https://www.visualstudio.com/en-us/docs/integrate/api/wit/batch from Microsoft . and my question on stackoverflaw Create Large Amount of

Use OAuth Bearer Token instead of PAT in Ajax calls to VSTS API

可紊 提交于 2019-12-12 05:05:02
问题 I've successfully got my ASP.NET (MVC5) application reading from and writing to our VSTS work items in C# on the server side. However, for the best user experience I really want to make some updates using Ajax. I've been able to get this working perfectly using a Personal Access Token (PAT) created under my own account. For example, this works fine: var vstsAuthHeader = { "Authorization": "Basic " + btoa("" + ":" + "abcd...123") } function updateRoadmapGroup(featureId, newRoadmapGroup) { var

Update vsts-npm-auth with new username and password

匆匆过客 提交于 2019-12-12 04:29:04
问题 I have installed the vsts-npm-auth package using following command: npm install -g vsts-npm-auth --registry https://registry.npmjs.com And I ran vsts-npm-auth -config .npmrc command to set the credential but I am facing below error: Now I need to update the credential but it always fetches the existing credential. Is there any way to send PUT request and update the credential ? 回答1: I made it work with help of my colleague. Uninstall vsts-npm-auth package remove NPM cache delete .npmrc file