Skip to content

List repositories

GET
/v1/repositories
curl --request GET \
--url 'https://api.devsecure.io/v1/repositories?limit=50' \
--header 'Authorization: Bearer <token>'

Code repositories (GitHub, GitLab, Bitbucket) and container images the workspace has scanned, plus selected GitLab projects not scanned yet. Sorted by name.

limit
Limit

Page size (1-200).

integer
default: 50 >= 1 <= 200

Page size (1-200).

cursor
Any of:
string
<= 1024 characters

Opaque cursor from the previous page.

provider
Provider
Array<string>
default:
Allowed values: github gitlab bitbucket container
q
Any of:
string
>= 1 characters <= 100 characters

Case-insensitive name contains.

team_id
Any of:
string
<= 64 characters

Only repositories owned by this team.

OK.

Media typeapplication/json
RepositoryList
object
data
required
Data
Array<object>
Repository
object
id
required
Id

Stable, opaque, workspace-specific id.

string
provider
required
Provider
string
Allowed values: github gitlab bitbucket container
name
required
Name

Full name, or image reference for containers.

string
url
Any of:
string
scan_count
required
Scan Count
integer
last_scan_at
Any of:
string
latest_scan
Any of:
ScanRef
object
id
required
Id
string
status
required
Status
string
Allowed values: queued running completed failed unknown
created_at
Any of:
string
open_issues
required
SeverityCounts

Open issues found by the latest scan, by severity.

object
critical
Critical
integer
0
high
High
integer
0
medium
Medium
integer
0
low
Low
integer
0
info
Info
integer
0
total
Total
integer
0
teams
required
Teams
Array<object>
TeamRef
object
id
required
Id
string format: uuid
slug
required
Slug
string
name
required
Name
string
pagination
required
PageInfo
object
next_cursor
required
Any of:
string
has_more
required
Has More
boolean
Example
{
"data": [
{
"id": "repo_3f9a0c2d4b1e8f7a6c5d4e3f",
"provider": "github",
"name": "acme/payments-api",
"url": "https://github.com/acme/payments-api",
"latest_scan": {
"id": "1042",
"status": "queued"
},
"open_issues": {
"critical": 0,
"high": 0,
"medium": 0,
"low": 0,
"info": 0,
"total": 0
},
"teams": [
{
"slug": "payments",
"name": "Payments"
}
]
}
]
}
X-Request-ID
string

Identifies the request; quote it to support.

X-RateLimit-Limit
integer

Requests allowed per window.

X-RateLimit-Remaining
integer

Requests left in the window.

X-RateLimit-Reset
integer

Seconds until the window resets.

X-Has-Next-Page
string
Allowed values: true false

Whether another page follows.

The request is not valid (validation_error, invalid_cursor).

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
request_id
required
Any of:
string
details
Any of:
Array<object>
ErrorDetail
object
field
Any of:
string
message
required
Message
string
Example
{
"error": {
"code": "validation_error",
"message": "The request is not valid.",
"request_id": "req_3f0c2a9d5b6e4f7a8c1d2e3f4a5b6c7d"
}
}
X-Request-ID
string

Identifies the request; quote it to support.

Missing, unknown, expired or revoked credential (invalid_credentials).

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
request_id
required
Any of:
string
details
Any of:
Array<object>
ErrorDetail
object
field
Any of:
string
message
required
Message
string
Example
{
"error": {
"code": "invalid_credentials",
"message": "The credential is missing, invalid, expired or revoked.",
"request_id": "req_3f0c2a9d5b6e4f7a8c1d2e3f4a5b6c7d"
}
}
X-Request-ID
string

Identifies the request; quote it to support.

The credential may not do this (insufficient_scope, permission_denied, plan_not_allowed, quota_exceeded, target_not_authorized).

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
request_id
required
Any of:
string
details
Any of:
Array<object>
ErrorDetail
object
field
Any of:
string
message
required
Message
string
Example
{
"error": {
"code": "insufficient_scope",
"message": "The credential does not have the scope this operation needs.",
"request_id": "req_3f0c2a9d5b6e4f7a8c1d2e3f4a5b6c7d"
}
}
X-Request-ID
string

Identifies the request; quote it to support.

Too many requests (rate_limited).

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
request_id
required
Any of:
string
details
Any of:
Array<object>
ErrorDetail
object
field
Any of:
string
message
required
Message
string
Example
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after the time in Retry-After.",
"request_id": "req_3f0c2a9d5b6e4f7a8c1d2e3f4a5b6c7d"
}
}
X-Request-ID
string

Identifies the request; quote it to support.

X-RateLimit-Limit
integer

Requests allowed per window.

X-RateLimit-Remaining
integer

Requests left in the window.

X-RateLimit-Reset
integer

Seconds until the window resets.

Retry-After
integer

Seconds to wait before retrying.

Unexpected error (internal_error). Quote the request id to support.

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
request_id
required
Any of:
string
details
Any of:
Array<object>
ErrorDetail
object
field
Any of:
string
message
required
Message
string
Example
{
"error": {
"code": "internal_error",
"message": "Something went wrong on our side.",
"request_id": "req_3f0c2a9d5b6e4f7a8c1d2e3f4a5b6c7d"
}
}
X-Request-ID
string

Identifies the request; quote it to support.