setGitSourceEnabled
PATCH
/api/v1/git-sources/{sourceId}
const url = 'https://example.com/api/v1/git-sources/example';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"enabled":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/api/v1/git-sources/example \ --header 'Content-Type: application/json' \ --data '{ "enabled": true }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”sourceId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
enabled
required
Sync the source. Off stops polling, webhooks and Sync now.
boolean
key
additional properties
any
Examplegenerated
{ "enabled": true}Responses
Section titled “ Responses ”OK
Media typeapplication/json
object
auth_type
required
string
branch
required
string
credential_secret_key
required
string
enabled
required
boolean
id
required
string
known_hosts
required
string
last_error
required
string
last_sync_at
string | null format: date-time
last_sync_status
required
string
last_synced_sha
required
string
mappings
required
Array<object>
object
adopt
Convert a managed namespace to a git namespace of this source. Its history stays.
boolean
namespace
required
string
repo_path
required
Directory in the repository. Empty is the repository root.
string
key
additional properties
any
name
required
string
poll_interval
required
integer format: int64
repo_url
required
string
webhook_secret_key
required
string
webhook_url
required
string
key
additional properties
any
Examplegenerated
{ "auth_type": "example", "branch": "example", "credential_secret_key": "example", "enabled": true, "id": "example", "known_hosts": "example", "last_error": "example", "last_sync_at": "2026-04-15T12:00:00Z", "last_sync_status": "example", "last_synced_sha": "example", "mappings": [ { "adopt": true, "namespace": "example", "repo_path": "example" } ], "name": "example", "poll_interval": 1, "repo_url": "example", "webhook_secret_key": "example", "webhook_url": "example"}default
Section titled “default”Error
Media typeapplication/json
object
error
required
object
code
required
string
details
message
required
string
key
additional properties
any
key
additional properties
any
Examplegenerated
{ "error": { "code": "example", "details": "example", "message": "example" }}