Skip to main content
Technical Preview

Overview

A client-mode connector for the Azure DevOps Services REST API 7.1 that connects the plant floor to the engineering backlog and to edge CI/CD. A typical flow creates a Bug or Issue when the broker sees a recurring alarm, adds the readings as a comment, closes the item when the machine recovers, and finds open items with WIQL. On the delivery side it starts a YAML pipeline run or queues a build (for example an edge firmware build or a gateway configuration deployment), polls the run, reads its timeline, logs and artifacts, and cancels or tags builds. Service hook subscriptions send work item, build and pipeline events back to a Coreflux server connector. One connector carries 43 events (32 GET, 8 POST, 2 PATCH, 1 PUT; 9 writes, no DELETE). Topics use devops/azure-devops/<object>/<verb>; each response is published on <source topic>/response. WiqlQuery and WorkItemsBatchGet are read-only POSTs.
The template was checked against Microsoft’s Azure DevOps REST OpenAPI specs (api-version 7.1) and a local mock. Against the real dev.azure.com, 21 events were called anonymously on the public project dnceng-public/public through the connector’s own endpoint templates. 17 returned data (ConnectionData, project, work item types, states, fields, area paths, batch get, pipelines, runs, builds, timelines, logs, linked work items, definitions). 4 returned the service’s own 404 for work items, comments and saved queries that do not exist. Without credentials, 42 of 43 events showed that Azure DevOps connectors their path. A bad PAT got 401 (TF400813) on a private organization, and every event got 404 on an unknown organization. Nothing has run with a real credential yet, so status stays blocked until an authenticated read and a work item write pass.

Setup

  1. Create an organization-scoped personal access token (User settings > Personal access tokens) with only the scopes you need: Work Items (Read & write), Build (Read & execute), Project and Team (Read), and for service hook subscriptions the scopes of the events you subscribe to. Global PATs stop working on December 1, 2026. For unattended use, prefer a Microsoft Entra service principal or managed identity added to the organization as a user.
  2. Build the header value once and keep it in a broker secret (for example AZURE_DEVOPS_AUTHORIZATION). Inject it in a LoT action with GET SECRET. Never retain topics that carry it.
  3. Read the project once with WorkItemTypesList, FieldsList and ClassificationNodesList to get the work item types, field reference names and area paths you will write.

Authentication

Every event sends the payload field authorization unchanged as the Authorization header:
Every event also sends X-TFS-FedAuthRedirect: Suppress. Without it, a missing, bad or expired credential gets a 302 redirect to the sign-in page (203 HTML if the client follows it) instead of a 401 JSON error.
On an organization with public projects, Azure DevOps treats a bad credential as anonymous: public reads still answer 200 and only private data or writes answer 401. If reads must come from a real identity, call ConnectionData first and check that authenticatedUser is not Anonymous.

Organization, project and api-version

The base address is https://dev.azure.com; each endpoint starts with /{organization}, and project-scoped events continue with /{project}. Put both in the payload (URL-encode project names with spaces, for example Plant%20Ops). Every endpoint pins its api-version: 7.1 (the latest GA version), 7.1-preview.4 for work item comments and 7.1-preview.1 for ConnectionData. Preview resources answer 400 to plain 7.1. Azure DevOps Server (on-premises) is not covered by this template. It uses https://<server>/<collection>/ and older API versions.

Query parameters and bodies

Optional query parameters go in query, URL-encoded and starting with &. The connector appends query directly after the pinned api-version, for example &statusFilter=inProgress&$top=20. Leave query empty for defaults. Do not send a lone &: an empty parameter makes some endpoints fail (build/builds answers 400, build/definitions answers 500). WorkItemsList and PipelineRunArtifactGet need their query (&ids=..., &artifactName=...). Writes send body. Work item create and update take a JSON Patch array and are sent as application/json-patch+json; everything else is application/json.

Examples

Create a Bug when an alarm repeats (devops/azure-devops/work-items/create, type = Bug; use &validateOnly=true in query for a dry run):
The response holds the new work item id and rev. Keep the id to update it later. Close it when the press recovers, with a link to the trend panel (devops/azure-devops/work-items/update):
Find open items raised by the broker (devops/azure-devops/wiql/query, then devops/azure-devops/work-items/batch-get with the returned ids):
Start an edge deployment pipeline (devops/azure-devops/pipelines/runs/run), then poll devops/azure-devops/pipelines/runs/get with the returned run id:
List running builds (devops/azure-devops/builds/list):
Send failed builds to a Coreflux server connector (devops/azure-devops/hooks/subscriptions/create; organization-level, the project goes in publisherInputs.projectId):
Service hooks post to a public HTTPS URL; they cannot target localhost or private address ranges. The receiving side is a separate ENABLE_SERVER REST_API connector, which is not part of this template. Protect it with basicAuthCredentials or a shared header in httpHeaders (header values are visible to anyone who can read the subscription). Other useful events: workitem.created, workitem.updated (publisher tfs) and ms.vss-pipelines.run-state-changed-event (publisher pipelines). List them with HookEventTypesList. Check deliveries with HookNotificationsList.

Events

Limits

Azure DevOps meters load in throughput units (TSTUs): 200 TSTUs per identity in any sliding five-minute window, and the same per pipeline. Above that, requests are delayed or rejected with 429. Honor Retry-After and watch the X-RateLimit-* response headers. Batch reads with WorkItemsBatchGet (up to 200 ids) instead of one WorkItemGet per item, and poll run state at a sensible interval.

Not packaged

  • All DELETE endpoints (work items, comments, builds, subscriptions) on purpose. Close work items by state instead.
  • Releases (classic release pipelines). They live on a different host (vsrm.dev.azure.com) and need a second connector.
  • Work item attachment upload (binary), Git repositories and pull requests, test plans, artifacts feeds, wikis, approvals and checks, agent pools and service connections.
  • Build retention (keep forever is a retention lease in 7.1, not a build field).
  • The incoming service hook direction: a separate ENABLE_SERVER connector.
  • Azure DevOps Server (on-premises) collections.

Suggested branches

feat/rest-api-route-azure-devops for the broker template and feat/docs-rest-api-azure-devops for this page.
Last modified on October 21, 2026