Zum Hauptinhalt springen
GET
/
v3beta1
/
organizations
/
{org_id}
/
repositories
Für eine Organisation verfügbare Repositorys auflisten
curl --request GET \
  --url https://api.devin.ai/v3beta1/organizations/{org_id}/repositories \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.devin.ai/v3beta1/organizations/{org_id}/repositories"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.devin.ai/v3beta1/organizations/{org_id}/repositories', 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.devin.ai/v3beta1/organizations/{org_id}/repositories",
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://api.devin.ai/v3beta1/organizations/{org_id}/repositories"

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://api.devin.ai/v3beta1/organizations/{org_id}/repositories")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.devin.ai/v3beta1/organizations/{org_id}/repositories")

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
{
  "items": [
    {
      "git_connection_host": "<string>",
      "git_connection_id": "<string>",
      "indexing_status": {
        "indexing_enabled": true,
        "latest_completed_search_index_job": {
          "branch_name": "<string>",
          "commit": "<string>",
          "created_at": 123,
          "job_id": "<string>"
        },
        "latest_completed_wiki_index_job": {
          "branch_name": "<string>",
          "commit": "<string>",
          "created_at": 123,
          "job_id": "<string>"
        },
        "latest_indexes": [
          {
            "branch_name": "<string>",
            "commit": "<string>",
            "created_at": 123,
            "job_id": "<string>"
          }
        ]
      },
      "last_updated_at": 123,
      "provider_repository_id": "<string>",
      "repo_description": "<string>",
      "repo_language": "<string>",
      "repo_name": "<string>",
      "repo_path": "<string>"
    }
  ],
  "end_cursor": "<string>",
  "has_next_page": false,
  "total": 123
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Berechtigungen

Erfordert einen Service-Benutzer mit Read-Berechtigung auf Organisationsebene.

Abfrageparameter

  • filter_name — Repository nach Namen filtern (Teiltreffer, Groß-/Kleinschreibung wird nicht berücksichtigt).
  • only_repo_paths — Nur Repository zurückgeben, die diesen Pfaden entsprechen.
  • exclude_repo_paths — Repository ausschließen, die diesen Pfaden entsprechen.
  • load_indexing_status — Gibt an, ob der Indizierungsstatus in die Antwort aufgenommen werden soll (Standard: true). Auf false setzen, um schnellere Antworten zu erhalten, wenn der Indizierungsstatus nicht benötigt wird.

Autorisierungen

Authorization
string
header
erforderlich

Servicebenutzer-Anmeldedaten (Präfix: cog_)

Pfadparameter

org_id
string
erforderlich

Organisations-ID (Präfix: org-)

Beispiel:

"org-abc123def456"

Abfrageparameter

after
string | null
first
integer
Standard:100
Erforderlicher Bereich: 1 <= x <= 100
filter_name
string | null
only_repo_paths
string[] | null
exclude_repo_paths
string[] | null
load_indexing_status
boolean
Standard:true

Antwort

Erfolgreiche Antwort

items
RepositoryResponse · object[]
erforderlich
end_cursor
string | null

Cursor zum Abrufen der nächsten Seite oder None, wenn dies die letzte Seite ist.

has_next_page
boolean
Standard:false

Gibt an, ob nach dieser Seite weitere Einträge verfügbar sind.

total
integer | null

Optionale Gesamtzahl (kann aus Performancegründen weggelassen werden).