API client

The Web SDK using the API client to get REST API information from the server, which is used in two ways:

  • Getting the API / server version for compatibility checks

  • Getting the REST API URLs

Getting API information

Getting API information can be done with the GetApiInfoAsync method, which returns an IApiInfo. This object contains the server version, the minimum supported SDK version and the REST API routes.

This is almost always the first call done by the Web SDK. Since these versions and REST API URLs do not change at runtime, this result is cached. If really necessary, the result can be refreshed with the Refresh method on the API client.

Getting REST API routes

Getting the REST API routes can be done through the IApiInfo.Routes property or the GetApiRoutesAsync method on the API client. The last one is just a shortcut. This returns a read only dictionary of routes that are supported by the REST API. The SDK also uses this internally.

Do you have some feedback for us?

If you have suggestions for improving this article,