I\'m trying to create a YAML based pipeline that takes a parameter, then trigger the pipeline to run from a Azure DevOps REST API. I\'m able to see the build gets queued, but th
Got the solution after spending 2 to 3 Hour:
https://dev.azure.com/{organization}/{project}/_apis/pipelines/2/runs?api-version=6.0-preview.1
Where 2= {pipelineId}
Header :
Authorization: Personal access token. Use any value for the user name and the token as the password.
Type: basic
Content-Type : application/json
Accept : application/json
Right Now I'm using: Postman for testing this API So sharing posting main screenshot:
In the Body part :
{"previewRun":false,"stagesToSkip": [],"resources": {"repositories": {"self": {"refName": "refs/heads/master"}}},"templateParameters": {"testParam": "rawat Rob" },"variables": {}}
previewRun :{If true, don't actually create a new run. Instead, return the final YAML document after parsing templates.}
It is working for me And having test around 5 to 7 time