curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/github/connection \
--header 'api_key: <api-key>'import requests
url = "https://app.base44.com/api/apps/{app_id}/github/connection"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
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 => [
"api_key: <api-key>"
],
]);
$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("api_key", "<api-key>")
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("api_key", "<api-key>")
.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["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"connected": true,
"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"
}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 look the same here, so this response can’t tell you which happened.
curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/github/connection \
--header 'api_key: <api-key>'import requests
url = "https://app.base44.com/api/apps/{app_id}/github/connection"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
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 => [
"api_key: <api-key>"
],
]);
$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("api_key", "<api-key>")
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("api_key", "<api-key>")
.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["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"connected": true,
"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"
}Authorizations
Personal API key.
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
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"
Was this page helpful?