I am trying to trigger a bitbucket pipeline using the api endpoint, but I am getting the following response:
{
"error": {
"message": "Bad request",
"detail": "bitbucket-pipelines.yml not found.",
"data": {
"key": "result-service.pipeline.yml-not-found",
"arguments": {}
}
}
}
This is the request that I am using. I have verified and this branch has the pipeline and I am able to trigger it manually from pipelines section of the repo.
curl -X POST -is -u username:password \
-H 'Content-Type: application/json' \
https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \
-d '
{
"target": {
"ref_type": "branch",
"type": "pipeline_ref_target",
"ref_name": "branchname"
},
"variables": [
{
"key": "key1",
"value": "value1"
},
{
"key": "key2",
"value": "value2"
}]
}'