Skip to content

Create Git registry

POST
/api/v1/registries/git
curl --request POST \
--url http://localhost:3000/api/v1/registries/git \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "name": "my-workloads-repo", "url": "https://github.com/org/workloads.git", "branch": "main", "path": "/", "authType": "NONE", "credential": "ghp_xxxxxxxxxxxxxxxxxxxx", "syncIntervalMinutes": 60, "webhookSecret": "my-webhook-secret-123", "enabled": true }'

Creates a new Git registry for the current organization.

Media type application/json
object
name
required

Unique name for the registry within the organization

string
>= 2 characters <= 100 characters
Example
my-workloads-repo
url
required

Git repository URL

string
Example
https://github.com/org/workloads.git
branch

Branch to use

string
default: main
Example
main
path

Path within the repository to scan for workloads

string
default: /
Example
/workloads
authType

Authentication type

string
default: NONE
Allowed values: NONE HTTPS_TOKEN SSH_KEY
Example
NONE
credential

Credential (token or SSH key) for authentication. Will be encrypted at rest.

string
Example
ghp_xxxxxxxxxxxxxxxxxxxx
syncIntervalMinutes

Sync interval in minutes

number
default: 60 >= 1 <= 1440
Example
60
webhookSecret

Webhook secret for GitHub/GitLab webhook validation

string
Example
my-webhook-secret-123
enabled

Whether the registry is enabled

boolean
default: true
Example
true

Git registry created successfully

Media type application/json
object
id
required

Unique identifier

string
organizationId
required

Organization ID that owns this registry

string
name
required

Registry name

string
url
required

Git repository URL

string
branch
required

Branch to use

string
path
required

Path within the repository to scan

string
authType
required

Authentication type

string
Allowed values: NONE HTTPS_TOKEN SSH_KEY
hasCredentials
required

Whether credentials are configured

boolean
syncIntervalMinutes
required

Sync interval in minutes

number
lastSyncAt

Last successful sync timestamp

string format: date-time
nullable
lastSyncError

Last sync error message

string
nullable
lastSyncCommit

Last synced commit SHA

string
nullable
hasWebhook
required

Whether a webhook is configured

boolean
enabled
required

Whether the registry is enabled

boolean
createdAt
required

Creation timestamp

string format: date-time
updatedAt
required

Last update timestamp

string format: date-time
Example
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"organizationId": "550e8400-e29b-41d4-a716-446655440001",
"name": "my-workloads-repo",
"url": "https://github.com/org/workloads.git",
"branch": "main",
"path": "/workloads",
"authType": "NONE",
"hasCredentials": false,
"syncIntervalMinutes": 60,
"lastSyncAt": "2024-01-15T10:30:00Z",
"lastSyncError": "Authentication failed",
"lastSyncCommit": "abc123def456",
"hasWebhook": false,
"enabled": true,
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}

Invalid input data

Unauthorized

Forbidden

Registry with this name already exists