Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

On this page

Keyman Cloud CDN Version API

KeymanWeb is now deployed via CDN on https://s.keyman.com. The get-version API allows you to query the latest version of the code available on the CDN.

API version 2.0

get-version is backwardly compatible with version 1.0. A plain call will return an integer return value, which is the latest stable build for KeymanWeb 2.0.. See version 1.0 for further details.

Version 2.0 adds the ability to query for a given platform and stability level.

Syntax

https://r.keymanweb.com/code/get-version/platform[/level]

Parameters

platform
The platform to query against. Possible values are: android, ios, mac, web or windows.
level (optional)
The stability level to query, default stable. Possible values are: stable, beta or alpha.

If platform is not passed, then the API falls back to version 1.0

Return value

A JSON object.


{
  "platform": platform,
  "level": level,
  "version": version-string | "error": error-message
  
}

The version-string will be a dotted version that corresponds to the versioning scheme of the product. Note that version 2.0 of this API returns the whole version string for KeymanWeb, as opposed to version 1.0 of the API which returned only the last portion (build number).

If a version is not available for a given platform and stability level, then the error-message is returned instead of the version-string.

If invalid parameters are passed in, a 500 HTTP error is returned.

API version 1.0

get-version should be called via HTTP GET to retrieve the latest build number. It will return an integer build number. In case of error, you should choose a known build number to reference (e.g. 377).

https://r.keymanweb.com/code/get-version

This build number can be embedded in the reference to the KeymanWeb code, e.g., for PHP:


$kmwbuild = @file_get_contents('https://r.keymanweb.com/code/get-version');

if($kmwbuild === FALSE || !is_numeric($kmwbuild)) {
  // If the get-version API fails, we'll use the latest known version
  $kmwbuild = 408;
}
echo "<script src='https://s.keyman.com/kmw/engine/$kmwbuild/keymanweb.js'></script>";

Version Information and History

1.0 - Released 19 January 2015

1.0 - Documentation updated 19 February 2017 to change secure site references to https://s.keyman.com/

2.0 - Released 23 June 2017

See Also

KeymanWeb Developer Home

Feedback

If you have any feedback or questions, just fill in this form to get in touch.