API Library and Example Apps
NSwag generated library for .Net 6
API Library
The API library is a .NET 6.0 library, generated with Nswag. The library .dll may be freely copied for use within your projects.
The libary has dependencies of:
- Newtonsoft.Json 13.0.3
- Azure.Identity 1.12.0
The API definitions are included in namespaces
| Namespace | Classes |
| ContractEagleApi | The Nswag generated api calls, typed inputs and outputs and a response exception class (ContractEagleApi.ApiException) |
| ContractEagleApi.Models | "EagleApiKey" class used to generate the authentication key in the request header |
API v1.0 Example Applications
Example applications are available for VS2022 / .NET 6.0.
Console Application - Test Connection
ViewThis application is a simple example call to the api/api-info endpoint and can be used to verify connection to the Contract Eagle Connect API.
Console Application - Documents Download
ViewThis application uses the api/contracts and api/contracts/{id}/documents endpoints to download all documents for contracts meeting criteria specified on the command line.
The application includes an example of using a paged data set that would be used to iterate through a large number of contracts.
Web Application
ViewThis application includes examples demonstrating
- Dependency injection (DI) of the API Client (ContractEagleApi.ContractEagleConnectAPIClient).
- API exception handling using the ContractEagleApi.ApiException class.
Example pages are provided to:
- Test the connection to the API and return the logged in User Id and Contract Eagle Version.
- Retrieve contract details for a specified contract and provide download links for documents on the contract.
- View configuration information for Contract Types and User Defined Fields
- Perform a bulk update of Contract User Defined Field values