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.
includeSubmodules - (Optional, Boolean, default: true) Controls whether submodules are included during sync.
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 -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",
"includeSubmodules": true
}'