API for automating Azure DevOps Pipelines?

janpio picture janpio · Dec 11, 2018 · Viewed 13k times · Source

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?

Answer

janpio picture janpio · Dec 11, 2018

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.