Table of Contents

, ,

Bitbucket Server API steps

Get projects

curl -u user:pass -X GET -H "Content-Type: application/json" http://localhost:7990/rest/api/1.0/projects | jq .

Get the pull requests for repo "EXAM"

curl -u user:pass -X GET -H "Content-Type: application/json" http://localhost:7990/rest/api/1.0/projects/EXAM/repos/cloud/pull-requests/ | jq .

Test if the merge can complete

curl -u user:pass -X GET -H "Content-Type: application/json" http://localhost:7990/rest/api/1.0/projects/EXAM/repos/cloud/pull-requests/1/merge | jq .

Tested on

See also

References

https://docs.atlassian.com/bitbucket-server/rest/7.3.0/bitbucket-rest.html