Skip to content

Get a repository

GET
/api/v1/repositories/{id}
curl --request GET \
--url https://api.aletheia-ops.com/api/v1/repositories/example \
--header 'Authorization: Bearer <token>'
id
required
string

OK

Media typeapplication/json

Repository detail projection

object
id
string
provider
string
full_name
string
default_branch
string
visibility
string
archived
boolean
iac_project_count
integer
open_pr_count
integer
application_ids
Array<string>
team_ids
Array<string>
scan_status
string
last_scanned_at
string format: date-time
connection_status
string
external_repo_id
string
last_scanned_commit_sha
string
codeowners
Array<object>

One CODEOWNERS entry

object
pattern
string
owners
Array<string>
automation
Array<object>

One automation grant (default or per-environment)

object
environment_id
string
level
string
note
string
Examplegenerated
{
"id": "example",
"provider": "example",
"full_name": "example",
"default_branch": "example",
"visibility": "example",
"archived": true,
"iac_project_count": 1,
"open_pr_count": 1,
"application_ids": [
"example"
],
"team_ids": [
"example"
],
"scan_status": "example",
"last_scanned_at": "2026-04-15T12:00:00Z",
"connection_status": "example",
"external_repo_id": "example",
"last_scanned_commit_sha": "example",
"codeowners": [
{
"pattern": "example",
"owners": [
"example"
]
}
],
"automation": [
{
"environment_id": "example",
"level": "example",
"note": "example"
}
]
}

No valid credential was presented, or it has expired.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
{
"code": "unauthorized",
"message": "authentication required"
}

Authenticated, but not permitted to perform this action.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
{
"code": "forbidden",
"message": "you do not have permission to perform this action"
}

The resource does not exist, or belongs to another organization. The two are deliberately indistinguishable.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
Examplenot_found
{
"code": "not_found",
"message": "resource not found"
}

An unexpected failure. Diagnostic detail is logged server-side and deliberately not returned. Quote the X-Request-Id response header when reporting one.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
Exampleinternal_error
{
"code": "internal_error",
"message": "internal server error"
}