{
  "$type": "site.standard.document",
  "canonicalUrl": "https://johnnyreilly.com/posts/list-pipelines-with-azure-devops-api",
  "description": "Learn how to list the Azure Pipelines in a project using the Azure DevOps REST API with TypeScript and the continuation token.",
  "path": "/posts/list-pipelines-with-azure-devops-api",
  "publishedAt": "2025-04-06T00:00:00.000Z",
  "site": "at://did:plc:yy3apqjlms24kso7ahn7lbmb/site.standard.publication/3mova7c4nho2b",
  "tags": [
    "azure pipelines",
    "azure devops",
    "typescript"
  ],
  "textContent": "Listing the Azure Pipelines using the Azure DevOps REST API and TypeScript is possible, but if you use the official Azure DevOps Client for Node.js, you might have issues. This is because it does not support pagination. So if you have a project with a large number of pipelines, then using the official client might mean you cannot retrieve it.\n\nThis post implements an alternative mechanism, directly using the Azure DevOps API and thus handling pagination. If you're curious as to how to create a pipeline, then check out my post on creating a pipeline with the Azure DevOps API.\n\n\n\nHere's the TypeScript code:\n\nThe above code uses the fetch API to list the Azure DevOps pipelines, but significantly, it takes the x-ms-continuationtoken from the response headers, so you can keep paginating if the number of pipelines exceeds the page size.",
  "title": "List Pipelines with the Azure DevOps API"
}