Pull Requests
Access and Modify Pull Requests
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_]*$GithubVeritatis et nihil necessitatibus.Harness personal or service access token
Ut sint.OK response.
BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/pull-requests/repositories?accountId=abcdef1234567890ghijkl&provider=Github&repositoryPath=Veritatis+et+nihil+necessitatibus. HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"pullRequests": [
{
"commentUrl": "https://github.com/owner/repo/pull/1#discussion_r12345",
"pullRequestNumber": 3295656787848523000,
"pullRequestUrl": "Perspiciatis debitis aut delectus minima quas ducimus.",
"sourceBranch": "feat/shiny-object"
},
{
"commentUrl": "https://github.com/owner/repo/pull/1#discussion_r12345",
"pullRequestNumber": 3295656787848523000,
"pullRequestUrl": "Perspiciatis debitis aut delectus minima quas ducimus.",
"sourceBranch": "feat/shiny-object"
}
]
}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_]*$GithubItaque voluptatibus.The number of the pullRequest to retrieve
11Harness personal or service access token
Excepturi molestias ad dolor error quis.OK response.
Direct URL to the suggestion comment (returned by UpdatePullRequest)
https://github.com/owner/repo/pull/1#discussion_r12345The number of the Pull Request
7303291359320333000The URL of the Pull Request
Aut est quia ullam.The source branch of the Pull Request
feat/shiny-objectBadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/pull-requests/repositories/pulls?accountId=abcdef1234567890ghijkl&provider=Github&repositoryPath=Itaque+voluptatibus.&pullRequestNumber=11 HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"commentUrl": "https://github.com/owner/repo/pull/1#discussion_r12345",
"pullRequestNumber": 3295656787848523000,
"pullRequestUrl": "Perspiciatis debitis aut delectus minima quas ducimus.",
"sourceBranch": "feat/shiny-object"
}Use AI to augment the remediation steps for this Security Issue
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_]*$GithubVoluptatem assumenda.Harness personal or service access token
Explicabo enim sed ut accusamus.developA description of the Pull Request.The ID of the Security Issue to create a Pull Request for
1234567890abcdefghijklPattern: ^[a-zA-Z0-9_-]{22}$12345https://app.harness.io/path/to/pipelinefunc example() int { return 0 }16path/to/code14Context to the function.9The Security Scan execution that detected this Security Issue
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$func example() int { return 0 }OK response.
Direct URL to the suggestion comment (returned by UpdatePullRequest)
https://github.com/owner/repo/pull/1#discussion_r12345The number of the Pull Request
7303291359320333000The URL of the Pull Request
Aut est quia ullam.The source branch of the Pull Request
feat/shiny-objectBadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
Conflict: Conflict response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
POST /gateway/sto/api/v2/pull-requests/repositories/pulls?accountId=abcdef1234567890ghijkl&provider=Github&repositoryPath=Voluptatem+assumenda. HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 480
{
"branch": "develop",
"description": "A description of the Pull Request.",
"id": "1234567890abcdefghijkl",
"occurrenceId": 12345,
"pipelineUrl": "https://app.harness.io/path/to/pipeline",
"remediationCode": "func example() int {\n return 0\n}",
"remediationCodeEnd": 16,
"remediationCodePath": "path/to/code",
"remediationCodeStart": 14,
"remediationContext": "Context to the function.",
"remediationIndent": 9,
"scanId": "abcdef1234567890ghijkl",
"vulnerableCode": "func example() int {\n return 0\n}"
}{
"commentUrl": "https://github.com/owner/repo/pull/1#discussion_r12345",
"pullRequestNumber": 3295656787848523000,
"pullRequestUrl": "Perspiciatis debitis aut delectus minima quas ducimus.",
"sourceBranch": "feat/shiny-object"
}Use AI to augment the remediation steps for this Security Issue
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_]*$GithubConsequatur enim harum voluptatem.Harness personal or service access token
Laboriosam et.The ID of the Security Issue to create a Pull Request for
1234567890abcdefghijklPattern: ^[a-zA-Z0-9_-]{22}$12345https://app.harness.io/path/to/pipeline11func example() int { return 0 }16path/to/code14Context to the function.9The Security Scan execution that detected this Security Issue
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$func example() int { return 0 }OK response.
Direct URL to the suggestion comment (returned by UpdatePullRequest)
https://github.com/owner/repo/pull/1#discussion_r12345The number of the Pull Request
7303291359320333000The URL of the Pull Request
Aut est quia ullam.The source branch of the Pull Request
feat/shiny-objectBadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
Conflict: Conflict response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
PUT /gateway/sto/api/v2/pull-requests/repositories/pulls?accountId=abcdef1234567890ghijkl&provider=Github&repositoryPath=Consequatur+enim+harum+voluptatem. HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 433
{
"id": "1234567890abcdefghijkl",
"occurrenceId": 12345,
"pipelineUrl": "https://app.harness.io/path/to/pipeline",
"pullRequestNumber": 11,
"remediationCode": "func example() int {\n return 0\n}",
"remediationCodeEnd": 16,
"remediationCodePath": "path/to/code",
"remediationCodeStart": 14,
"remediationContext": "Context to the function.",
"remediationIndent": 9,
"scanId": "abcdef1234567890ghijkl",
"vulnerableCode": "func example() int {\n return 0\n}"
}{
"commentUrl": "https://github.com/owner/repo/pull/1#discussion_r12345",
"pullRequestNumber": 3295656787848523000,
"pullRequestUrl": "Perspiciatis debitis aut delectus minima quas ducimus.",
"sourceBranch": "feat/shiny-object"
}Determine the PR action to display for a specific occurrence (create, suggestFix, display, or none).
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_]*$Git provider (optional for action query — returns none with reason if empty)
GithubRepository path (optional for action query — returns none with reason if empty)
Impedit non dolore.The ID of the Security Issue
1234567890abcdefghijklPattern: ^[a-zA-Z0-9_-]{22}$The internal ID of the occurrence to evaluate
12345The Security Scan execution that detected this Security Issue
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness personal or service access token
Qui labore corporis dignissimos.OK response.
The PR action to display: create, suggestFix, display, or none
createPossible values: Direct URL to the suggestion comment (for display action after suggestFix)
Magnam ut aut velit.If true, the action button should be shown but disabled
falseReason the action is disabled (e.g., missing targetBranch)
Autem quos temporibus odio sint consequuntur.The PR number (for display or suggestFix actions)
6821880896199125000The full URL of the PR (for display action)
Fugiat dolores in ea necessitatibus.End line of the vulnerable code in the file
8727523548866207000The file path for the remediation code, resolved from the occurrence
Architecto reprehenderit sed.Start line of the vulnerable code in the file
9208424656144258000Column indentation of the vulnerable code
781280619095246000The target branch for PR creation
Non at quia fuga temporibus.BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/pull-requests/repositories/pulls/action?accountId=abcdef1234567890ghijkl&id=1234567890abcdefghijkl&occurrenceId=12345&scanId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"action": "create",
"commentUrl": "Ipsa et voluptate.",
"disabled": true,
"disabledReason": "Eaque suscipit.",
"pullRequestNumber": 2194831345472969000,
"pullRequestUrl": "Et et voluptatem ipsam accusamus qui quae.",
"remediationCodeEnd": 2776918043627674600,
"remediationCodePath": "Quo delectus minima.",
"remediationCodeStart": 3582417294940462600,
"remediationIndent": 4519595233528984000,
"targetBranch": "Reiciendis reiciendis voluptatem hic aut."
}Determine if a path is correlated to a Pull Request.
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_]*$GithubIllum laboriosam a.11path/to/codeHarness personal or service access token
Vel occaecati quis.OK response.
True if the path is correlated to the Pull Request
trueBadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/pull-requests/repositories/pulls/correlation?accountId=abcdef1234567890ghijkl&provider=Github&repositoryPath=Illum+laboriosam+a.&pullRequestNumber=11&codePath=path%2Fto%2Fcode HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"isCorrelated": true
}Last updated
Was this helpful?