Builds API
Builds
Trigger builds, check status, and download artifacts programmatically.
List Builds
Retrieve a list of all builds for a project.
GET
/projects/:projectId/buildsRequest
curl -X GET https://api.deskforge.app/projects/proj_abc123/builds \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"builds": [
{
"id": "build_xyz789",
"projectId": "proj_abc123",
"version": "1.0.0",
"platform": "mac",
"arch": "arm64",
"status": "success",
"createdAt": "2024-01-20T10:00:00Z",
"completedAt": "2024-01-20T10:15:00Z",
"artifactUrl": "https://cdn.deskforge.app/builds/..."
}
],
"total": 1
}Get Build
Retrieve details for a specific build.
GET
/builds/:buildIdRequest
curl -X GET https://api.deskforge.app/builds/build_xyz789 \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"id": "build_xyz789",
"projectId": "proj_abc123",
"version": "1.0.0",
"platform": "mac",
"arch": "arm64",
"status": "success",
"createdAt": "2024-01-20T10:00:00Z",
"startedAt": "2024-01-20T10:01:00Z",
"completedAt": "2024-01-20T10:15:00Z",
"duration": 840,
"artifactUrl": "https://cdn.deskforge.app/builds/build_xyz789/MyApp-1.0.0-mac-arm64.dmg",
"artifactSize": 45678912,
"buildLog": "https://api.deskforge.app/builds/build_xyz789/logs"
}Trigger Build
Start a new build for a project.
POST
/projects/:projectId/buildsRequest Body
platformstring (required)Target platform: "mac", "windows", or "linux"
archstring (optional)Architecture: "x64" or "arm64" (defaults to "x64")
versionstring (optional)Semantic version (e.g., "1.0.0")
Request
curl -X POST https://api.deskforge.app/projects/proj_abc123/builds \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "mac",
"arch": "arm64",
"version": "1.0.0"
}'Response
{
"id": "build_xyz789",
"projectId": "proj_abc123",
"platform": "mac",
"arch": "arm64",
"version": "1.0.0",
"status": "queued",
"createdAt": "2024-01-20T10:00:00Z",
"message": "Build queued successfully"
}Build Status
Builds can have the following statuses:
queuedBuild is waiting to start
buildingBuild is in progress
successBuild completed successfully
failedBuild failed with errors
Download Artifact
Download the build artifact (installer/executable).
GET
/builds/:buildId/downloadRequest
curl -X GET https://api.deskforge.app/builds/build_xyz789/download \
-H "Authorization: Bearer YOUR_API_KEY" \
-L -o MyApp-1.0.0-mac-arm64.dmgNote: The download URL is also available in the artifactUrl field when getting build details.
Build Logs
Retrieve build logs for debugging.
GET
/builds/:buildId/logsRequest
curl -X GET https://api.deskforge.app/builds/build_xyz789/logs \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"buildId": "build_xyz789",
"logs": [
{
"timestamp": "2024-01-20T10:01:00Z",
"level": "info",
"message": "Starting build process..."
},
{
"timestamp": "2024-01-20T10:02:30Z",
"level": "info",
"message": "Compiling Rust code..."
},
{
"timestamp": "2024-01-20T10:15:00Z",
"level": "success",
"message": "Build completed successfully"
}
]
}