Hey @lbrody,
I think youâll want to use "IsVersionControlled": true
Hereâs an example of a project that has version control enabled.
{
"Id": "Projects-21",
"SpaceId": "Spaces-1",
"VariableSetId": "variableset-Projects-21",
"DeploymentProcessId": "deploymentprocess-Projects-21",
"ClonedFromProjectId": null,
"DiscreteChannelRelease": false,
"IncludedLibraryVariableSetIds": [
"LibraryVariableSets-42"
],
"DefaultToSkipIfAlreadyInstalled": false,
"TenantedDeploymentMode": "TenantedOrUntenanted",
"DefaultGuidedFailureMode": "EnvironmentDefault",
"VersioningStrategy": null,
"ReleaseCreationStrategy": {
"ChannelId": null,
"ReleaseCreationPackage": null,
"ReleaseCreationPackageStepId": null
},
"Templates": [
{
"Id": "c6f614c1-e266-4cf0-8f1e-b703d3f1eaf8",
"Name": "Test",
"Label": "",
"HelpText": null,
"DefaultValue": "Test",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
}
],
"AutoDeployReleaseOverrides": [],
"ReleaseNotesTemplate": null,
"DeploymentChangesTemplate": null,
"ExtensionSettings": [],
"Name": "Support Onboarding App",
"Slug": "support-onboarding-app",
"Description": "",
"IsDisabled": false,
"ProjectGroupId": "ProjectGroups-1",
"LifecycleId": "Lifecycles-3",
"AutoCreateRelease": false,
"IsVersionControlled": true,
"PersistenceSettings": {
"Type": "VersionControlled",
"Url": "https://github.com/dan-close/OctopusCaC.git",
"Credentials": {
"Type": "Reference",
"Id": "GitCredentials-1"
},
"DefaultBranch": "main",
"BasePath": ".octopus/SupportOnboarding"
},
"ProjectConnectivityPolicy": {
"SkipMachineBehavior": "None",
"TargetRoles": [],
"AllowDeploymentsToNoTargets": false,
"ExcludeUnhealthyTargets": false
},
"Links": {
"Self": "/api/Spaces-1/projects/Projects-21/{gitRef}",
"Variables": "/api/Spaces-1/variables/variableset-Projects-21",
"Releases": "/api/Spaces-1/projects/Projects-21/releases{/version}{?skip,take,searchByVersion}",
"Channels": "/api/Spaces-1/projects/Projects-21/channels{/id}{?skip,take,partialName}",
"Triggers": "/api/Spaces-1/projects/Projects-21/triggers{?skip,take,partialName,triggerActionType,triggerActionCategory,runbooks}",
"ScheduledTriggers": "/api/Spaces-1/projects/Projects-21/triggers/scheduled{?skip,take,partialName,ids}",
"OrderChannels": "/api/Spaces-1/projects/Projects-21/channels/order",
"Progression": "/api/Spaces-1/projects/Projects-21/progression{?aggregate}",
"RunbookTaskRunDashboardItemsTemplate": "/api/Spaces-1/progression/runbooks/taskRuns{?skip,take,ids,projectIds,runbookIds,environmentIds,tenantIds,taskIds}",
"DeploymentProcess": "/api/Spaces-1/projects/Projects-21/{gitRef}/deploymentprocesses",
"DeploymentSettings": "/api/Spaces-1/projects/Projects-21/{gitRef}/deploymentsettings",
"Web": "/app#/Spaces-1/projects/Projects-21",
"Logo": "/api/Spaces-1/projects/Projects-21/logo?cb=2022.1.2495",
"Metadata": "/api/Spaces-1/projects/Projects-21/metadata",
"Runbooks": "/api/Spaces-1/projects/Projects-21/runbooks{?skip,take,partialName}",
"RunbookSnapshots": "/api/Spaces-1/projects/Projects-21/runbookSnapshots{/name}{?skip,take,searchByName}",
"Summary": "/api/Spaces-1/projects/Projects-21/{gitRef}/summary",
"GitConnectionTest": "/api/Spaces-1/projects/Projects-21/git/connectivity-test",
"Branches": "/api/Spaces-1/projects/Projects-21/git/branches{/name}{?skip,take,searchByName,refresh}",
"RepositoryModified": "/api/Spaces-1/projects/Projects-21/git/modified",
"ValidateGitRef": "/api/Spaces-1/projects/Projects-21/{gitRef}/validate"
}
}
You can see about halfway down is the IsVersionControlled setting.
Best,
Brent