List commits
curl --request GET \
--url https://unify.bundleup.io/v1/git/repos/{repo}/commits \
--header 'Authorization: Bearer <token>' \
--header 'BU-Connection-ID: <bu-connection-id>'import requests
url = "https://unify.bundleup.io/v1/git/repos/{repo}/commits"
headers = {
"Authorization": "Bearer <token>",
"BU-Connection-ID": "<bu-connection-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'BU-Connection-ID': '<bu-connection-id>'}
};
fetch('https://unify.bundleup.io/v1/git/repos/{repo}/commits', 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://unify.bundleup.io/v1/git/repos/{repo}/commits",
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>",
"BU-Connection-ID: <bu-connection-id>"
],
]);
$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://unify.bundleup.io/v1/git/repos/{repo}/commits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("BU-Connection-ID", "<bu-connection-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://unify.bundleup.io/v1/git/repos/{repo}/commits")
.header("Authorization", "Bearer <token>")
.header("BU-Connection-ID", "<bu-connection-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://unify.bundleup.io/v1/git/repos/{repo}/commits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["BU-Connection-ID"] = '<bu-connection-id>'
response = http.request(request)
puts response.read_body{
"response": {
"data": [
{
"sha": "<string>",
"message": "<string>",
"url": "<string>",
"author": "<string>",
"author_email": "<string>",
"committed_at": "<string>"
}
],
"metadata": {
"next": "<string>"
}
}
}{
"success": false,
"errors": [
{
"code": 7001,
"message": "Input Validation Error",
"path": [
"body"
]
}
]
}{
"success": false,
"errors": [
{
"code": 1000,
"message": "Not Authorized"
}
]
}{
"success": false,
"errors": [
{
"code": 7002,
"message": "Not Found"
}
]
}Git
List commits
List commits for a git repository on GitHub, GitLab and Bitbucket
GET
/
v1
/
git
/
repos
/
{repo}
/
commits
List commits
curl --request GET \
--url https://unify.bundleup.io/v1/git/repos/{repo}/commits \
--header 'Authorization: Bearer <token>' \
--header 'BU-Connection-ID: <bu-connection-id>'import requests
url = "https://unify.bundleup.io/v1/git/repos/{repo}/commits"
headers = {
"Authorization": "Bearer <token>",
"BU-Connection-ID": "<bu-connection-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'BU-Connection-ID': '<bu-connection-id>'}
};
fetch('https://unify.bundleup.io/v1/git/repos/{repo}/commits', 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://unify.bundleup.io/v1/git/repos/{repo}/commits",
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>",
"BU-Connection-ID: <bu-connection-id>"
],
]);
$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://unify.bundleup.io/v1/git/repos/{repo}/commits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("BU-Connection-ID", "<bu-connection-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://unify.bundleup.io/v1/git/repos/{repo}/commits")
.header("Authorization", "Bearer <token>")
.header("BU-Connection-ID", "<bu-connection-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://unify.bundleup.io/v1/git/repos/{repo}/commits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["BU-Connection-ID"] = '<bu-connection-id>'
response = http.request(request)
puts response.read_body{
"response": {
"data": [
{
"sha": "<string>",
"message": "<string>",
"url": "<string>",
"author": "<string>",
"author_email": "<string>",
"committed_at": "<string>"
}
],
"metadata": {
"next": "<string>"
}
}
}{
"success": false,
"errors": [
{
"code": 7001,
"message": "Input Validation Error",
"path": [
"body"
]
}
]
}{
"success": false,
"errors": [
{
"code": 1000,
"message": "Not Authorized"
}
]
}{
"success": false,
"errors": [
{
"code": 7002,
"message": "Not Found"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
API Key for authentication
Connection ID for the integration
Maximum number of retries for the request
Path Parameters
Repository name
Query Parameters
Whether to include raw response from the provider
Available options:
true, false Optional passthrough parameter
Example:
"{\"team_id\":\"12345\"}"
Branch, tag or commit SHA to list commits from. Defaults to the repository default branch
Number of commits to return
Required range:
1 <= x <= 100Cursor for pagination
Response
Successful Response For commits
Show child attributes
Show child attributes
Was this page helpful?
⌘I

