We provide a .NET API client.
For other programming languages, we suggest to generate an API client using the Swagger API Documentation.
.NET API Client
To download and use the HIMSA supplied api client add the following URL to your nuget package sources:
https://himsacloud.pkgs.visualstudio.com/NoahESPublic/_packaging/noahestmp/nuget/v3/index.json
For more information on adding new package sources and installing nuget packages visit https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio
Handling errors
Our API libraries raise exceptions for many reasons, such as an invalid parameter, authentication errors, and network unavailability.
The client in general throws exceptions of type ApiException
for calls that reach the cloud. For some status codes an inner class is returned containing additional data, e.g. a more specific ErrorCode that won’t change over time:
ApiException<HttpStatus403Forbidden>
ApiException<HttpStatus409Conflict>
The Swagger API documentation shows which HTTP status codes are to be expected for each route.
We recommend writing code that gracefully handles all possible API exceptions, including general .NET exceptions.
Retry Policies
The client library has built-in support for Retry Policies, to enable the default retry behavior for the client library, simply set the “UsePollyPolicy” to “true”.
You can also define your own custom retry policy by using “Polly.Extensions.Http.HttpPolicyExtensions” and setting a “CustomAsyncPolicy” on the Noah API Client.