API Overview
Working with the Contract Eagle API
API endpoints and Swagger Documentation
Access to the API and Swagger documentation is via your organisation's instance of Contract Eagle Connect.
The Connect URL will be of the form:
- https://[myorganisation]-connect.contracteagle.com
where [myorganisation] is the prefix to your Contract Eagle application.
eg: If you access the Contract Eagle application from https://acme.contracteagle.com, Contract Eagle Connect would be accessed from https://acme-connect.contracteagle.com
Swagger Documentation
Swagger documentation is available from the "/swagger/index.html" path of your organisation's instance of Contract Eagle Connect.
eg: https://acme-connect.contracteagle.com/swagger/index.html
REST API Endpoints
The Swagger documentation for your organisation will generate your organisation's specific REST API Endpoints, or the published path can simply be appended to your organisation's Connect URL.
eg: The Contract Documents endpoint for Acme would be https://acme-connect.contracteagle.com/api/contract-documents
Headers and Authentication
The REST API is versioned and the default version will always be the latest version of the API.
In order to specify the version of the API being used, add the following request header on all REST API requests
| Header | Value |
| api-version | 1.0 |
eg: HttpClient.DefaultRequestHeaders.Add("api-version", "1.0")
To specify the version in the path instead, add "/v1.0" after the api segment
eg: https://acme-connect.contracteagle.com/api/v1.0/contracts
Response Codes, Errors and Warnings
Below you will find links to
- The standard Http Response codes that may be returned from the API with example scenarios
- Example errors and warnings that may be returned from the API
Testing Access
A product such as Postman provides a simple means of connecting to and testing API access.
The api/api-info endpoint is a good place to start - if successfully authenticated, it will return a JSON object with the Contract Eagle version information and the Id of the user authenticated to the API.
The user Id should match the Id displayed in the Contract Eagle Web Application corresponding to the API keys used.
api-info using Client Key/Secret
Create a GET request to the api/api-info endpoint and set the Auth-Type to "API Key"
Enter the Key name as "Eagle-Api-Key"
Enter the value as the Client Key/Secret JSON
Requesting a JWT Token for a Client Key/Secret
Create a POST request to the api/request-token endpoint.
Add an authorization header with key "Eagle-Api-Key" and in the value paste in the Client Key/Secret JSON
Run the request - if successful it will return the token in the response.
api-info using a JWT Token
Create a GET request to the api/api-info endpoint and set the Auth-Type to "Bearer Token"
Copy the bearer token returned by the above request and paste into the Token field.
Run the request - if successful, the Contract Eagle version information and user Id will be returned in the JSON response.