Compatibility
This article explains the difference between the WebApiClient
and the WebClient
, how compatibility works, which SDK version to select and how the SDK checks compatibility at runtime.
Initial release
There have been two Web SDKs:
- The
Stylelabs.M.Sdk.WebApiClient
: the old, now obsolete Web SDK. Supported from version 2.9.0 - 3.2.0. - The
Stylelabs.M.Sdk.WebClient
: the new Web SDK, support from 3.0.0 and later.
The new SDK (WebClient
) can only be used on Sitecore Content Hub 3.0.0 and later.
Backwards compatibility
An older Web SDK version can be used on a newer Sitecore Content Hub. For example, the Web SDK 3.0.0 can perfectly work with Sitecore Content Hub 3.2.0.
Backwards compatibility is a priority and older SDK versions will be supported as long as possible.
Forward compatibility
Forward compatibility is not supported. For example, it is not possible to use the Web SDK 3.2.0 on Sitecore Content Hub 3.0.0.
Choosing the right web SDK version
First and foremost, migrate from the WebApiClient
to the WebClient
as soon as possible.
If the Web SDK is used with only one specific version of the Sitecore Content Hub, then choose the Web SDK with the same major (first number) and minor version (second number), but with the latest patch version (third number).
If the Web SDK is used on multiple Sitecore Content Hubs with different versions, then choose the Web SDK where the version matches the major and minor version of the oldest Sitecore Content Hub, but again the highest patch version.
Compatibility checks
On the first requests to the Sitecore Content Hub, the Web SDK will check compatibility with the server. Under the following conditions, the Web SDK will throw a System.NotSupportedException
:
- When the Sitecore Content Hub version is lower than 3.0.0
- When the major version of the Web SDK is higher than the major version of the Sitecore Content Hub.
- When the major versions are equal, but the minor version of the Web SDK is higher than the minor version of the Sitecore Content Hub
It is possible to disable this check, but it is highly discouraged. To disable it, set the DisableCompatibilityChecks
to true
on the ApiClient
.