App Versions
App Versions let you manage software releases, detect outdated clients, enforce mandatory updates, and verify file integrity.
Version Properties
Each version has:
| Field | Type | Description |
|---|---|---|
version | string | Version identifier (e.g., "2.1.0") |
changelog | string | Release notes (up to 5000 chars) |
fileHashes | object | Map of filename to expected hash for integrity checks |
downloadUrl | string | URL where the update can be downloaded |
forceUpdate | boolean | Whether this update is mandatory |
current | boolean | Whether this is the current/latest version |
Managing Versions (Dashboard API)
List Versions
GET /v1/dashboard/app-versions/products/:productId
Create a Version
await fetch('/v1/dashboard/app-versions/products/PRODUCT_ID', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
version: '2.1.0',
changelog: 'Bug fixes and performance improvements',
downloadUrl: 'https://releases.example.com/v2.1.0/setup.exe',
fileHashes: {
'app.exe': 'sha256-abc123...',
'data.dll': 'sha256-def456...'
},
forceUpdate: false,
current: true // Sets this as the current version
})
});
Setting current: true automatically unsets the previous current version.
Update a Version
PATCH /v1/dashboard/app-versions/products/:productId/:versionId
Update any fields — changelog, downloadUrl, fileHashes, forceUpdate, or current.
Delete a Version
DELETE /v1/dashboard/app-versions/products/:productId/:versionId
Checking for Updates (Client API)
Your application checks for updates using the public endpoint (requires version:read permission):
const response = await fetch('https://api.geckoguard.com/v1/app-versions/check-update', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
productId: 'your-product-id',
currentVersion: '2.0.0',
fileHashes: { // Optional: for integrity checking
'app.exe': 'sha256-current...',
'data.dll': 'sha256-current...'
}
})
});
const { data } = await response.json();
Response
{
"ok": true,
"data": {
"updateAvailable": true,
"forceUpdate": false,
"currentVersion": "2.0.0",
"latestVersion": "2.1.0",
"changelog": "Bug fixes and performance improvements",
"downloadUrl": "https://releases.example.com/v2.1.0/setup.exe",
"integrityOk": true
}
}
Integrity Checking
If you pass fileHashes in the request, GeckoGuard compares them against the expected hashes for the current version. If any file's hash doesn't match:
{
"integrityOk": false,
"integrityErrors": ["app.exe"]
}
This detects tampered or corrupted files — useful for anti-cheat or security-sensitive applications.
Typical Workflow
- Build your application release
- Calculate file hashes (SHA-256)
- Create a new version via the API or dashboard with
current: true - Your application calls
check-updateon launch - If
updateAvailableis true, prompt the user (or force ifforceUpdateis true) - If
integrityOkis false, warn or block execution
Force Updates
Set forceUpdate: true on a version to indicate it's mandatory. Your application should check this flag and prevent usage until the user updates. Useful for:
- Security patches
- Breaking API changes
- Anti-cheat updates