Skip to main content

OpenAPI Specification

Generate your API client.

The OpenAPI specification (formerly known as Swagger) describes all endpoints of the dilisense APIs in a machine-readable format: the parameters, the response attributes, the example responses, the error responses and the Ongoing Monitoring webhook. It is the source of the API Reference and of the Postman collection, and it is generated from the API itself, so it always matches the current API.

Download: openapi.yaml (OpenAPI 3.1)

https://developers.dilisense.com/openapi.yaml

What you can do with it​

  • Generate client code for your programming language, so that you do not have to write the HTTP calls and the response classes yourself.
  • Import the API into tools that understand OpenAPI, e.g. API clients like Postman or Insomnia, API gateways or mock servers.
  • Validate your requests and the responses you receive in your tests.

Generating a client​

OpenAPI Generator creates clients for many languages. For example, a Java client:

npx @openapitools/openapi-generator-cli generate \
-i https://developers.dilisense.com/openapi.yaml \
-g java \
-o dilisense-client

Replace java by the generator for your language, e.g. python, typescript-fetch or csharp. The generators and their options are listed in the OpenAPI Generator documentation.

Configure the generated client to send your API key in the x-api-key header, see Authentication. The specification declares it as the ApiKeyAuth security scheme, which most generated clients expose as an API key setting.

Things to keep in mind​

  • New values. Attributes like source_type, pep_type or entity_type are strings whose possible values are listed in their description, not enumerations. New values can be added at any time, so handle values you do not know instead of failing.
  • New attributes. New attributes can be added to responses at any time, see Versioning. Configure your client to ignore unknown attributes.
  • AML Database. getConsolidatedFile and getConsolidatedDelta answer in JSON Lines, one record per line. Read the body line by line instead of letting the client parse it as one JSON document.
  • Webhook. The match notification is described as an OpenAPI webhook. It is a request that dilisense sends to your system, so generated clients do not call it; use its schema for the endpoint that receives the notifications.
  • Updates. Download the specification again and regenerate your client when you start using new endpoints or parameters.