Skip to content
These docs describe staging.zkao.io and the @zksecurity/zkao-cli@next release. For production, see docs.zkao.io.

List repositories in the project

GET
/projects/{projectId}/repositories
curl --request GET \
--url https://zkao.io/api/v1/projects/example/repositories \
--header 'Authorization: Bearer <token>'

Requires scope: read. Limited to the token’s repo allowlist when set.

projectId
required
string

OK

Media typeapplication/json
object
repositories
required
Array<object>
object
id
required
string
slug
required

URL segment of the repository inside its project (/orgs/<org>/projects/<project>/repos/<slug>). Unique per project.

string
owner
required
string
name
required
string
url
required
string
defaultBranch
string | null
status
required

ACTIVE | MARKED_FOR_DELETION

string
readiness
required

Whether a scan can start on this repository. A newly added repository is analyzing until a one-time pass over it finishes; launching a scan meanwhile fails with repository_initializing. Poll this endpoint rather than retrying the launch blind.

string
Allowed values: ready analyzing
Example
{
"repositories": [
{
"readiness": "ready"
}
]
}

Missing, malformed, expired, or revoked token

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden not_found bad_request conflict insufficient_credits repository_initializing diff_base_required diff_base_not_allowed diff_base_invalid diff_empty rate_limited internal
message
required
string
Example
{
"error": {
"code": "unauthorized"
}
}

The token lacks the required scope

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden not_found bad_request conflict insufficient_credits repository_initializing diff_base_required diff_base_not_allowed diff_base_invalid diff_empty rate_limited internal
message
required
string
Example
{
"error": {
"code": "unauthorized"
}
}

Resource not in this token’s project or repo allowlist

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden not_found bad_request conflict insufficient_credits repository_initializing diff_base_required diff_base_not_allowed diff_base_invalid diff_empty rate_limited internal
message
required
string
Example
{
"error": {
"code": "unauthorized"
}
}