List Git registries
const url = 'http://localhost:3000/api/v1/registries/git?name=workloads&enabled=true&authType=NONE&search=github&limit=20&offset=0&cursor=550e8400-e29b-41d4-a716-446655440000';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:3000/api/v1/registries/git?name=workloads&enabled=true&authType=NONE&search=github&limit=20&offset=0&cursor=550e8400-e29b-41d4-a716-446655440000' \ --header 'X-API-Key: <X-API-Key>'Retrieves a list of Git registries for the current organization.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Example
workloadsFilter by registry name (partial match)
Example
trueFilter by enabled status
Example
TOKENFilter by authentication type
Example
githubSearch across name and URL
Example
20Maximum number of items to return
Example
0Number of items to skip
Example
550e8400-e29b-41d4-a716-446655440000Cursor for pagination (registry ID)
Responses
Section titled “ Responses ”Git registries retrieved successfully
object
List of Git registries
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
Total number of registries matching the query
Number of items returned
Number of items skipped
Whether there are more items
Cursor for fetching next page
Example
{ "items": [ { "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" } ], "total": 10, "limit": 20, "offset": 0, "hasMore": false, "nextCursor": "550e8400-e29b-41d4-a716-446655440000"}Unauthorized
Forbidden