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_namestringName of the app to check
versionstringCurrent version of the app
channelstringChannel (e.g., stable, beta)
platformstringPlatform (e.g., linux, windows)
archstringArchitecture (e.g., amd64, arm64)
ownerstringName of your admin user
updaterstringUpdater 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.

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