azure-devops-rest-api

Set Azure devops Release pipeline variable using REST API

戏子无情 提交于 2020-06-23 11:13:14
问题 I am able to update the variable in the build pipeline using the below json body $body = ' { "definition": { "id": 25 }, "parameters": "{\"var\":\"value\"}" } ' The same json is not working with Release pipeline . Is there any way to pass the variable through same way through release pipeline 回答1: Set Azure devops Release pipeline variable using REST API We could use the REST API Definitions - Get to get all the info about this definition in the body, then we could update the body and use the

Set Azure devops Release pipeline variable using REST API

微笑、不失礼 提交于 2020-06-23 11:08:23
问题 I am able to update the variable in the build pipeline using the below json body $body = ' { "definition": { "id": 25 }, "parameters": "{\"var\":\"value\"}" } ' The same json is not working with Release pipeline . Is there any way to pass the variable through same way through release pipeline 回答1: Set Azure devops Release pipeline variable using REST API We could use the REST API Definitions - Get to get all the info about this definition in the body, then we could update the body and use the

How I can get attachments detail for my workitem using Azure DevOps Rest API

Deadly 提交于 2020-06-16 07:33:50
问题 I am trying to get the list of the attachments against my workitem along with that I need, attachment count, attachments name. which are attached to my workitem. I tried to read the documentation of Azure DevOps I can see the following https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/attachments?view=azure-devops-rest-5.0 It has Get, Create and List endpoints available. But to get it asks for the attachment ID which not available because no endpoint returns the attachment details.

How I can get attachments detail for my workitem using Azure DevOps Rest API

久未见 提交于 2020-06-16 07:33:26
问题 I am trying to get the list of the attachments against my workitem along with that I need, attachment count, attachments name. which are attached to my workitem. I tried to read the documentation of Azure DevOps I can see the following https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/attachments?view=azure-devops-rest-5.0 It has Get, Create and List endpoints available. But to get it asks for the attachment ID which not available because no endpoint returns the attachment details.

TypeError: Object of type WorkItem is not JSON serializable

核能气质少年 提交于 2020-05-24 05:29:46
问题 I received this error after running the script below. I would like to create a json file through the result that is generated in this script. What can I do to correct this problem? I tried to do it via API but I couldn't get the fields I need from this DevOps table. from azure.devops.connection import Connection from msrest.authentication import BasicAuthentication from azure.devops.v5_1.work_item_tracking.models import Wiql import json token = 'xxx' team_instance = 'https://dev.azure.com/xxx

Approve a yaml pipeline deployment in Azure DevOps using REST api

◇◆丶佛笑我妖孽 提交于 2020-05-13 09:30:37
问题 I'm using the new multi-stage pipelines in Azure DevOps to manage deployments to Azure environments. I setup the corresponding Environments in Azure DevOps so that we can explicitly approve the actual deployments for each system. We want to provide a custom web view to monitor the deployments and approve them . I couldn't find any online docs for the REST api of the new pipelines and environments. So far I can only trigger the releases but I need to approve the deployments from the Azure

Approve a yaml pipeline deployment in Azure DevOps using REST api

|▌冷眼眸甩不掉的悲伤 提交于 2020-05-13 09:30:09
问题 I'm using the new multi-stage pipelines in Azure DevOps to manage deployments to Azure environments. I setup the corresponding Environments in Azure DevOps so that we can explicitly approve the actual deployments for each system. We want to provide a custom web view to monitor the deployments and approve them . I couldn't find any online docs for the REST api of the new pipelines and environments. So far I can only trigger the releases but I need to approve the deployments from the Azure

What is the right way to authenticate Azure Function against Azure DevOps REST API?

橙三吉。 提交于 2020-04-18 06:10:36
问题 The goal is to develop an Azure function which should do some changes in Azure DevOps (like update work items, wiki pages etc), being triggered by Azure pipeline service hook. Can I use function system identity in this case? And how can I give permissions for this identity to call DevOps REST APIs? 回答1: I'm not sure if this is the best way but you can create PAT token. Since you will use it for Azure Function I woudl recommend to use Azure KeyVault to store that token. Here you have the

How to add member in VSTS team programmatically?

耗尽温柔 提交于 2020-04-16 01:35:49
问题 I want to add user / member (who has already VSTS account) in a particular team (Under a particular project) programmatically. From portal we can always do the same. But, I am looking for some REST service that will do the same for me. In the below documentation is from Microsoft, we get several api related to the team. But it does not provide anything related to 'how do I add existing VSTS account holder to a team' https://www.visualstudio.com/en-us/docs/integrate/api/tfs/teams Thanks in

POST Request to Azure DevOps Rest API with Reactjs

我的梦境 提交于 2020-03-26 03:51:55
问题 So far I've been able to configure a method in C# that is able to hardcode a new repository in Azure DevOps, but my real goal is to create a user interface that allows the user to specify the request body which consists of the following: name: 'nameOfRepository', project: { id: 'projectId' } The user will fill out the first input field with the desired name of the new repository. The second input field should use a GET Request that displays all available projects in your organization in a