updateGitSource
PUT
/api/v1/git-sources/{sourceId}
const url = 'https://example.com/api/v1/git-sources/example';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"auth_type":"none","branch":"example","credential_secret_key":"example","known_hosts":"example","mappings":[{"namespace":"example","repo_path":"example"}],"poll_interval":1,"repo_url":"example","webhook_secret_key":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/git-sources/example \ --header 'Content-Type: application/json' \ --data '{ "auth_type": "none", "branch": "example", "credential_secret_key": "example", "known_hosts": "example", "mappings": [ { "namespace": "example", "repo_path": "example" } ], "poll_interval": 1, "repo_url": "example", "webhook_secret_key": "example" }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”sourceId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
auth_type
required
string
branch
required
string
credential_secret_key
Global secret key with the token or the private key.
string
known_hosts
string
mappings
required
Array<object>
object
namespace
required
string
repo_path
required
Directory in the repository. Empty is the repository root.
string
key
additional properties
any
poll_interval
Seconds between polls. Default 60.
integer format: int64
repo_url
required
Https or ssh URL.
string
webhook_secret_key
Global secret key with the webhook secret.
string
key
additional properties
any
Responses
Section titled “ Responses ”OK
Media typeapplication/json
object
auth_type
required
string
branch
required
string
credential_secret_key
required
string
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
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", "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": [ { "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" }}