Internal API for fetching custom email templates and images from core server
Code Insight REST API Documentation (v1)
The Code Insight REST APIs provide a standardized interface for interacting with the application.
An authorization JWT token must be included in the HTTP Authorization header using the Bearer schema. The token can be obtained from the Code Insight Web UI under the Preferences menu. To set the token, click the Authorize button below on the right, enter the JWT token in the Value field, then click Authorize and close the dialog. Once authorized, the token will be automatically included in the HTTP Authorization header for all API requests made through the Swagger UI.
Note: If accessing the REST APIs through external tools such as curl or Postman, include the token manually in the HTTP header using the following format: Authorization: Bearer JWT_TOKEN. "Bearer" must precede the actual JWT token value.
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/scmInstances/Perforce
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/scmInstances/Perforce
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://codeinsightapi.redocly.app/_mock/swagger/scmInstances/Perforce?projectId=1&instanceId=0' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"url": "string",
"userName": "abc",
"password": "abc",
"branchSpec": "string",
"changeListNum": "string",
"label": "string"
}'Request
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.
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/scmInstances/Perforce
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/scmInstances/Perforce
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://codeinsightapi.redocly.app/_mock/swagger/scmInstances/Perforce?projectId=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"url": "string",
"userName": "abc",
"password": "abc",
"branchSpec": "string",
"changeListNum": "string",
"label": "string"
}'Request
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.
expansionLevel - (Optional, Integer, default: 1, values: 1/2/3) Control archive extraction depth: 1=None (no extraction), 2=Top-level archives only, 3=Recursive (nested archives).
deleteArchiveAfterExpand - (Optional, Boolean, default: false) Delete archive files after extraction to save disk space. Note: This field is only applicable when expansionLevel is 2 or 3.
archiveDirSuffix - (Optional, String, max: 20 chars) Suffix to be added to the expanded folder. Value cannot be more than 20 characters and cannot contain the following special characters: \ / : * ? " < > | \0 (Example: _Expanded). Note: This field is only applicable when expansionLevel is 2 or 3.
url
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/scmInstances/Git
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/scmInstances/Git
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://codeinsightapi.redocly.app/_mock/swagger/scmInstances/Git?projectId=1&instanceId=0' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"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",
"deleteArchiveAfterExpand": true,
"expansionLevel": 2,
"archiveDirSuffix": "_Expanded"
}'Request
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.
expansionLevel - (Optional, Integer, default: 1, values: 1/2/3) Control archive extraction depth: 1=None (no extraction), 2=Top-level archives only, 3=Recursive (nested archives).
deleteArchiveAfterExpand - (Optional, Boolean, default: false) Delete archive files after extraction to save disk space. Note: This field is only applicable when expansionLevel is 2 or 3.
archiveDirSuffix - (Optional, String, max: 20 chars) Suffix to be added to the expanded folder. Value cannot be more than 20 characters and cannot contain the following special characters: \ / : * ? " < > | \0 (Example: _Expanded). Note: This field is only applicable when expansionLevel is 2 or 3.
url
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/scmInstances/Git
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/scmInstances/Git
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://codeinsightapi.redocly.app/_mock/swagger/scmInstances/Git?projectId=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"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",
"deleteArchiveAfterExpand": true,
"expansionLevel": 2,
"archiveDirSuffix": "_Expanded"
}'- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/scmInstances
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/scmInstances
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://codeinsightapi.redocly.app/_mock/swagger/scmInstances?projectId=1&scmType=GIT&instanceId=0' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "propertyList": [ { … } ], "scmtype": "string" }
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/scmInstances
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/scmInstances
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://codeinsightapi.redocly.app/_mock/swagger/scmInstances?projectId=1&scmType=GIT&instanceId=0' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/scmInstances
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/scmInstances
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://codeinsightapi.redocly.app/_mock/swagger/scmInstances?projectId=1&scmType=GIT&instanceId=0' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/scmInstances/Subversion
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/scmInstances/Subversion
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://codeinsightapi.redocly.app/_mock/swagger/scmInstances/Subversion?projectId=1&instanceId=0' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"url": "string",
"userName": "abc",
"password": "abc",
"revisionNumber": "string"
}'Request
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.
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/scmInstances/Subversion
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/scmInstances/Subversion
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://codeinsightapi.redocly.app/_mock/swagger/scmInstances/Subversion?projectId=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"url": "string",
"userName": "abc",
"password": "abc",
"revisionNumber": "string"
}'- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/scmInstances/TFS
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/scmInstances/TFS
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://codeinsightapi.redocly.app/_mock/swagger/scmInstances/TFS?projectId=1&instanceId=0' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"url": "string",
"username": "abc",
"password": "abc",
"changeSet": "string",
"label": "string"
}'Request
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.
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/scmInstances/TFS
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/scmInstances/TFS
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://codeinsightapi.redocly.app/_mock/swagger/scmInstances/TFS?projectId=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"url": "string",
"username": "abc",
"password": "abc",
"changeSet": "string",
"label": "string"
}'