Hectre API Overview
Introduction
The Hectre API is a service that exposes all data collected using an HTTP request.
With the Hectre API, you can:
- Request all Quality Control records through the QC endpoint
- Request all Harvest records through the Harvest endpoint
Before you begin
This document is intended for system administrators and software developers who want to request their data within Hectre through one of the provided Hectre API endpoints.
Authentication / Authorization
For the moment we only support Client Credentials OAuth2 Flow. Our current Identity-as-a-service provider is Okta.com.
Please reach out to your Hectre contact to get your credentials.
OpenAPI Definition
Accessible at `/swagger/1/swagger.json`.
How to use it?
You can use the OpenAPI Definition file with multiple tools to browse it, improve your developer experience, and generate client libraries:
- Import the swagger.json file into the free
Postman downloadable client to generate the documentation and use it to test the endpoint.
- Import the swagger.json file into the free
Swagger Editor to generate graphical documentation and generate client libraries in multiple programming languages.
How can I connect my service to this API?
As described at `/swagger/1/swagger.json`, this API uses the OAuth2 Client Credentials Flow.
To be granted an access token, please use the Client_Id, Client_Secret provided by Hectre.
Among other configurations, you must request the scope `read_quality_controls` as specified at `/swagger/1/swagger.json`.
Can I use the Postman downloadable client to test the API manually?
Yes! We wrote a small guide to help you set it up.
Can I use Swagger Editor or the online Postman application to test the API manually?
You cannot test the endpoints from your browser as most of them don't allow you to override the User-Agent header and Okta rejects the User-Agents from browsers for the Client Credential Flow (it's a feature, not a bug).