curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/imported/git/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/imported/git/status"
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/status', 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/status",
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/status"
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/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/imported/git/status")
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{
"current_branch": "feature/checkout",
"default_branch": "main",
"base_branch": "main",
"head": "9fceb02d0ae598e95dc970b74767f19372d61af8",
"head_committed_at": "2026-10-28T09:15:00Z",
"dirty": true,
"dirty_files": [
"src/pages/Checkout.jsx"
],
"ahead": 1,
"behind": 0,
"merge_in_progress": false
}Get branch git status
Returns the git state of one of an imported app’s branches: the checked-out branch, its latest commit, its uncommitted changes, and how far it is ahead of or behind GitHub. This works on apps imported from GitHub.
Send the branch as branch_id, or leave it out for the main branch. The call runs in that branch’s environment. If the environment isn’t running, the call starts it first, which can take a few minutes.
This endpoint is limited to 60 requests per minute per user, shared with Get branch pull request, 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/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/imported/git/status"
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/status', 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/status",
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/status"
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/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/imported/git/status")
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{
"current_branch": "feature/checkout",
"default_branch": "main",
"base_branch": "main",
"head": "9fceb02d0ae598e95dc970b74767f19372d61af8",
"head_committed_at": "2026-10-28T09:15:00Z",
"dirty": true,
"dirty_files": [
"src/pages/Checkout.jsx"
],
"ahead": 1,
"behind": 0,
"merge_in_progress": false
}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.
Path Parameters
ID of the app.
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 git state.
Branch checked out in the branch's environment, or HEAD when none is checked out.
"feature/checkout"
The repository's default branch on GitHub.
"main"
The branch the app was imported from. Pull requests merge into it.
"main"
SHA of the latest commit, or null when the branch has no commits.
"9fceb02d0ae598e95dc970b74767f19372d61af8"
When the latest commit was made, as an ISO 8601 UTC timestamp, or null.
"2026-10-28T09:15:00Z"
Whether there are uncommitted changes.
true
Paths of the first 20 files with uncommitted changes. A renamed file reads old -> new.
["src/pages/Checkout.jsx"]
Commits not pushed to GitHub yet, or null when the branch isn't on GitHub.
1
Commits on GitHub the environment doesn't have yet, as of its last fetch, or null when the branch isn't on GitHub.
0
Whether a merge is under way, for example while conflicts are resolved.
false
Was this page helpful?