Hi, was wrecking my head trying to understand how to automate workitems handling in Azure Devops..untill I found this video. Great help for beginners at creating pipelines. Many thnks!
Hello Etienne, thank you for the video. is it possible to get a report from ADO to list which projects are using YML pipelines vs classic pipeline? please confirm.
On my RELEASE pipeline, I need to access the queue variables of my BUILD pipeline, the RELEASE pipeline is being triggered by the BUILD pipeline using CI. I read somewhere that I could use a powershell task to call devops BUILD API in order to get queue time variable an their values. Could make a tutorial indicating how to get a specific variable value for this scenario?
Hi, I am looking for the solution to do the following; One of my processes will create a text file. I need to add this file into Azure dev-ops Repo ( GIT) and then update the same file while the same process will run the second, third ... time. Do you have any suggestions on how to do so using a REST API + Powershell? TNX!
Batch creation of ADO workitems possible? I would like a PS script to read a file and create a. workitem (bug) for each row in the file. Is that possible? If so any tips, general structure of which REST APIs to use, or any existing PS script out there that does this already?
Hello Etienne, Thanks for a great video! Do you know if it's possible to accomplish the below? I am trying to get a dump of all security groups and users for a certain build definition! This is equivalent to going to the Security tab in the build definition. Would you know which API can help me do a "get" for all the security groups and users for a specific build definition id?
Hi Etienne, I am trying to create a power shell script which will throw a pop-up when ever a new task/work item is created (State = New and assignedto = 'myteamname'). I am facing issues when trying to call the API with filters in query string. Can you please help me in this and suggest me on how to proceed.
@@gauravjoshi5054 yes that’s the way to do it. Then you use $(system.accesstoken) in your inline scripts or $env:SYSTEM_ACCESSTOKEN Inside powershell scripts also check here docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#systemaccesstoken
Hi Rifat, try looking at Azure DevOps extensions rest api. From there you can get extensions (task), list, update, install and uninstall, you might be able to get the info you need from there.
Hello Etienne thanks for your video, its very informative. Also if you can make a video on Azure Devops Pipelines approval gates with the use of invoke rest API to check the user story state in the work items and then approve as an evidence would be greatly appreciated.
Excellent video and wat exactly which i am looking for azure DevOps is clearly explained.. Thank you so much.. If possible can you please share, how to send the output of this demo's in mail using powershell with same powershell script. Thank you in advance!
Hi Siva, check this out: docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/send-mailmessage?view=powershell-7 you can just add this after you run and generate a csv or txt file and it will send via your SMTP server.
@@TegaaaSolutions Thank you..! Another doubt is in API.. releaseCount=5, gives us latest 5 releases, but if i want to get only the latest release, then what should be the parameter should in need to mention? Thank you in advance!
Good video, it helped me a lot!! There just something I can't figure out how to do! I want to move my ticket to different board columns. I have, lets say, 10 and I need to cherry pick where the ticket goes! Do you have any idea?
Actually figured it out! Also, do you know how can one get a list of all the available work items in a column? The REST api kind of expects you to input the IDs yourself, while in my case I just want to get whatever is in there
I don’t off hand I would look at the site and do a few tests, you could go the other way and get a list of items and their column and check where they are, you could also write a query and get all items in a specific column (I would probably do that). Check the info on running a string query in the API docs
Hi Etienne, Thanks for the tutorial. Can you please share the script to fetch the data of all users with access level information(Basic/Stakeholder/others) ?
There is nothing to get this information at the moment, you can navigate to that that screen (where you see the levels) and on Server 2019 you have a new button Export audit log that give you this information. Nothing with the REST API Unfortunately.
Hi Find $projectsUrl and paste over this: ------ #Change default limit from 100 to whatever value you wish $urlParams = '$top=300&' # docs.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-5.0 $projectsUrl = "$($tfsBaseUrl)_apis/projects?$($urlParams)api-version=5.0" ------ This code should look nicer, but it's my first try on PS and REST API.
I have a ton of cases, migrating from one server to another, starting releases, updating release variables, creating special build/release reports, exporting artifacts, etc. There are plenty of opportunity to use REST APIs to do stuff.
The gist you provided in the description really helped improve version context visibility for my CI/CD build pipelines, thank you!!!
Hi, was wrecking my head trying to understand how to automate workitems handling in Azure Devops..untill I found this video. Great help for beginners at creating pipelines. Many thnks!
You are very welcome
Clear explanation, Could you please explain to us how to create a new release (release Definition) from the same script in an existing pipeline?
Hello Etienne, thank
you for the video. is it possible to get a report from ADO to list which projects are using YML pipelines vs classic pipeline? please confirm.
Absolutely, I’m going to get back into video production soon
So helpful. Really appreciated!!!
thanks a ton informative. Do you have video for Creating work item in release pipeline using API ...?
On my RELEASE pipeline, I need to access the queue variables of my BUILD pipeline, the RELEASE pipeline is being triggered by the BUILD pipeline using CI. I read somewhere that I could use a powershell task to call devops BUILD API in order to get queue time variable an their values. Could make a tutorial indicating how to get a specific variable value for this scenario?
Hi sir..i want to trigger a Azure Devops release pipeline using powershell
Hi, I am looking for the solution to do the following;
One of my processes will create a text file. I need to add this file into Azure dev-ops Repo ( GIT) and then update the same file while the same process will run the second, third ... time.
Do you have any suggestions on how to do so using a REST API + Powershell?
TNX!
How to update existing azure wiki page, I am following the document but still not able to hit the API.
What are you trying to do? Here is the wiki REST API page. learn.microsoft.com/en-us/rest/api/azure/devops/wiki/wikis?view=azure-devops-rest-7.1
Batch creation of ADO workitems possible? I would like a PS script to read a file and create a. workitem (bug) for each row in the file. Is that possible? If so any tips, general structure of which REST APIs to use, or any existing PS script out there that does this already?
You sure can. I would do a csv file or json payload then read it and iterate while add new items.
Hello Etienne, Thanks for a great video! Do you know if it's possible to accomplish the below?
I am trying to get a dump of all security groups and users for a certain build definition! This is equivalent to going to the Security tab in the build definition. Would you know which API can help me do a "get" for all the security groups and users for a specific build definition id?
How to get all Work Items? pls help
I wonder how you could do this with Postman?
Yup
One word: awesome!
Hi nicely explained! Can I use AAD token instead of personal access token?
How can I do that?
Hi Etienne,
I am trying to create a power shell script which will throw a pop-up when ever a new task/work item is created (State = New and assignedto = 'myteamname'). I am facing issues when trying to call the API with filters in query string. Can you please help me in this and suggest me on how to proceed.
Pradeep V.B.H. Hi Pradeep can you share your script and I’ll see what I can do I’m not sure I understand what you are trying to do
Great video! Could you make a video on creating build (modify the request body) and release pipelines with azure DevOps rest API.
I need to g door this too. Please can you make a video on it.
It is really nice. Thanks for sharing this info.
What we can use instead on PAT for Authenticate Azure devops API .?
The cloud version? PAT or Azure AD
Etienne Tremblay thanks for reply but can I use option under Agent job says “Allow scripts to access oauth token' is it safe to use ..?
@@gauravjoshi5054 yes that’s the way to do it. Then you use $(system.accesstoken) in your inline scripts or $env:SYSTEM_ACCESSTOKEN Inside powershell scripts also check here docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#systemaccesstoken
gr8 video mate > how do i get the tasks and the last task creator and their name and date ?
Hi Rifat, try looking at Azure DevOps extensions rest api. From there you can get extensions (task), list, update, install and uninstall, you might be able to get the info you need from there.
Hello Etienne thanks for your video, its very informative. Also if you can make a video on Azure Devops Pipelines approval gates with the use of invoke rest API to check the user story state in the work items and then approve as an evidence would be greatly appreciated.
Sounds like a great idea. I'll add it to the video backlog
Excellent video and wat exactly which i am looking for azure DevOps is clearly explained..
Thank you so much..
If possible can you please share, how to send the output of this demo's in mail using powershell with same powershell script.
Thank you in advance!
Hi Siva, check this out: docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/send-mailmessage?view=powershell-7 you can just add this after you run and generate a csv or txt file and it will send via your SMTP server.
@@TegaaaSolutions Thank you..!
Another doubt is in API.. releaseCount=5, gives us latest 5 releases, but if i want to get only the latest release, then what should be the parameter should in need to mention?
Thank you in advance!
@@nelsonsiva6143 Have you tried putting 1 instead of 5 I should return the latest one no? (disclamer I haven't tried)
@@TegaaaSolutions I've tried with putting 1, perhaps it doesn't work
Try to add &$top=1 in the URL
Good video, it helped me a lot!! There just something I can't figure out how to do! I want to move my ticket to different board columns. I have, lets say, 10 and I need to cherry pick where the ticket goes! Do you have any idea?
Hum... you definitely change the board column but What do you mean by cherry-pick?
Actually figured it out! Also, do you know how can one get a list of all the available work items in a column? The REST api kind of expects you to input the IDs yourself, while in my case I just want to get whatever is in there
Sorry, it’s still me, just have two different account
I don’t off hand I would look at the site and do a few tests, you could go the other way and get a list of items and their column and check where they are, you could also write a query and get all items in a specific column (I would probably do that). Check the info on running a string query in the API docs
Thanks ! Can we create CI /CD using Azure DevOps Rest API ?
Yes you can
you are awesome. Thanks a lot
Hi Etienne,
Thanks for the tutorial. Can you please share the script to fetch the data of all users with access level information(Basic/Stakeholder/others) ?
There is nothing to get this information at the moment, you can navigate to that that screen (where you see the levels) and on Server 2019 you have a new button Export audit log that give you this information. Nothing with the REST API Unfortunately.
Hi Nawaz , did you work on this type of scenario
JS code?
Hi, this is nice solution, I implement this it's working but more than 100 record not getting in response means next page record not getting
Hi
Find $projectsUrl and paste over this:
------
#Change default limit from 100 to whatever value you wish
$urlParams = '$top=300&'
# docs.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-5.0
$projectsUrl = "$($tfsBaseUrl)_apis/projects?$($urlParams)api-version=5.0"
------
This code should look nicer, but it's my first try on PS and REST API.
@@sergeykanashchuk7671 Thanks PhD Red
Why would one want to use the REST API? Do you have some interesting cases in mind?
I have a ton of cases, migrating from one server to another, starting releases, updating release variables, creating special build/release reports, exporting artifacts, etc. There are plenty of opportunity to use REST APIs to do stuff.
Excellent
thank you
thanks