Download Agent Artifacts
Agent artifact downloads are redirect endpoints. They do not return JSON bodies. Instead, they return 302 Found with a Location header pointing to the actual installer artifact.
Use these endpoints when the consumer needs a stable API-owned download URL while allowing the backend to change the underlying storage location or issue signed URLs later.
Endpoints
| Endpoint | Method | Description |
|---|---|---|
| Download Latest Artifact | GET | Redirect to the artifact for the current release in a channel |
| Download Versioned Artifact | GET | Redirect to the artifact for a specific published version |
Download Latest Artifact
GET /agent-releases/latest/download
Redirects to the installer artifact for the current release in the requested channel.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
channel | string | stable | Release stream to resolve: stable, latest |
platform | string | - | Target platform: windows, macos |
arch | string | - | Required when platform=macos. Allowed values: arm64, x86_64 |
Example Requests
curl -I "https://api.example.com/v2/agent-releases/latest/download?channel=stable&platform=windows" \
-H "Authorization: Bearer YOUR_API_TOKEN"
curl -I "https://api.example.com/v2/agent-releases/latest/download?channel=stable&platform=macos&arch=arm64" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Example Response
HTTP/1.1 302 Found
Location: https://downloads.example.com/agent/macos/arm64/latest/ScalepadAgent.pkg
Download Versioned Artifact
GET /agent-releases/{version}/download
Redirects to the installer artifact for the requested published version.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
version | string | Published release version |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
platform | string | - | Target platform: windows, macos |
arch | string | - | Required when platform=macos. Allowed values: arm64, x86_64 |
Example Requests
curl -I "https://api.example.com/v2/agent-releases/1.8.3/download?platform=windows" \
-H "Authorization: Bearer YOUR_API_TOKEN"
curl -I "https://api.example.com/v2/agent-releases/1.8.3/download?platform=macos&arch=x86_64" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Example Response
HTTP/1.1 302 Found
Location: https://downloads.example.com/agent/windows/1.8.3/ScalepadAgent-1.8.3.msi
Error Responses
| Status | Description |
|---|---|
| 400 | Invalid query parameters or invalid platform / arch combination |
| 401 | Authentication required |
| 403 | Insufficient permissions |
| 404 | Agent release or artifact not found |
| 500 | Server error |
Example Error Response
{
"error": {
"code": "not_found",
"message": "Agent artifact not found",
"details": {
"version": "1.8.3",
"platform": "macos",
"arch": "x86_64"
}
}
}
Related Endpoints
- Get Latest Agent Release - Resolve the current release for a channel
- Get Agent Release - Fetch one release by version
- List Agent Releases - Browse release history