Repositories
Read APIs for the Repositories page.
List repositories for a project.
Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Organization ID
example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness Project ID
example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Page number to fetch (starting from 0)
0Example: 4Number of results per page
30Example: 50Sort field
lastScanAtExample: severityPossible values: Sort direction
DESCExample: DESCPossible values: Case-insensitive name substring
nodegoatComma-separated target types. Empty means repository.
repositoryPattern: ^(repository(,(repository))*)?$Comma-separated sources. Use Unknown for null/empty source.
Github,Gitlab,UnknownPattern: ^([^,]+(,[^,]+)*)?$Comma-separated scan types
SAST,SCAPattern: ^([^,]+(,[^,]+)*)?$Comma-separated scanner names
semgrep,checkovPattern: ^([^,]+(,[^,]+)*)?$Comma-separated severities with a non-zero occurrence count
critical,highPattern: ^((critical|high|medium|low|info|unassigned)(,(critical|high|medium|low|info|unassigned))*)?$OK response.
BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/repositories?accountId=abcdef1234567890ghijkl&orgId=example_org&projectId=example_project HTTP/1.1
Host: app.harness.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"pagination": {
"link": "",
"page": 4,
"pageSize": 20,
"totalItems": 230,
"totalPages": 12
},
"results": [
{
"executionId": "abcdef1234567890ghijkl",
"executionSource": "harness",
"executionUrl": "https://jenkins.example.com/job/42",
"id": "abcdef1234567890ghijkl",
"isBaseline": true,
"isCommit": false,
"issueSeverityCounts": {
"critical": 3,
"high": 4,
"info": 1,
"low": 2,
"medium": 5,
"unassigned": 0
},
"lastScanAt": 1751793300000,
"name": "NodeGoat",
"occurrenceSeverityCounts": {
"critical": 3,
"high": 4,
"info": 1,
"low": 2,
"medium": 5,
"unassigned": 0
},
"pipelineId": "Security_Gate",
"scanType": {
"Aut ad maiores.": [
{
"id": "trivy",
"prettyName": "Trivy"
},
{
"id": "trivy",
"prettyName": "Trivy"
},
{
"id": "trivy",
"prettyName": "Trivy"
},
{
"id": "trivy",
"prettyName": "Trivy"
}
],
"Nam dolorem nostrum.": [
{
"id": "trivy",
"prettyName": "Trivy"
},
{
"id": "trivy",
"prettyName": "Trivy"
}
]
},
"source": "Github",
"targetName": "main",
"targetVariantId": "abcdef1234567890ghijkl",
"url": "https://github.com/example/repo"
},
{
"executionId": "abcdef1234567890ghijkl",
"executionSource": "harness",
"executionUrl": "https://jenkins.example.com/job/42",
"id": "abcdef1234567890ghijkl",
"isBaseline": true,
"isCommit": false,
"issueSeverityCounts": {
"critical": 3,
"high": 4,
"info": 1,
"low": 2,
"medium": 5,
"unassigned": 0
},
"lastScanAt": 1751793300000,
"name": "NodeGoat",
"occurrenceSeverityCounts": {
"critical": 3,
"high": 4,
"info": 1,
"low": 2,
"medium": 5,
"unassigned": 0
},
"pipelineId": "Security_Gate",
"scanType": {
"Aut ad maiores.": [
{
"id": "trivy",
"prettyName": "Trivy"
},
{
"id": "trivy",
"prettyName": "Trivy"
},
{
"id": "trivy",
"prettyName": "Trivy"
},
{
"id": "trivy",
"prettyName": "Trivy"
}
],
"Nam dolorem nostrum.": [
{
"id": "trivy",
"prettyName": "Trivy"
},
{
"id": "trivy",
"prettyName": "Trivy"
}
]
},
"source": "Github",
"targetName": "main",
"targetVariantId": "abcdef1234567890ghijkl",
"url": "https://github.com/example/repo"
},
{
"executionId": "abcdef1234567890ghijkl",
"executionSource": "harness",
"executionUrl": "https://jenkins.example.com/job/42",
"id": "abcdef1234567890ghijkl",
"isBaseline": true,
"isCommit": false,
"issueSeverityCounts": {
"critical": 3,
"high": 4,
"info": 1,
"low": 2,
"medium": 5,
"unassigned": 0
},
"lastScanAt": 1751793300000,
"name": "NodeGoat",
"occurrenceSeverityCounts": {
"critical": 3,
"high": 4,
"info": 1,
"low": 2,
"medium": 5,
"unassigned": 0
},
"pipelineId": "Security_Gate",
"scanType": {
"Aut ad maiores.": [
{
"id": "trivy",
"prettyName": "Trivy"
},
{
"id": "trivy",
"prettyName": "Trivy"
},
{
"id": "trivy",
"prettyName": "Trivy"
},
{
"id": "trivy",
"prettyName": "Trivy"
}
],
"Nam dolorem nostrum.": [
{
"id": "trivy",
"prettyName": "Trivy"
},
{
"id": "trivy",
"prettyName": "Trivy"
}
]
},
"source": "Github",
"targetName": "main",
"targetVariantId": "abcdef1234567890ghijkl",
"url": "https://github.com/example/repo"
}
]
}List scanned variants for a repository, newest first. Optional search matches variant name or exact variant id.
Associated Target ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Organization ID
example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness Project ID
example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Case-insensitive variant name substring, or exact variant id
maiPage number to fetch (starting from 0)
0Example: 4Results per page
10Example: 50OK response.
BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/repositories/{targetId}/variants?accountId=abcdef1234567890ghijkl&orgId=example_org&projectId=example_project HTTP/1.1
Host: app.harness.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"pagination": {
"link": "",
"page": 4,
"pageSize": 20,
"totalItems": 230,
"totalPages": 12
},
"results": [
{
"created": 1651578240,
"hash": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"id": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"parameters": {
"branch": "main"
},
"targetId": "abcdef1234567890ghijkl"
},
{
"created": 1651578240,
"hash": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"id": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"parameters": {
"branch": "main"
},
"targetId": "abcdef1234567890ghijkl"
},
{
"created": 1651578240,
"hash": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"id": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"parameters": {
"branch": "main"
},
"targetId": "abcdef1234567890ghijkl"
},
{
"created": 1651578240,
"hash": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"id": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"parameters": {
"branch": "main"
},
"targetId": "abcdef1234567890ghijkl"
}
]
}Aggregate widgets for the Repositories page.
Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Organization ID
example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness Project ID
example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$OK response.
Aggregate widgets for the Repositories page.
Repositories with a baseline set
90Change in remediated issues since UTC midnight
40Change in remediated occurrences since UTC midnight
100Total repositories
128BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/repositories/overview?accountId=abcdef1234567890ghijkl&orgId=example_org&projectId=example_project HTTP/1.1
Host: app.harness.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"baselineSet": 90,
"issueRemediations": 40,
"issueSeverityDeltas": {
"critical": -2,
"high": 1,
"info": 0,
"low": -5,
"medium": 0,
"unassigned": 0
},
"issueSeverityTotals": {
"critical": 3,
"high": 4,
"info": 1,
"low": 2,
"medium": 5,
"unassigned": 0
},
"occurrenceRemediations": 100,
"occurrenceSeverityDeltas": {
"critical": -2,
"high": 1,
"info": 0,
"low": -5,
"medium": 0,
"unassigned": 0
},
"occurrenceSeverityTotals": {
"critical": 3,
"high": 4,
"info": 1,
"low": 2,
"medium": 5,
"unassigned": 0
},
"sourceBreakdown": [
{
"count": 42,
"source": "Github"
},
{
"count": 42,
"source": "Github"
}
],
"totalRepositories": 128
}Last updated
Was this helpful?