repositories
Get Repositories
Get repositories for the specified organization.
Returns a paginated list of all repositories that belong to the specified organization. Results include repository details such as name, ID, description, visibility, and setup status. Use pagination parameters to control the number of results returned.
Rate limit: 60 requests per 30 seconds.
GET
/
v1
/
organizations
/
{org_id}
/
repos
Get Repositories
curl --request GET \
--url https://api.codegen.com/v1/organizations/{org_id}/reposimport requests
url = "https://api.codegen.com/v1/organizations/{org_id}/repos"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.codegen.com/v1/organizations/{org_id}/repos', 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://api.codegen.com/v1/organizations/{org_id}/repos",
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.codegen.com/v1/organizations/{org_id}/repos"
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.codegen.com/v1/organizations/{org_id}/repos")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.codegen.com/v1/organizations/{org_id}/repos")
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{
"items": [
{
"id": 123,
"name": "<string>",
"full_name": "<string>",
"description": "<string>",
"github_id": "<string>",
"organization_id": 123,
"visibility": "<string>",
"archived": true,
"setup_status": "<string>",
"language": "<string>"
}
],
"total": 123,
"page": 123,
"size": 123,
"pages": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"message": "Rate limit exceeded. Please try again later.",
"status_code": 429
}Headers
Path Parameters
Query Parameters
Required range:
x >= 0Required range:
1 <= x <= 100Was this page helpful?
⌘I
Get Repositories
curl --request GET \
--url https://api.codegen.com/v1/organizations/{org_id}/reposimport requests
url = "https://api.codegen.com/v1/organizations/{org_id}/repos"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.codegen.com/v1/organizations/{org_id}/repos', 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://api.codegen.com/v1/organizations/{org_id}/repos",
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.codegen.com/v1/organizations/{org_id}/repos"
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.codegen.com/v1/organizations/{org_id}/repos")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.codegen.com/v1/organizations/{org_id}/repos")
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{
"items": [
{
"id": 123,
"name": "<string>",
"full_name": "<string>",
"description": "<string>",
"github_id": "<string>",
"organization_id": 123,
"visibility": "<string>",
"archived": true,
"setup_status": "<string>",
"language": "<string>"
}
],
"total": 123,
"page": 123,
"size": 123,
"pages": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"message": "Rate limit exceeded. Please try again later.",
"status_code": 429
}