scm

creates a pull request

Request
Security:
ApiKey (readwrite)
Request Body schema:
sourceBranch
required
string
targetBranch
required
string
title
required
string
yamlGitConfigRef
required
string
accountIdentifier
string
orgIdentifier
string
projectIdentifier
string
useUserFromToken
boolean
Responses
200

successful operation

400

Bad Request

500

Internal server error

post/ng/api/scm/createPR
Request samples
{
  • "sourceBranch": "string",
  • "targetBranch": "string",
  • "title": "string",
  • "yamlGitConfigRef": "string",
  • "accountIdentifier": "string",
  • "orgIdentifier": "string",
  • "projectIdentifier": "string",
  • "useUserFromToken": true
}
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

Gets list of branches by Git Config Identifier

Request
Security:
ApiKey (readwrite)
query Parameters
yamlGitConfigIdentifier
string
accountIdentifier
string
orgIdentifier
string
projectIdentifier
string
page
integer <int32>
Default: 0
size
integer <int32>
Default: 50
searchTerm
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

get/ng/api/scm/listBranchesByGitConfig
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/scm/listBranchesByGitConfig?yamlGitConfigIdentifier=string&accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&page=0&size=50&searchTerm=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": [
    ],
  • "metaData": { },
  • "correlationId": "string"
}

Gets list of branches by Connector Identifier

Request
Security:
ApiKey (readwrite)
query Parameters
connectorIdentifierRef
string
accountIdentifier
string
orgIdentifier
string
projectIdentifier
string
repoURL
string
page
integer <int32>
Default: 0
size
integer <int32>
Default: 50
searchTerm
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

get/ng/api/scm/listRepoBranches
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/scm/listRepoBranches?connectorIdentifierRef=string&accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&repoURL=string&page=0&size=50&searchTerm=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": [
    ],
  • "metaData": { },
  • "correlationId": "string"
}

Checks if Saas is possible

Request
Security:
ApiKey (readwrite)
query Parameters
repoURL
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

post/ng/api/scm/isSaasGit
Request samples
curl -i -X POST \
  'https://app.harness.io/gateway/ng/api/scm/isSaasGit?repoURL=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

Gets file content

Request
Security:
ApiKey (readwrite)
query Parameters
yamlGitConfigIdentifier
required
string
accountIdentifier
required
string
orgIdentifier
string
projectIdentifier
string
filePath
required
string
branch
string
commitId
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

get/ng/api/scm/fileContent
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/scm/fileContent?yamlGitConfigIdentifier=string&accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&filePath=string&branch=string&commitId=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}