Repositories
List Repositories
Gets a list of enabled repositories for the organization
GET
/
repository
/
list
JavaScript
import Tembo from '@tembo-io/sdk';
const client = new Tembo({
apiKey: 'My API Key',
});
const repositories = await client.repository.list();
console.log(repositories.codeRepositories);curl --request GET \
--url https://api.tembo.io/repository/listimport requests
url = "https://api.tembo.io/repository/list"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tembo.io/repository/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.tembo.io/repository/list"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tembo.io/repository/list")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tembo.io/repository/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"codeRepositories": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "my-awesome-project",
"enabledAt": "2023-12-01T10:30:00.000Z",
"createdAt": "2023-12-01T09:15:00.000Z",
"updatedAt": "2023-12-01T11:45:00.000Z",
"organizationId": "456e7890-e89b-12d3-a456-426614174001",
"url": "https://github.com/username/my-awesome-project",
"branch": "main",
"description": "An awesome web application built with React",
"integration": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "github",
"name": "GitHub Integration",
"configuration": {}
}
}
]
}{
"error": "Organization ID is required"
}Response
Successfully retrieved list of enabled code repositories
Array of enabled code repositories for the organization
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
import Tembo from '@tembo-io/sdk';
const client = new Tembo({
apiKey: 'My API Key',
});
const repositories = await client.repository.list();
console.log(repositories.codeRepositories);curl --request GET \
--url https://api.tembo.io/repository/listimport requests
url = "https://api.tembo.io/repository/list"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tembo.io/repository/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.tembo.io/repository/list"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tembo.io/repository/list")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tembo.io/repository/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"codeRepositories": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "my-awesome-project",
"enabledAt": "2023-12-01T10:30:00.000Z",
"createdAt": "2023-12-01T09:15:00.000Z",
"updatedAt": "2023-12-01T11:45:00.000Z",
"organizationId": "456e7890-e89b-12d3-a456-426614174001",
"url": "https://github.com/username/my-awesome-project",
"branch": "main",
"description": "An awesome web application built with React",
"integration": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "github",
"name": "GitHub Integration",
"configuration": {}
}
}
]
}{
"error": "Organization ID is required"
}