azure-devops-rest-api

Automation account rerun, a jobshedule already exist

╄→尐↘猪︶ㄣ 提交于 2020-01-25 10:14:16
问题 I have created a CD pipeline in Azure DevOps that will deploy an Azure Automation account and a runbook , shedule , jobshedule through ARM templates. All working fine except when rerunning the template. My template is a part of a large deployment process that is still under construction so until the total scope is finished the ARM template that creates the runbook, shedule, jobshedule will rerun with every release. The problem right now is the following: Whenever I rerun the template with a

How to script build schedule using Azure DevOps REST Api?

杀马特。学长 韩版系。学妹 提交于 2020-01-25 08:04:17
问题 This question is continuation of my other question - How to schedule an on-premise Azure DevOps build to run every 5 minutes? I cannot figure out how to script the schedule for a build. What API am I supposed to use? EDIT 1 I want to emphasize - I do not want to queue the build myself every 5 minute. I want to script a schedule of the build. So, I am at the Definition Update REST Api - https://docs.microsoft.com/en-us/rest/api/azure/devops/build/definitions/update?view=azure-devops-rest-5.1

How do I get a list of document collections in a given TFS web extension?

ε祈祈猫儿з 提交于 2020-01-25 00:01:14
问题 I'm trying to get a list of documents from my on premises TFS 2017 (U3) web extension using Microsoft/vsts-node-api. I can get the extension itself with something like the following import * as v from 'vso-node-api'; import * as xa from 'vso-node-api/ExtensionManagementApi'; import * as xi from 'vso-node-api/interfaces/ExtensionManagementInterfaces'; let serverUrl = process.argv[2]; let extensionId = process.argv[3]; async function getWebApi(serverUrl): Promise<vm.WebApi> { return new Promise

Access Azure Blob storage of a user using oauth2 token obtained

坚强是说给别人听的谎言 提交于 2020-01-24 20:33:06
问题 In Azure blob storage what I need is to get the access token when a user signs into his account, and by using this access token to perform list/upload/download the files in user blob storage.(Similar to what we can do in Dropbox/Google drive). Using the given request user authentication I am getting the code, https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize? client_id=client_id&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F&response_mode=query&scope=openid

How to find Audience field for Active Directory OAuth Authentication? (How to send a post request to DevOps from Azure Logic App?)

被刻印的时光 ゝ 提交于 2020-01-24 09:38:24
问题 Please help me with this problem. I'm trying to send a post request from Azure Logic App to the DevOps to create a release. I created an http action in my Logic App, This is the uri for creating a release: https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?api-version=5.0 I'm using Active Directory OAuth for authentication, which I need to provide tenant, client id, audience and secret. I'm using tenant, client id and secret of my application in Azure Active Directory,

How can I access pagesBatch from Azure DevOps?

柔情痞子 提交于 2020-01-16 19:35:27
问题 This works fine curl -vsu ":${pat}" -XGET \ "https://dev.azure.com/${organization}/${project}/_apis/wiki/wikis/${project}.wiki/pages/20/stats?api-version=6.0-preview.1&pageViewsForDays=3" but the following gives me an HTTP 401 - using the same personal access token : curl -vsu ":${pat}" -d '{"top":5}' -XPOST \ "https://dev.azure.com/${organization}/${project}/_apis/wiki/wikis/${project}.wiki/pagesBatch?api-version=6.0-preview.1" Here are specs for the former and for the latter. I am admin of

VSTS Dashboard Widget getWorkItem optional parameter expand

余生颓废 提交于 2020-01-16 16:29:06
问题 I am writing a VSTS dashboard widget used for Work Item Tracking However I am running into a problem when using the getWorkItem() function. I want to get the ids of all the Features under a given Epic (I already know the epic ID). I am confident that if I set the expand paremeter of getWorkItem() to "All" I will get a list of all the Features and their respective ids. Unfortunately I do not know how to define the "type" of expand parameter and how to properly pass it as a value to the

How to extract WorkItems from query in VSTS (Azure DevOps) with Python REST API?

丶灬走出姿态 提交于 2020-01-16 15:19:11
问题 I'm using the official Python REST API of Azure DevOps: https://github.com/Microsoft/azure-devops-python-api Thanks to the samples I have been able to retrieve information on Test Cases from ids. How to do it from queries (WIQL)? Here is my code so far (with modified tokens and links): from vsts.vss_connection import VssConnection from msrest.authentication import BasicAuthentication token = "hcykwckuhe6vbnigsjs7r3ai2jefsdlkfjslkfj5mxizbtfu6k53j4ia" team_instance = "https://tfstest.toto.com

TFS2015 REST API Build definition update

三世轮回 提交于 2020-01-11 09:52:21
问题 I'm trying to update a build definition through REST API with PowerShell. The script used is: $url = "http://tfs:8080/tfs/collection/project/_apis/build/definitions/$($buildId)?api-version=2.0" $obj = Invoke-RestMethod -Uri $url2 -Method Get -ContentType "application/json" -UseDefaultCredentials $json = ConvertTo-Json $obj Invoke-RestMethod -Uri $url -Method Put -Body $json -ContentType "application/json" -UseDefaultCredentials First I've tried with a new empty definition and I've got the

How to create child tasks under existing user story using TFS rest API in C#?

此生再无相见时 提交于 2020-01-06 11:44:08
问题 I know there is a provision for creating user story and a child task in batch call by using TFS rest API as mentioned in https://www.visualstudio.com/en-us/docs/integrate/api/wit/samples. But my requirement is I already have existing user story and I want to create child tasks under existing user story in c#. Does anybody is having an idea how to do this? 回答1: Refer to this sample code: var url= new Uri("https://XXX.visualstudio.com"); VssCredentials c = new VssCredentials(new Microsoft