Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

API for automating Azure DevOps Pipelines?

I want to automate the queue-ing of Azure Pipelines with an API call, get information on the pipeline/build/job status,

  1. Azure Pipelines docs only mention "API" for the "Invoke HTTP Rest API" task: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/http-rest-api?view=vsts That might come in handy, but is not what I am looking for.

  2. There is a "Azure DevOps Services REST API": https://docs.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-5.1 But I couldn't find any mention of "Pipeline" there, so this doesn't seem to be the right thing as well.

    The StackOverflow tag azure-devops-rest-api also only mentions VSTS and TFS:

    Visual Studio Team Services REST APIs is a set of APIs allowing management of a Visual Studio Team Services accounts as well as TFS 2015 and 2017 servers.

Besides these two results, I only find other versions or translations of various copies of these - and a lot of unrelated documents that are about Azure in general.

Am I just using the wrong words to search?


Is there an actual API for Azure DevOps Pipelines?
Does it have a usable API Explorer?
Does it have proper clients for languages like JavaScript, Ruby or PHP?

like image 300
janpio Avatar asked Dec 11 '18 14:12

janpio


People also ask

Is there an API for Azure DevOps?

Azure DevOps REST APIs are versioned to ensure applications and services continue to work as APIs evolve.

Can we automate Azure DevOps?

A: Yes, you can do this using the Run with options command. Open the shortcut menu for the test suite in the left column and choose Run with options. Enter the following values in the Run with options dialog and then choose OK: Test type and runner: Select Automated tests using Release Stage.

How do you automate deployment in Azure DevOps?

1: The developer changes the application source code. 2: The developer updates the application code containing the 'web . config' file to the source code repository in Azure Repos. 3: Afterwards, Continuous integration triggers the application to build and unit tests using Azure Test Plans.


1 Answers

Seems I was bad at googling:

Trigger Azure Pipelines build via API and Start a build and passing variables through VSTS Rest API (found via the searching for [azure-pipelines] apihere on StackOverflow) point me to the Azure DevOps Services REST API that I had mentioned above.

like image 81
janpio Avatar answered Sep 17 '22 15:09

janpio