Description: Retrieve a list of all git repositories that have been scanned.
Note: This API endpoint allows you to fetch comprehensive information about git repositories based on the scans that have been performed. You can apply various filters to refine the results.
Since: Xray 3.122
Security: Requires a user with READ permissions.
Usage: GET /xray/api/v1/git/repositories
Produces: application/json
Query Parameters
Name | Type | Required/Optional | Description |
|---|---|---|---|
| integer | optional | Page number for pagination. Default: 1 |
| integer | optional | Number of results per page. Default: 50 |
| string | optional | Sort field: Id, name, or last_scanned_date |
| string | optional | Sort direction: asc or desc |
Response Codes
Name | Description |
|---|---|
| OK |
| Bad request: invalid parameters |
| Unauthorized |
| Forbidden |
| Internal error |
Response Body
Name | Type | Description |
|---|---|---|
| integer | Current page number |
| integer | Items returned per page |
| integer | Total number of repositories available |
| array[repository] | Repositories returned |
repository
Name | Type | Description |
|---|---|---|
| int | Unique identifier |
| string | Repository URL |
| string | Repository name |
| string | Owning project name |
| string | GitHub, GitLab, Bitbucket, Azure, or unknown |
| string | ISO 8601 timestamp of the last scan (e.g. |
| string | Hash of the last scanned commit |
| array[string] | Branches that were scanned |
Successful Response Example
{
"page": 1,
"limit": 10,
"total_count": 1,
"repositories": [
{
"id": 12,
"url": "https://git.jfrog.info/projects/XSC/repos/xsc-service",
"name": "xsc-service",
"git_project": "XSC",
"git_provider": "github",
"last_scanned_date": "2024-08-10T10:13:48Z",
"last_scanned_commit": "8ba779e5",
"scanned_branches": [
"main"
]
}
]
}