sourceCodeManagement

scmInstances

Fetch details of SCM instances of a project.

Request
query Parameters
projectId
required
integer <int32>

ID of the project

Example: projectId=1
scmType
string
Enum: "TFS" "GIT" "SUBVERSION" "PERFORCE"
Example: scmType=GIT | TFS | PERFORCE | SUBVERSION
instanceId
integer <int32>

ID of the SCM instance.

header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Responses
200

Ok

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/scmInstances

scmInstances

Test connection API for SCM instances.

Request
query Parameters
projectId
required
integer <int32>

ID of the project.

Example: projectId=1
scmType
required
string
Default: "GIT"
Enum: "TFS" "GIT" "SUBVERSION" "PERFORCE"
Example: scmType=GIT | TFS | PERFORCE | SUBVERSION
instanceId
required
integer <int32>

ID of the SCM instance.

header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Responses
200

Ok

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

post/scmInstances

scmInstances

Deletes an instance of a particular SCMType.

Request
query Parameters
projectId
required
integer <int32>

ID of the project.

Example: projectId=1
scmType
required
string
Default: "GIT"
Enum: "TFS" "GIT" "SUBVERSION" "PERFORCE"
Example: scmType=GIT | TFS | PERFORCE | SUBVERSION
instanceId
required
integer <int32>

ID of the SCM instance.

header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Responses
200

Ok

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

delete/scmInstances

Git scmInstances

Creates a new instance of Git SCM.

  • url: repository URL in the format: http(s)://host.xz/path/to/repo.git or user@host:path/repo.git.
  • userName/password: userName/password for authenticated access to the repository. Leave blank for anonymous or SSH access.
  • branch/commitId/tag: branch, tag or commit ID. Leave blank to sync to the master branch.
Request
query Parameters
projectId
required
integer <int32>

ID of the project.

Example: projectId=1
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
url
required
string [ 0 .. 2400 ] characters

url

userName
string [ 0 .. 255 ] characters

userName

password
string [ 0 .. 255 ] characters

password

branch
string [ 0 .. 255 ] characters

branch

commitId
string [ 0 .. 255 ] characters

commitId

tag
string [ 0 .. 255 ] characters

tag

Responses
201

Created

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

post/scmInstances/Git
Request samples
application/json
{
  • "url": "string",
  • "userName": "abc",
  • "password": "abc",
  • "branch": "master",
  • "commitId": "string",
  • "tag": "string"
}

Git scmInstances

Updates an instance of Git SCM.

Request
query Parameters
projectId
required
integer <int32>

ID of the project.

Example: projectId=1
instanceId
required
integer <int32>

ID of the SCM instance.

header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
url
required
string [ 0 .. 2400 ] characters

url

userName
string [ 0 .. 255 ] characters

userName

password
string [ 0 .. 255 ] characters

password

branch
string [ 0 .. 255 ] characters

branch

commitId
string [ 0 .. 255 ] characters

commitId

tag
string [ 0 .. 255 ] characters

tag

Responses
200

Ok

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

put/scmInstances/Git
Request samples
application/json
{
  • "url": "string",
  • "userName": "abc",
  • "password": "abc",
  • "branch": "master",
  • "commitId": "string",
  • "tag": "string"
}

Perforce scmInstances

Create a new instance of Perforce SCM.

  • url: URL in the format: <protocol>:<host>:<port>/<depot>, or else configured P4PORT will be taken a default URL.
  • userName/password: userName/password or else configured P4USER/P4PASSWD will be taken as default.
  • branchSpec: branchSpec(<Depot>/<ProjectPath>)
  • changeListNum/label: changeListNum/label or leave blank to sync to the head revision.
Request
query Parameters
projectId
required
integer <int32>

ID of the project.

Example: projectId=1
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
url
string [ 0 .. 2400 ] characters

url

userName
string [ 0 .. 255 ] characters

userName

password
string [ 0 .. 255 ] characters

password

branchSpec
string [ 0 .. 255 ] characters

branchSpec

changeListNum
string [ 0 .. 255 ] characters

changeListNum

label
string [ 0 .. 255 ] characters

label

Responses
201

Created

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

post/scmInstances/Perforce
Request samples
application/json
{
  • "url": "string",
  • "userName": "abc",
  • "password": "abc",
  • "branchSpec": "string",
  • "changeListNum": "string",
  • "label": "string"
}

Perforce scmInstances

Updates an instance of Perforce SCM.

Request
query Parameters
projectId
required
integer <int32>

ID of the project.

Example: projectId=1
instanceId
required
integer <int32>

ID of the SCM instance.

header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
url
string [ 0 .. 2400 ] characters

url

userName
string [ 0 .. 255 ] characters

userName

password
string [ 0 .. 255 ] characters

password

branchSpec
string [ 0 .. 255 ] characters

branchSpec

changeListNum
string [ 0 .. 255 ] characters

changeListNum

label
string [ 0 .. 255 ] characters

label

Responses
200

Ok

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

put/scmInstances/Perforce
Request samples
application/json
{
  • "url": "string",
  • "userName": "abc",
  • "password": "abc",
  • "branchSpec": "string",
  • "changeListNum": "string",
  • "label": "string"
}

Subversion scmInstances

Create a new instance of Subversion SCM.

  • url: URL in the format: <protocol>://<host>/<svnroot>/<repository>
  • userName/password: userName/password or leave blank for anonymous connection.
  • revisionNumber: Revision for which you want to create workspace and run scan on the same.
Request
query Parameters
projectId
required
integer <int32>

ID of the project

Example: projectId=1
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
url
required
string [ 0 .. 2400 ] characters

url

userName
string [ 0 .. 255 ] characters

userName

password
string [ 0 .. 255 ] characters

password

revisionNumber
string [ 0 .. 255 ] characters

revisionNumber

Responses
201

Created

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

post/scmInstances/Subversion
Request samples
application/json
{
  • "url": "string",
  • "userName": "abc",
  • "password": "abc",
  • "revisionNumber": "string"
}

Subversion scmInstances

Updates an instance of Subversion SCM.

Request
query Parameters
projectId
required
integer <int32>

ID of the project

Example: projectId=1
instanceId
required
integer <int32>

ID of the SCM instance

header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
url
required
string [ 0 .. 2400 ] characters

url

userName
string [ 0 .. 255 ] characters

userName

password
string [ 0 .. 255 ] characters

password

revisionNumber
string [ 0 .. 255 ] characters

revisionNumber

Responses
200

Ok

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

put/scmInstances/Subversion
Request samples
application/json
{
  • "url": "string",
  • "userName": "abc",
  • "password": "abc",
  • "revisionNumber": "string"
}

TFS scmInstances

Create a new instance of TFS SCM.

  • url: URL in the following format: <protocol>:<host>:<port>/<tfsroot>/<collection>/<project>. The URL format for TFS 2016 and above is: <protocol>:<host>:<port>/<collection>/<project>
  • userName/password: userName/password for authentication.
  • changeSet: Changeset you wish to sync. If Changeset is not provided, latest revision will be synced unless label is specified.
  • label: Label you wish to sync. If label is not provided, latest revision will be synced unless changeset is specified.
Request
query Parameters
projectId
required
integer <int32>

ID of the project.

Example: projectId=1
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
url
required
string [ 0 .. 2400 ] characters

url

username
required
string [ 0 .. 255 ] characters

userName

password
required
string [ 0 .. 255 ] characters

password

changeSet
string [ 0 .. 255 ] characters

changeSet

label
string [ 0 .. 255 ] characters

label

Responses
201

Created

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

post/scmInstances/TFS
Request samples
application/json
{
  • "url": "string",
  • "username": "abc",
  • "password": "abc",
  • "changeSet": "string",
  • "label": "string"
}

TFS scmInstances

Updates an instance of TFS SCM.

Request
query Parameters
projectId
required
integer <int32>

ID of the project.

Example: projectId=1
instanceId
required
integer <int32>

ID of the SCM instance.

header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
url
required
string [ 0 .. 2400 ] characters

url

username
required
string [ 0 .. 255 ] characters

userName

password
required
string [ 0 .. 255 ] characters

password

changeSet
string [ 0 .. 255 ] characters

changeSet

label
string [ 0 .. 255 ] characters

label

Responses
200

Ok

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

put/scmInstances/TFS
Request samples
application/json
{
  • "url": "string",
  • "username": "abc",
  • "password": "abc",
  • "changeSet": "string",
  • "label": "string"
}