List pull requests
Returns all pull requests on the specified repository.
By default only open pull requests are returned. This can be controlled
using the state query parameter. To retrieve pull requests that are
in one of multiple states, repeat the state parameter for each
individual state.
This endpoint also supports filtering and sorting of the results. See filtering and sorting for more details.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}.
Query Parameters
Section titled “ Query Parameters ”Only return pull requests that are in this state. This parameter can be repeated.
Responses
Section titled “ Responses ”All pull requests on the specified repository.
A paginated list of pullrequests.
object
Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
Page number of the current results. This is an optional element that is not provided in all responses.
Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The pull request’s unique ID. Note that pull request IDs are only unique within their associated repository.
Title of the pull request.
User provided pull request text, interpreted in a markup language and rendered in HTML
object
object
The text as it was typed by a user.
The type of markup language the raw content is to be interpreted in.
The user’s content rendered as HTML.
object
The text as it was typed by a user.
The type of markup language the raw content is to be interpreted in.
The user’s content rendered as HTML.
object
The text as it was typed by a user.
The type of markup language the raw content is to be interpreted in.
The user’s content rendered as HTML.
object
The text as it was typed by a user.
The type of markup language the raw content is to be interpreted in.
The user’s content rendered as HTML.
The pull request’s current status.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The repository’s immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.
The concatenation of the repository owner’s username and the slugified name, e.g. “evzijst/interruptingcow”. This is the same string used in Bitbucket URLs.
object
Links related to an Account.
object
A link to a resource related to this object.
object
The issue tracker for this repository is enabled. Issue Tracker features are not supported for repositories in workspaces administered through admin.atlassian.com.
The wiki for this repository is enabled. Wiki features are not supported for repositories in workspaces administered through admin.atlassian.com.
Controls the rules for forking this repository.
- allow_forks: unrestricted forking
- no_public_forks: restrict forking to private forks (forks cannot be made public later)
- no_forks: deny all forking
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The project’s immutable id.
The project’s key.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The name of the project.
Indicates whether the project is publicly accessible, or whether it is private to the team and consequently only visible to team members. Note that private projects cannot contain public repositories.
Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The name of the ref.
object
object
The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
The raw committer value from the repository. This may be the only value available if the committer does not match a user in Bitbucket.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
The text as it was typed by a user.
The type of markup language the raw content is to be interpreted in.
The user’s content rendered as HTML.
object
object
Links related to an Account.
object
A link to a resource related to this object.
object
The ISO8601 timestamp of the participant’s action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented.
Available merge strategies for pull requests targeting this branch.
The default merge strategy for pull requests targeting this branch.
object
Available merge strategies, when this endpoint is the destination of the pull request.
The default merge strategy, when this endpoint is the destination of the pull request.
object
object
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The repository’s immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.
The concatenation of the repository owner’s username and the slugified name, e.g. “evzijst/interruptingcow”. This is the same string used in Bitbucket URLs.
object
Links related to an Account.
object
A link to a resource related to this object.
object
The issue tracker for this repository is enabled. Issue Tracker features are not supported for repositories in workspaces administered through admin.atlassian.com.
The wiki for this repository is enabled. Wiki features are not supported for repositories in workspaces administered through admin.atlassian.com.
Controls the rules for forking this repository.
- allow_forks: unrestricted forking
- no_public_forks: restrict forking to private forks (forks cannot be made public later)
- no_forks: deny all forking
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The project’s immutable id.
The project’s key.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The name of the project.
Indicates whether the project is publicly accessible, or whether it is private to the team and consequently only visible to team members. Note that private projects cannot contain public repositories.
Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
object
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
A link to a resource related to this object.
object
The name of the ref.
object
object
The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
The raw committer value from the repository. This may be the only value available if the committer does not match a user in Bitbucket.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
The text as it was typed by a user.
The type of markup language the raw content is to be interpreted in.
The user’s content rendered as HTML.
object
object
Links related to an Account.
object
A link to a resource related to this object.
object
The ISO8601 timestamp of the participant’s action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented.
Available merge strategies for pull requests targeting this branch.
The default merge strategy for pull requests targeting this branch.
object
Available merge strategies, when this endpoint is the destination of the pull request.
The default merge strategy, when this endpoint is the destination of the pull request.
object
object
The number of comments for a specific pull request.
The number of open tasks for a specific pull request.
A boolean flag indicating if merging the pull request closes the source branch.
object
Links related to an Account.
object
A link to a resource related to this object.
object
Explains why a pull request was declined. This field is only applicable to pull requests in rejected state.
The ISO8601 timestamp the request was created.
The ISO8601 timestamp the request was last updated.
The list of users that were added as reviewers on this pull request when it was created. For performance reasons, the API only includes this list on a pull request’s self URL.
object
Links related to an Account.
object
A link to a resource related to this object.
object
The list of users that are collaborating on this pull request.
Collaborators are user that:
* are added to the pull request as a reviewer (part of the reviewers
list)
* are not explicit reviewers, but have commented on the pull request
* are not explicit reviewers, but have approved the pull request
Each user is wrapped in an object that indicates the user's role and
whether they have approved the pull request. For performance reasons,
the API only returns this list when an API requests a pull request by
id.
object
object
Links related to an Account.
object
A link to a resource related to this object.
object
The ISO8601 timestamp of the participant’s action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented.
A boolean flag indicating whether the pull request is a draft.
A boolean flag indicating whether the pull request is queued
Example
{ "values": [ { "rendered": { "title": { "markup": "markdown" }, "description": { "markup": "markdown" }, "reason": { "markup": "markdown" } }, "summary": { "markup": "markdown" }, "state": "OPEN", "source": { "repository": { "scm": "git", "fork_policy": "allow_forks", "mainbranch": { "target": { "summary": { "markup": "markdown" }, "participants": [ { "role": "PARTICIPANT", "state": "approved" } ] }, "merge_strategies": [ "merge_commit" ] } }, "branch": { "merge_strategies": [ "merge_commit" ] } }, "destination": { "repository": { "scm": "git", "fork_policy": "allow_forks", "mainbranch": { "target": { "summary": { "markup": "markdown" }, "participants": [ { "role": "PARTICIPANT", "state": "approved" } ] }, "merge_strategies": [ "merge_commit" ] } }, "branch": { "merge_strategies": [ "merge_commit" ] } }, "participants": [ { "role": "PARTICIPANT", "state": "approved" } ] } ]}If the repository is private and the request was not authenticated.
If the specified repository does not exist.
Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.
object
object
Optional structured data that is endpoint-specific.
object
Example generated
{ "type": "example", "error": { "message": "example", "detail": "example", "data": {} }}