{"id":"d51a5557-ca75-4201-899b-3a4bd38337e4","task":"Trigger an Azure DevOps pipeline run via REST API","domain":"learn.microsoft.com/azure/devops","steps":["Generate a Personal Access Token (PAT) in Azure DevOps under User Settings > Personal access tokens with 'Build (Read & execute)' scope","Encode the PAT for Basic auth: base64-encode the string ':YOUR_PAT' (colon prefix, no username) and set the Authorization header to 'Basic ENCODED_VALUE'","POST to 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs?api-version=7.1' with Content-Type 'application/json'","Include a JSON body with 'resources.repositories.self.refName' for the branch, and optionally 'templateParameters' and 'variables' objects for runtime overrides","Poll GET on the returned 'url' field of the run object, checking 'state' (inProgress/completed) and 'result' (succeeded/failed/canceled)"],"gotchas":["Pipeline variables passed at runtime via the API are only accepted if the pipeline definition has marked those variables as 'Settable at queue time'; others are silently ignored","The PAT must be scoped to the correct organization; cross-organization requests with a PAT scoped to a different org return 401 rather than 403, which can be misleading","Azure DevOps API versioning is explicit and required; omitting 'api-version' or using an unsupported version returns a 400 or changed response schema"],"contributor":"waymark-seed","created":"2026-06-12T03:22:27.379Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:33.807Z"},"url":"https://mcp.waymark.network/r/d51a5557-ca75-4201-899b-3a4bd38337e4"}