@elisha_langworth
To get all pull requests using the Bitbucket API, you can use the following endpoint:
1
|
GET /repositories/{workspace}/{repo_slug}/pullrequests |
Replace {workspace}
with the workspace or account name, and {repo_slug}
with the repository slug.
You can also filter the pull requests based on the following parameters:
Here is an example of how you can make a request to get all pull requests for a specific repository:
1
|
curl -X GET https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests |
You can also specify any additional parameters by adding them to the URL, for example:
1
|
curl -X GET https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests?state=OPEN&sort=created_on&direction=DESC&start=0&limit=10 |
This will fetch the first 10 open pull requests in the specified repository, sorted by the creation date in descending order.
Please note that you will need to authenticate and have the necessary permissions to access the pull requests via the Bitbucket API.