Nov 16 2022
12:00 PM
- last edited on
Mar 05 2024
02:10 PM
by
TechCommunityAP
Nov 16 2022
12:00 PM
- last edited on
Mar 05 2024
02:10 PM
by
TechCommunityAP
I was looking for examples of using the Azure DevOps Rest API from within a pipeline yml file (without using postman). Get info about another build, get or update Board issues info, whatever.
I found Invoke HTTP REST API task - Azure Pipelines | Microsoft Learn, which says "This task can be used in only an agentless job".
I found this... Azure Pipelines- Agentless/Server jobs (bartwullems.blogspot.com)
The header says...Azure Pipelines- Agentless/Server jobs". "Tasks in a server job are orchestrated by and executed on the server (Azure Pipelines or TFS). A server job does not require an agent or any target computers."
Is this saying that only "Azure DevOps Server" (downloaded and installed on your own hardware), can run agentless jobs, and thus if you are using "Azure DevOps Service (the cloud), you cannot use the Rest API task in a pipeline?
Nov 17 2022 08:11 AM - edited Nov 17 2022 10:55 AM
I said at the beginning "I was looking for examples of using the Azure DevOps Rest API from within a pipeline yml file". Pretty much indicates that I am new to this.
After more research, it appears that the way to use the Rest API in a pipeline yml file is to use PowerShell Invoke-RestMethod \ "$URL = ", and the 'InvokeRESTAPI@1' is only used in Agentless jobs.
Of 40 + people who looked at this posting, no one knew that?
Mar 15 2023 01:30 PM
Mar 15 2023 04:08 PM