Update Git registry
const url = 'http://localhost:3000/api/v1/registries/git/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"name":"my-workloads-repo","url":"https://github.com/org/workloads.git","branch":"main","path":"/workloads","authType":"NONE","credential":"ghp_xxxxxxxxxxxxxxxxxxxx","syncIntervalMinutes":60,"webhookSecret":"my-webhook-secret-123","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 http://localhost:3000/api/v1/registries/git/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --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": "/workloads", "authType": "NONE", "credential": "ghp_xxxxxxxxxxxxxxxxxxxx", "syncIntervalMinutes": 60, "webhookSecret": "my-webhook-secret-123", "enabled": true }'Updates an existing Git registry.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Git registry UUID
Request Body required
Section titled “Request Body required ”object
Unique name for the registry within the organization
Example
my-workloads-repoGit repository URL
Example
https://github.com/org/workloads.gitBranch to use
Example
mainPath within the repository to scan for workloads
Example
/workloadsAuthentication type
Example
TOKENCredential (token or SSH key) for authentication. Set to null to remove.
Example
ghp_xxxxxxxxxxxxxxxxxxxxSync interval in minutes
Example
60Webhook secret for GitHub/GitLab webhook validation
Example
my-webhook-secret-123Whether the registry is enabled
Example
trueResponses
Section titled “ Responses ”Git registry updated successfully
object
Unique identifier
Organization ID that owns this registry
Registry name
Git repository URL
Branch to use
Path within the repository to scan
Authentication type
Whether credentials are configured
Sync interval in minutes
Last successful sync timestamp
Last sync error message
Last synced commit SHA
Whether a webhook is configured
Whether the registry is enabled
Creation timestamp
Last update timestamp
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
Git registry not found
Registry with this name already exists