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

Create 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 a 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 below format: <protocol>:<host>:<port>/<tfsroot>/<collection>/<project> URL format for TFS 2016 and above: <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"
}