sourceCodeManagement

Perforce scmInstances

Updates an instance of Perforce SCM.

SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64> >= 1

ID of the project

Example: projectId=1
instanceId
required
integer <int64> >= 0

ID of the SCM instance

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"
}

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.

SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64> >= 1

ID of the project

Example: projectId=1
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"
}

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.

SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64> >= 1

ID of the project

Example: projectId=1
instanceId
required
integer <int64> >= 0

ID of the SCM instance

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 or https://host.xz/path/to/repo.git~~branch1**FolderA or user@host:path/repo.git>>cmID123**FolderB or https://host.xz/path/to/repo.git^^tag1.1**FolderC or https://host.xz/path/to/repo.git**FolderD",
  • "userName": "abc",
  • "password": "abc",
  • "branch": "master",
  • "commitId": "string",
  • "tag": "string"
}

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.

SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64> >= 1

ID of the project

Example: projectId=1
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 or https://host.xz/path/to/repo.git~~branch1**FolderA or user@host:path/repo.git>>cmID123**FolderB or https://host.xz/path/to/repo.git^^tag1.1**FolderC or https://host.xz/path/to/repo.git**FolderD",
  • "userName": "abc",
  • "password": "abc",
  • "branch": "master",
  • "commitId": "string",
  • "tag": "string"
}

scmInstances

Fetch details of scm instances of a project.

SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64> >= 1

ID of the project

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

ID of the SCM instance

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

SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64> >= 1

ID of the project

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

ID of the SCM instance

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.

SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64> >= 1

ID of the project

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

ID of the SCM instance

Responses
200

Ok

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

delete/scmInstances

Subversion scmInstances

Updates an instance of Subversion SCM.

SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64> >= 1

ID of the project

Example: projectId=1
instanceId
required
integer <int64> >= 0

ID of the SCM instance

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"
}

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.

SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64> >= 1

ID of the project

Example: projectId=1
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"
}

TFS scmInstances

Updates an instance of TFS SCM.

SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64> >= 1

ID of the project

Example: projectId=1
instanceId
required
integer <int64> >= 0

ID of the SCM instance

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"
}

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.

SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64> >= 1

ID of the project

Example: projectId=1
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"
}