Pipelines are not getting created when Azure DevOps REST API is used for creation. I have used - Create - Rest API. Please find the request URI and request body used below:
Request : POST https://dev.azure.com/{organization}/{project}/_apis/pipelines?api-version=6.0-preview.1
Request Body:
{
"folder": "",
"name": "pipeline-by-api",
"configuration": {
"type": "yaml",
"path": "/azure-pipelines.yml",
"repository": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "repo-by-api",
"type": "azureReposGit"
}
}
}
Below is the response received:
{
"$id": "1",
"innerException": null,
"message": "No pool was specified.",
"typeName": "Microsoft.TeamFoundation.Build.WebApi.QueueNotFoundException, Microsoft.TeamFoundation.Build2.WebApi",
"typeKey": "QueueNotFoundException",
"errorCode": 0,
"eventId": 3000
}
Pool is specified in the YAML file as below:
pool:
name: #######
demands:
- maven
If I try to create pipeline manually, it is working successfully. Issue exist only when it is created from Azure DevOps REST API.