API version
The SOH API version can be programmatically determined in two ways.
- The JSON document that is returned by the vault listing or vault status query indicates the protocol name and version.
- Each response that is returned by the server includes the header X-SOH-Version. The API version is set as the value of this header.
- Parse the version number into a tuple of X.Y form.
- If X is not equal to the expected major version number, assume no compatibility and cancel.
- If Y is less than the expected version minor version number, assume that the feature is not present and either cancel or fall back to alternative behavior.