Returns a short-lived presigned S3 URL that the user's browser uses to stream the backup object directly from storage. The API never proxies the object body itself.
The backend does not perform a redirect because the frontend
sends its JWT on the initial request — browsers would drop the
Authorization header when following a 3xx redirect, so the
frontend receives the URL in the JSON response and navigates to
it explicitly.
The presigned URL's lifetime is controlled by the
BACKUP_PRESIGN_TTL environment variable (default 5 minutes).
Access is gated by the same RBAC rules as GET /systems/{id}.
GET
/systems/{id}/backups/{backup_id}/download
curl \
--request GET 'https://collect.your-domain.com/api/systems/sys_123456789/backups/01934fab-bc33-7890-a1b2-c3d4e5f6a7b8.tar.gz/download' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"code": 200,
"message": "download URL issued",
"data": {
"download_url": "https://example.com",
"expires_in_seconds": 300
}
}
Response examples (401)
{
"code": 401,
"message": "invalid token",
"data": {}
}
Response examples (403)
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}
Response examples (404)
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}