curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/github/connection \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/github/connection"
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}/github/connection', 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}/github/connection",
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}/github/connection"
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}/github/connection")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/github/connection")
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{
"connected": true,
"connection_mode": "shared",
"user_github_connected": true,
"can_push": false,
"repo_full_name": "base44/lead-tracker",
"repo_url": "https://github.com/base44/lead-tracker",
"clone_urls": {
"https": "https://github.com/base44/lead-tracker.git",
"ssh": "git@github.com:base44/lead-tracker.git",
"gh_cli": "gh repo clone base44/lead-tracker"
},
"org_name": "base44",
"status": "active",
"installation_id": "58231904",
"webhook_active": true,
"connected_by_user_id": "6820f3a4e7b91d003c45a1f0",
"previous_repository": {
"repo_full_name": "base44/lead-tracker",
"repo_url": "https://github.com/base44/lead-tracker",
"org_name": "base44"
}
}Get GitHub connection
Returns the app’s GitHub repository connection, if it has one.
Calling this re-checks the connection against GitHub and tries to repair a broken one, so what it reports can change between two calls even when nobody has touched the app.
An app that never connected and one whose repository was disconnected both report connected: false. After a user disconnects the app, previous_repository names the repository Reconnect a GitHub repository can bring back.
curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/github/connection \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/github/connection"
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}/github/connection', 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}/github/connection",
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}/github/connection"
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}/github/connection")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/github/connection")
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{
"connected": true,
"connection_mode": "shared",
"user_github_connected": true,
"can_push": false,
"repo_full_name": "base44/lead-tracker",
"repo_url": "https://github.com/base44/lead-tracker",
"clone_urls": {
"https": "https://github.com/base44/lead-tracker.git",
"ssh": "git@github.com:base44/lead-tracker.git",
"gh_cli": "gh repo clone base44/lead-tracker"
},
"org_name": "base44",
"status": "active",
"installation_id": "58231904",
"webhook_active": true,
"connected_by_user_id": "6820f3a4e7b91d003c45a1f0",
"previous_repository": {
"repo_full_name": "base44/lead-tracker",
"repo_url": "https://github.com/base44/lead-tracker",
"org_name": "base44"
}
}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 whose GitHub connection to use.
Response
The app's GitHub connection.
Current connection status for an app.
Whether the app still has its repository connection, including one whose status is error or revoked. The value is false only when the app never connected and when its repository was disconnected.
true
Workspace GitHub write model; null when not connected.
shared, per_user Whether the current user has a linked GitHub account; computed only in per_user mode.
Whether the connection permits a push attempt under the workspace mode. Failed user permission lookups allow an attempt; GitHub enforces access.
Full repository name, as owner/repo, or null when connected is false.
"base44/lead-tracker"
URL of the repository on GitHub, or null when connected is false.
"https://github.com/base44/lead-tracker"
URLs and CLI command for cloning the repository, or null when connected is false.
Show child attributes
Show child attributes
GitHub username or organization that owns the repository, or null when connected is false.
"base44"
Health of the connection, or null when connected is false. A value of active works normally, error hit a technical failure, and revoked means the GitHub App access was withdrawn. The last two still report connected: true, so this is the field that tells you the connection needs repair.
active, disconnected, error, revoked "active"
ID of the Base44 GitHub App installation backing this connection, or null when connected is false and on a connection stored without one.
"58231904"
Whether the repository has the Base44 webhook that triggers automatic pulls. While this is false on a connected app, GitHub isn't telling Base44 about pushes, so nothing arrives until you pull.
true
ID of the Base44 user who connected the repository, or null when connected is false.
"6820f3a4e7b91d003c45a1f0"
The repository a user disconnected the app from, which Reconnect a GitHub repository can bring back, or null when the app is connected, never connected, or lost its repository some other way.
Show child attributes
Show child attributes
Was this page helpful?