Vai al contenuto
GET /v1/repo/pullrequests

Pull requests

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/bitbucket-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

curl "https://api.oanor.com/bitbucket-api/v1/repo/pullrequests" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/bitbucket-api/v1/repo/pullrequests", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/bitbucket-api/v1/repo/pullrequests");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/bitbucket-api/v1/repo/pullrequests",
    headers={"x-oanor-key": "oanor_test_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "page": 1,
        "size": 6,
        "values": [
            {
                "id": 219,
                "type": "pullrequest",
                "draft": false,
                "links": {
                    "diff": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/diff/atlassian/atlassian-event:6315b3bac849%0Decdc2efc4f27?from_pullrequest_id=219&topic=true"
                    },
                    "html": {
                        "href": "https://bitbucket.org/atlassian/atlassian-event/pull-requests/219"
                    },
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/pullrequests/219"
                    },
                    "merge": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/pullrequests/219/merge"
                    },
                    "approve": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/pullrequests/219/approve"
                    },
                    "commits": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/pullrequests/219/commits"
                    },
                    "decline": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/pullrequests/219/decline"
                    },
                    "activity": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/pullrequests/219/activity"
                    },
                    "comments": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/pullrequests/219/comments"
                    },
                    "diffstat": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/diffstat/atlassian/atlassian-event:6315b3bac849%0Decdc2efc4f27?from_pullrequest_id=219&topic=true"
                    },
                    "statuses": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/pullrequests/219/statuses"
                    },
                    "request-changes": {
                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlassian-event/pullrequests/219/request-changes"
                    }
                },
                "state": "OPEN",
                "title": "[Renovate] Update patches (5.1.x) (patch) - abandoned",
                "author": {
                    "type": "user",
                    "uuid": "{250a442a-3ab3-4fcb-87c3-3c8f3df65ec7}",
                    "links": {
                        "html": {
                            "href": "https://bitbucket.org/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D/"
                        },

…