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,"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, "enabled": true }'Updates an existing Git registry.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Git registry UUID
Header Parameters
Section titled “Header Parameters”UUID of the organization (tenant) the request acts in. It selects the tenant and grants nothing: the server checks membership or an open tenant switch. Not needed for global operations. A malformed value returns 400. API keys are fixed to their own organization; another organization returns 403. The x-organization-source header grants nothing.
Request Bodyrequired
Section titled “Request Bodyrequired”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
60Whether 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 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", "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