I am getteing "Value cannot be null.\r\nParameter name: inputParameters" while trying to create a pipeline using the azure devops REST APIs. o
Can anybody suggest what should be the request body parameters for the API Call.
My Implemetation:
API CALL (POST) : https://dev.azure.com/{org}/{project}/_apis/pipelines?api-version=6.0-preview.1
Request Body:
{
"configuration": [
{
"type": "yaml",
"folder": "./",
"name": "trl-pipeline"
}
]
}
Response:
{
"$id": "1",
"innerException": null,
"message": "Value cannot be null.\r\nParameter name: inputParameters",
"typeName": "System.ArgumentNullException, mscorlib",
"typeKey": "ArgumentNullException",
"errorCode": 0,
"eventId": 0
}
Please add repository id and name in your request body. Here is my sample:
1.I created a yaml file in my azure repos.
2.My request body looks like this:
POST https://dev.azure.com/{organization}/{project}/_apis/pipelines?api-version=6.0-preview.1
{
"configuration":{
"path": "azure-pipelines.yml",
"repository":{
"id": "{repo id}",
"type": "azureReposGit",
"name": "{repo name}"
},
"type":"yaml"
},
"name":"PipelineName"
}