Delete Container Registry
Delete a container registry configuration. This removes the stored credentials and configuration.
Endpoint
DELETE /{company_id}/container-registries/{id}
Authentication
Requires API token with container-registries:delete scope.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string (UUID) | Yes | Container Registry ID |
Response
Success Response (204 No Content)
No response body is returned on successful deletion.
Error Responses
404 Not Found
{
"code": "NOT_FOUND",
"message": "Container registry not found",
"request_id": "/api/v1/{company_id}/container-registries/{id}",
"timestamp": "2024-01-16T15:30:00Z"
}
409 Conflict
{
"code": "CONFLICT",
"message": "Cannot delete container registry: still in use by applications",
"request_id": "/api/v1/{company_id}/container-registries/{id}",
"timestamp": "2024-01-16T15:30:00Z"
}
Example Request
curl -X DELETE "https://api.thevenin.cloud/{company_id}/container-registries/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer tvn_your_api_token_here"
Important Considerations
Before Deletion
- Check Application Dependencies: Ensure no applications are currently using this registry
- List Applications: Use the List Applications endpoint to check for dependencies
- Alternative Registry: If applications depend on it, configure an alternative registry first
- Backup Credentials: Save credentials elsewhere if you might need them again
What Happens When You Delete
- Registry Configuration Removed: The stored credentials are permanently deleted
- Applications Using Registry: Applications that reference this registry will fail to pull images on next deployment
- No Cascade Delete: Existing running applications continue to run (they already have their images)
- Cannot Be Undone: Deletion is permanent and cannot be reversed
Safe Deletion Workflow
# Step 1: List all applications to check dependencies
curl -X GET "https://api.thevenin.cloud/apps" \
-H "Authorization: Bearer tvn_your_api_token_here"
# Step 2: Verify no applications use this registry
# Check the response for any apps with containerRegistryId matching your registry
# Step 3: Delete the registry
curl -X DELETE "https://api.thevenin.cloud/{company_id}/container-registries/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer tvn_your_api_token_here"
Handling "In Use" Errors
If you receive a conflict error indicating the registry is still in use:
- Identify applications using this registry
- Update those applications to use a different registry or public images
- Wait for the updates to complete
- Retry the deletion
Example: Update Application to Remove Registry Dependency
# Update application to use public image
curl -X PATCH "https://api.thevenin.cloud/environments/{envId}/app/{appId}/image" \
-H "Authorization: Bearer tvn_your_api_token_here" \
-H "Content-Type: application/json" \
-d '{
"image": {
"name": "nginx",
"tag": "alpine"
}
}'
# Now you can delete the registry
curl -X DELETE "https://api.thevenin.cloud/{company_id}/container-registries/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer tvn_your_api_token_here"
Security Implications
- Credentials are immediately removed from the system
- No trace of passwords/tokens remains in the database
- Audit logs will still show the registry existed (for compliance)
- Applications can no longer authenticate to the private registry