Davix H2I describes its whole API in a machine-readable way. You can use it to generate a client in any language, to fill an API tool such as an API explorer, or to check exactly what a tool accepts. Reading it needs no API key.
OpenAPI
| Address | What you get |
|---|---|
GET /openapi.json |
The whole API as an OpenAPI 3 document |
GET /openapi/categories/{name}.json |
A smaller OpenAPI document with only the tools of one category |
GET /openapi/endpoints/{id}.json |
An OpenAPI document with a single tool |
curl https://app.h2i.davixlabs.io/openapi/endpoints/images.resize.json
Postman
The same API is available as a Postman collection, with a request for every tool. It needs no key to download. In Postman choose Import, then Link, and paste:
https://app.h2i.davixlabs.io/postman_collection.json
Then put your API key in the collection’s variables and send a request. The address always serves the collection of the current release.
The API contract
The contract is the complete description the official libraries are built from. GET /v1/contract returns it whole. Because it is large, small slices are available:
| Address | What you get |
|---|---|
/v1/contract/endpoints |
A light list of every tool: id, name, method, path, category |
/v1/contract/endpoints/{id} |
One tool in full: fields, limits, the response, errors |
/v1/contract/endpoints/{id}/fields |
Every request field of one tool; add /{name} for a single field |
/v1/contract/endpoints/{id}/examples |
Ready-made cURL, Node.js and PHP examples |
/v1/contract/endpoints/{id}/errors |
The error codes that tool can return |
/v1/contract/categories |
The categories and how many tools each has |
/v1/contract/errors |
Every error code, with its HTTP status, whether to retry, and its meaning |
/v1/contract/enums |
The shared lists of allowed values |
/v1/contract/auth |
How to sign in, the headers the API uses, the retry rules and the paths a generic client may call |
The tool id is the one used in the API reference, for example images.resize.
What the contract tells you
- Sign-in: send the key in the
X-Api-Keyheader, or asAuthorization: Bearer. A key in the address or body is refused. - Retries: only answers with the statuses 429, 503 and 504 that an error marks as retryable may be repeated. A POST is repeated only when the tool supports idempotency, and then with the same
Idempotency-Keyevery time. - Headers: the optional
Idempotency-KeyandX-Davix-Apprequest headers, and theRequest-IdandRetry-Afterresponse headers. - Every field with its type, whether it is required, its default, its allowed values and its limits.
Limits that depend on your plan are not in the contract; read them with Find formats, limits and capabilities.
Keep a client up to date
The contract has a version. The official libraries ship the contract they were built from and can also read the live one, so a newer API does not break them. See Use the Node SDK.
Checked against API contract 3.0.0.
