Skip to main content

Check Latest Version of application

Check if there is a newer version of a specific application available. The response format can be customized based on the updater type specified.

Endpoint​

GET /checkVersion?app_name=<app_name>&version=<version>&owner=admin

Query Parameters​

ParameterTypeRequiredDescription
app_namestring✅Name of the app to check
versionstring✅Current version of the app
channelstring❌Channel (e.g., stable, beta)
platformstring❌Platform (e.g., linux, windows)
archstring❌Architecture (e.g., amd64, arm64)
ownerstring✅Name of your admin user
updaterstring❌Updater type to use for response format (manual, squirrel_darwin, squirrel_windows, electron-builder)
info

If no updater parameter is specified, the API will use the default updater configured for the platform.

Headers​

HeaderValueRequired
X-Download-Tokenfnd_… download token of the app and channelPrivate apps in strict mode
AuthorizationBearer <jwt_token> of the owning admin, or of a team user with the download permission and access to the app and channelAlternative to X-Download-Token
X-Device-IDDevice identifier❌

Public apps and private apps in unlisted mode need no credential. For a private app in strict mode, a request without a valid credential gets exactly the same answer as an app that does not exist, 400 Bad Request:

{
"error": "app_name not found in apps_meta collection"
}

Example Requests​

Standard Request (Uses Platform Default Updater)​

curl -X GET --location 'http://localhost:9000/checkVersion?app_name=secondapp&version=0.0.1&channel=stable&platform=linux&arch=amd64&owner=admin'

Request with Specific Updater​

curl -X GET --location 'http://localhost:9000/checkVersion?app_name=secondapp&version=0.0.1&channel=stable&platform=linux&arch=amd64&owner=admin&updater=electron-builder'

Response Formats​

Manual Updater (Default)​

Standard FaynoSync response format:

{
"update_available": true,
"update_url_deb": "https://<bucket_name>.s3.amazonaws.com/secondapp/stable/linux/amd64/secondapp-0.0.2.deb",
"update_url_rpm": "https://<bucket_name>.s3.amazonaws.com/secondapp/stable/linux/amd64/secondapp-0.0.2.rpm",
"changelog": "### Changelog\n\n- Added new feature X\n- Fixed bug Y",
"critical": true,
"is_intermediate_required": true
}

Squirrel Darwin (macOS)​

Optimized for Squirrel macOS updates:

{
"update_available": true,
"url": "https://<bucket_name>.s3.amazonaws.com/secondapp/stable/darwin/amd64/secondapp-0.0.2.zip",
"changelog": "### Changelog\n\n- Added new feature X\n- Fixed bug Y",
"critical": true,
"is_intermediate_required": true
}

Electron Builder​

Returns YAML content for electron-builder:

version: 0.0.2
files:
- url: secondapp-0.0.2.exe
sha512: <sha512_hash>
size: <file_size>
path: secondapp-0.0.2.exe
sha512: <sha512_hash>
releaseDate: '2024-01-15T10:00:00.000Z'

Response Fields​

Standard Response Fields​

FieldTypeDescription
update_availablebooleanIndicates whether a newer version is available
update_url_debstringDirect download URL for the .deb package
update_url_rpmstringDirect download URL for the .rpm package
urlstringDirect download URL (Squirrel Darwin format)
changelogstringChangelog content for the latest version (in markdown format)
criticalbooleanIndicates if this is a critical update that should be applied immediately
is_intermediate_requiredbooleanIndicates if an intermediate version must be installed before latest version

Updater-Specific Differences​

Updater TypeKey Differences
manualStandard response with update_url_zip, update_url_deb, update_url_rpm
squirrel_darwinUses url field instead of update_url_zip, only ZIP archives
squirrel_windowsStandard format but optimized for Windows Squirrel
electron-builderReturns YAML content instead of JSON

Notes​

  • Default Updater: If no updater parameter is specified, the platform's default updater is used
  • Response Format: The response format varies based on the updater type to ensure compatibility
  • Platform Configuration: Updaters must be configured for the platform before they can be used
  • Version Comparison: Version comparison is done automatically by the API
  • Critical Updates: Critical updates should be prioritized and applied as soon as possible
  • Intermediate Versions: Intermediate versions may be required for major version jumps or breaking changes
  • Download URLs: URLs are provided in the format expected by each updater type
  • Private Apps: Download URLs of a private app point to /download, which applies the same download_mode check. Responses of private apps are never cached in Redis or published to the CDN