azure-devops-rest-api

VSTS API : create bug in current iteration

我的未来我决定 提交于 2020-01-06 09:06:13
问题 I am able to successfully create a bug in VSTS using REST API via powershell. See this question for some back story. But how do I specify it to create the bug in the current iteration ? Do I have to find out what is the current iteration prior to providing the path ? Is there no way to just directly create it in the current iteration ? Please note that this question is about Create Work Item API, whereas the question mentioned here is about the Iteration API. 回答1: There isn’t such feature in

VSTS API - repository creation date

一曲冷凌霜 提交于 2020-01-06 07:10:57
问题 I've checked VSTS REST API documentation, but I haven't found a method which allows me to get information about the repository creation date. Is it possible to get such data via the VSTS API? 回答1: I don't think it is possible to get the exact date of the moment the operation create repo was completed. However, logically the birthday of the repository is usually considered its first commit date. If that's what you're looking for, you can achieve your goal with a usual Git command: git log -1 -

How can I call pre-release Rest Apis from an Azure DevOps extension?

拟墨画扇 提交于 2020-01-06 04:50:07
问题 It seems REST clients for preview versions of the Azure DevOps REST APIs do not get published. So the API is there and works, but a REST client is not. So how can I access e.g. the 6.0 (as of now: preview) feature pagesBatch from an Azure DevOps extension? 回答1: Because it's a preview API and not included yet in the SDK you can do a pure HTTP Get/Post Rest API calls with Typescript, for example: Install: npm install --save request npm install --save request-promise-native Then in the extension

Get TFS Webhook SubscriptionStatus

时光怂恿深爱的人放手 提交于 2020-01-06 02:46:10
问题 From my previous question link here it appears that we do not have a feature in any version of TFS/Azure DevOps to setup monitoring for the webhook subscriptions. As a workaround I'm now looking to write a PowerShell script to check the heartbeat of the subscription. From the Microsoft documentation link here it appears we can get the SubscriptionStatus by querying the subscription ID. On a GET request for below API I receive all the details specified in the documentation but I'm unable to

How can I call the Wiki REST Api from an Azure DevOps extension?

梦想与她 提交于 2020-01-05 07:12:45
问题 The Add a dashboard widget tutorial explains how to call the work item REST API using a VSS.require("TFS/WorkItemTracking/RestClient") d rest client. I want to do the same, but for the Wiki Rest API. There certainly is a scope for this: vso.wiki . However, I cannot find the equivalent of "TFS/WorkItemTracking/RestClient" for wiki. Maybe it is as simple as "TFS/Wiki/RestClient" , but even if it was, what are the names and parameters of the functions I can use? I don't find that documented

Release Variables through REST API - Visual Studio Team Services

筅森魡賤 提交于 2020-01-04 00:08:11
问题 Is it possible to pass variable values to the REST endpoint for Release Management in VSTS? E.g. Calling PUT https://tfs.vsrm.visualstudio.com/defaultcollection/{project}/_apis/release/releases/30?api-version=3.0-preview.4 with the request of: { "id": 30, "name": "Release-3", "variables": { "VariableName": { "value": "testing123" } } } I somehow managed to get it to work if I call POST https://k2tfs.vsrm.visualstudio.com/density/_apis/release/releases/?api-version=3.0-preview.4 then take that

Update VSTS test case status to PASS / FAIL using rest api

丶灬走出姿态 提交于 2020-01-03 05:50:48
问题 I want to update a test cases status in VSTS using rest api. Based on test case Id I want update the testcase to PASS or FAIL. Which rest api can be used from where I can pass status? Thank you 回答1: You can update the last test result for a sepcific test case, then the outcome will reflect on the test case. Get the last test run ID first. (User the REST API - Get a list of test runs) Use the REST API to update the specific test result. PATCH https://dev.azure.com/{organization}/{project}/

How to create Build Definitions through VSTS REST API

£可爱£侵袭症+ 提交于 2020-01-02 08:43:09
问题 Situation: I'm currently working on automating CI/CD configurations through bitbucket -> vsts -> azure. My ideal result is to be able to copy paste (or manually enter) my configuration values into their respective console programs and have the applications configure the whole CI/CD ordeal without having to click through all the web interfaces. It's now possible in Bitbucket and Azure, but creating the VSTS CI/CD configurations through REST API is proving to be difficult. Azure resources and

Authenticating to VisualStudioOnline REST API with Personal Access Token using Python 3.6

ぃ、小莉子 提交于 2019-12-31 03:08:11
问题 I am trying to use the VisualStudioOnline REST API using python 3.6. (Plenty of examples using python 2.x.) The python script response is the generic html login page. I have tested the url generated by this script using REST Console Chrome plug-in and it worked fine using my personal access token. import json import base64 import urllib.request personal_access_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" headers = {} headers['Content-type'] = "application/json" headers[

Not able to print the Azure-Keyvault secret in the release pipeline

心已入冬 提交于 2019-12-29 10:00:08
问题 I am trying the below code to retrieve the Azure-Key vault secret from the release pipeline. But I am not able to print the exact string using the below code (Get-AzKeyVaultSecret -vaultName "keyvalultname" -name "Password").SecretValueText $Password= (Get-AzKeyVaultSecret -vaultName "keyvalultname" -name "Password").SecretValueText $Password Write-Output 'DBPassword is $Password' Write-Host 'DBPassword is $Password' if ($Password-eq "Password01") { Write-Host "1" } else { Write-Host "0" }