curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/imported/git/pull-request \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/imported/git/pull-request"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/imported/git/pull-request', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/imported/git/pull-request",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/imported/git/pull-request"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.base44.com/api/apps/{app_id}/imported/git/pull-request")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/imported/git/pull-request")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"number": 42,
"title": "Add checkout flow",
"body": "Adds a checkout page.",
"state": "open",
"merged": false,
"draft": false,
"html_url": "https://github.com/acme/shop/pull/42",
"changed_files": 3,
"additions": 120,
"deletions": 8,
"head": {
"ref": "feature/checkout",
"sha": "9fceb02d0ae598e95dc970b74767f19372d61af8"
},
"base": {
"ref": "main",
"sha": "9fceb02d0ae598e95dc970b74767f19372d61af8"
},
"readiness": {
"checks": "success",
"review": "approved",
"mergeable": "mergeable",
"unresolved_thread_count": 0
}
}Get branch pull request
Returns the GitHub pull request for one of the app’s branches, with whether it’s ready to merge: its CI checks, reviews and conflicts.
Send the branch as branch_id. Without it, or when the branch has no pull request, the response is null. Each call refreshes the pull request from GitHub, which can take a few seconds. This works on apps imported from GitHub, and on apps connected to GitHub whose main branch protection GitHub manages.
This endpoint is limited to 60 requests per minute per user, shared with List pull request files and List branch file changes, and reported in the X-RateLimit-* headers.
api_key query parameter is refused.curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/imported/git/pull-request \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/imported/git/pull-request"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/imported/git/pull-request', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/imported/git/pull-request",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/imported/git/pull-request"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.base44.com/api/apps/{app_id}/imported/git/pull-request")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/imported/git/pull-request")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"number": 42,
"title": "Add checkout flow",
"body": "Adds a checkout page.",
"state": "open",
"merged": false,
"draft": false,
"html_url": "https://github.com/acme/shop/pull/42",
"changed_files": 3,
"additions": 120,
"deletions": 8,
"head": {
"ref": "feature/checkout",
"sha": "9fceb02d0ae598e95dc970b74767f19372d61af8"
},
"base": {
"ref": "main",
"sha": "9fceb02d0ae598e95dc970b74767f19372d61af8"
},
"readiness": {
"checks": "success",
"review": "approved",
"mergeable": "mergeable",
"unresolved_thread_count": 0
}
}Authorizations
Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.
Headers
Query Parameters
ID of the branch to work on, as returned by List branches. Omit it to work on the app's main branch.
Response
The branch's pull request, or null.
The branch's pull request, or null when it has none.
Was this page helpful?