sourceCodeManagement

scmInstances

Fetch details of scm instances of a project.

Request
query Parameters
projectId
required
integer <int32>

ID of the project

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

ID of the SCM instance

Example: instanceId=E.g. 0
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
Response samples
application/json
{
  • "propertyList": [
    ],
  • "scmtype": "string"
}

scmInstances

Test connection api for scm instances

Request
query Parameters
projectId
required
integer <int32>

ID of the project

Example: projectId=E.g. 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

Example: instanceId=E.g. 0
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=E.g. 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

Example: instanceId=E.g. 0
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* - Enter one repository URL and branch/ tag/ commit ID in individual fields or one or more repository URLs separated by comma. You can include a branch, tag, or commit ID notation as part of the URL. 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. Specify one of these values. Or leave blank to sync to the master branch. These three fields will be considered only when single URL is provided without branch/ tag/ commit ID properties in the URL.

Request
query Parameters
projectId
required
integer <int32>

ID of the project

Example: projectId=E.g. 1
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
required
url
required
string [ 0 .. 65535 ] 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": "E.g. https://host.xz/path/to/repo.git or https://host.xz/path/to/repo.git~~branch1 or user@host:path/repo.git>>cmID123 or https://host.xz/path/to/repo.git^^tag1.1",
  • "userName": "abc",
  • "password": "abc",
  • "branch": "master",
  • "commitId": "string",
  • "tag": "string"
}

Git scmInstances

Updates an instance of Git SCM. url* - Enter one repository URL and branch/ tag/ commit ID in individual fields or one or more repository URLs separated by comma. You can include a branch, tag, or commit ID notation as part of the URL. 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. Specify one of these values. Or leave blank to sync to the master branch. These three fields will be considered only when single URL is provided without branch/ tag/ commit ID properties in the URL.

Request
query Parameters
projectId
required
integer <int32>

ID of the project

Example: projectId=E.g. 1
instanceId
required
integer <int32>

ID of the SCM instance

Example: instanceId=E.g. 0
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
required
url
required
string [ 0 .. 65535 ] 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": "E.g. https://host.xz/path/to/repo.git or https://host.xz/path/to/repo.git~~branch1 or user@host:path/repo.git>>cmID123 or https://host.xz/path/to/repo.git^^tag1.1",
  • "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=E.g. 1
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
required
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=E.g. 1
instanceId
required
integer <int32>

ID of the SCM instance

Example: instanceId=E.g. 0
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
required
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=E.g. 1
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
required
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=E.g. 1
instanceId
required
integer <int32>

ID of the SCM instance

Example: instanceId=E.g. 0
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
required
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=E.g. 1
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
required
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=E.g. 1
instanceId
required
integer <int32>

ID of the SCM instance

Example: instanceId=E.g. 0
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
required
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"
}