To integrate with the ecosio API, you must understand the technical requirements for making a request. These include authentication, request limits, and pagination.
Note
The ecosio API is currently only available for our partners and enterprise customers by request.
Authenticate requests
The ecosio API requires you to authenticate before you can make an API request. Obtain the following from your API connector in the Monitor:
- User ID
- User key
- App key
Every endpoint uses Basic authentication in the header. Use your user ID as the username and your user key as the password.
Provide your app key either in the X-APP-KEY header or as a query parameter.
# Header field
curl --request GET \
--url https://api.test.ecosio-hub.com:443/api/v1/securityCredentials \
--header 'X-APP-KEY: your_app_key' \
--header 'accept: application/json' \
--header 'authorization: Basic base64(user_id:user_key)'
# Query parameter
curl --request GET \
--url 'https://api.test.ecosio-hub.com:443/api/v1/securityCredentials?X-APP-KEY=your_app_key' \
--header 'accept: application/json' \
--header 'authorization: Basic base64(user_id:user_key)'Request limits
Rate limits are enforced per API connector over a rolling fiveāminute window. Your connectorās limit is set by your ecosio Integration Engineer. If you exceed this limit or five requests return errors within the same window, further requests are blocked with an HTTP 429 Too Many Requests response. If blocked, wait for the window to reset before retrying. To change your limit, contact your ecosio Integration Engineer.
Pagination
When an API response includes many results, ecosio paginates the results and returns only a subset. This process makes the response easier to handle. The response always includes the total number of results. You can determine the returned results using either the page parameter or limit and offset parameters.
Use the page parameter to determine the page number returned, where 0 is the first page.
Alternatively, you can use the limit and offset parameters. The API returns results in reverse chronological order. The newest results are returned first.
limitcontrols how many results to return, up to 30.offsetis the number of results to skip in multiples of 30.
For example:
limit=30&offset=0returns the 30 newest results.limit=30&offset=30returns results 31-60.limit=30&offset=60returns results 61-90.