Skip to content

createGitSource

POST
/api/v1/git-sources
curl --request POST \
--url https://example.com/api/v1/git-sources \
--header 'Content-Type: application/json' \
--data '{ "auth_type": "none", "branch": "example", "credential_secret_key": "example", "known_hosts": "example", "mappings": [ { "namespace": "example", "repo_path": "example" } ], "name": "example", "poll_interval": 1, "repo_url": "example", "webhook_secret_key": "example" }'
Media typeapplication/json
object
auth_type
required
string
Allowed values: none https_token ssh_key
branch
required
string
>= 1 characters <= 255 characters
credential_secret_key

Global secret key with the token or the private key.

string
<= 128 characters
known_hosts
string
<= 65536 characters
mappings
required
Array<object>
>= 1 items <= 100 items
object
namespace
required
string
<= 128 characters
repo_path
required

Directory in the repository. Empty is the repository root.

string
<= 512 characters
key
additional properties
any
name
required
string
/^[a-z0-9][a-z0-9_-]{0,62}$/
poll_interval

Seconds between polls. Default 60.

integer format: int64
>= 15 <= 86400
repo_url
required

Https or ssh URL.

string
>= 1 characters <= 2048 characters
webhook_secret_key

Global secret key with the webhook secret.

string
<= 128 characters
key
additional properties
any

Created

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
<= 128 characters
repo_path
required

Directory in the repository. Empty is the repository root.

string
<= 512 characters
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"
}

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"
}
}