Update global Git registry
const url = 'http://localhost:3000/api/v1/global-registries/git/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"name":"margo-official-workloads","description":"Official Margo workload definitions","url":"https://github.com/margo-org/workloads.git","branch":"main","path":"/workloads","authType":"NONE","credential":"ghp_xxxxxxxxxxxxxxxxxxxx","syncIntervalMinutes":60,"webhookSecret":"webhook-secret-123","enabled":true,"mandatory":true,"priority":0}'};
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/global-registries/git/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "name": "margo-official-workloads", "description": "Official Margo workload definitions", "url": "https://github.com/margo-org/workloads.git", "branch": "main", "path": "/workloads", "authType": "NONE", "credential": "ghp_xxxxxxxxxxxxxxxxxxxx", "syncIntervalMinutes": 60, "webhookSecret": "webhook-secret-123", "enabled": true, "mandatory": true, "priority": 0 }'Updates an existing global Git registry. Requires Super Admin privileges.
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
Example
margo-official-workloadsDescription of the registry purpose
Example
Official Margo workload definitionsGit repository URL
Example
https://github.com/margo-org/workloads.gitBranch to sync from
Example
mainSubpath within the repository to scan
Example
/workloadsAuthentication type
Credential (token or SSH key) - will be encrypted
Example
ghp_xxxxxxxxxxxxxxxxxxxxSync interval in minutes
Example
60Webhook secret for push-based sync
Example
webhook-secret-123Whether the registry is enabled
Whether this registry is mandatory for all tenants
Priority in the combined registry list (lower is higher priority)
Example
0Responses
Section titled “ Responses ”Git registry updated successfully
object
Registry unique identifier
Unique name for the registry
Description of the registry purpose
Git repository URL
Branch to sync from
Subpath within the repository to scan
Authentication type
Whether credentials are configured
Sync interval in minutes
Last successful sync timestamp
Error message from last sync attempt
Last synced commit hash
Whether webhook is configured
Whether the registry is enabled
Whether this registry is mandatory for all tenants
Priority in the combined registry list
Creation timestamp
Last update timestamp
Example
{ "id": "550e8400-e29b-41d4-a716-446655440000", "name": "margo-official-workloads", "description": "Official Margo workload definitions", "url": "https://github.com/margo-org/workloads.git", "branch": "main", "path": "/workloads", "authType": "NONE", "hasCredentials": false, "syncIntervalMinutes": 60, "lastSyncError": "Authentication failed", "lastSyncCommit": "abc123def456", "hasWebhook": false, "enabled": true, "mandatory": false, "priority": 0}Invalid input data
Unauthorized
Forbidden - Super Admin required
Git registry not found
Registry with this name already exists