Open APIs Content Pack¶
The APIsContentPack contains the connector definition for building an API catalog from applications and servers that publish their REST APIs using the OpenAPI specification through a swagger interface. It configures a single integration connector that extracts each API's specification and keeps a catalog of its operations, parameters and data structures up to date. The connector is supplied in the omag-server-platform distribution.
The content pack is found in the APIsContentPack.omarchive file in the content-packs directory of the distribution. It depends on the Core Content Pack, which supplies the technology types and the design library folders. It is built by the core-content-pack module, and the connector is in the openapi-integration-connector module.
How it works¶
The OpenAPICataloguer calls GET {serverURL}/v3/api-docs on each server it is monitoring to retrieve the server's OpenAPI specification. It creates a DeployedAPI asset for the specification, with an APIOperation for each combination of path and operation (GET, POST, PUT, DELETE), and parameter lists for each operation's request, response and headers. The beans in the specification's components/schemas section are catalogued once per API and shared by the parameters that use them.
The connector monitors the endpoint named in its connection or, when no endpoint is configured - as is the case for the connection in this pack - every catalogued Endpoint whose network address starts with http. It looks for these endpoints when it starts, and picks up new ones from the events reporting that an endpoint has been created. So cataloguing a server with an http endpoint, for example from a template, is enough to have its APIs catalogued. The connector is linked to the OMAG Server Platform technology type, so it builds a catalog of Egeria's own APIs as the platforms are catalogued.
Catalog targets
The descriptions of the connector in this pack say that it catalogs the servers "attached as catalog targets", but the connector does not read catalog targets: it works from endpoints as described above.
This pack defines no templates, governance engines or governance action processes.
Integration connectors¶
The pack defines the OpenAPIsIntegrationGroup (Egeria:IntegrationGroup:OpenAPIs), a dynamic integration group that runs in an integration daemon.
| Connector | Runs as | Purpose |
|---|---|---|
| OpenAPIIntegrationConnector | OpenAPICataloguer (user apicatnpa, refreshes every 10080 minutes - once a week) |
Catalogs the REST APIs of the servers whose endpoints support the swagger API. |
Solution blueprint¶
---
title: Components and Roles for Solution Blueprint - Open APIs Content Pack [3a07c1f8-c810-4d53-9d28-4bbca1a6ea97]
---
flowchart TD
%%{init: {"flowchart": {"htmlLabels": false}} }%%
subgraph 1 [Components and Actors]
2@{ shape: div-rect, label: "*Solution Component*
**Open API Cataloguer**"}
3@{ shape: rect, label: "*Solution Component*
**REST API Endpoint**"}
end
style 1 color:#FFFFFF, fill:#3079ab, stroke:#000000
style 2 color:#000000, fill:#DDA0DD, stroke:#000000
style 3 color:#000000, fill:#DDA0DD, stroke:#000000
click 2 "https://egeria-project.org/concepts/integration-connector/" "Click for more documentation" _blank
click 3 "https://egeria-project.org/types/0/0026-Endpoints/" "Click for more documentation" _blank
Open APIs Content Pack: Solution blueprint supporting integration connectors extracting Open API specifications to Open APIs via swagger. (Extracted from 6.3-SNAPSHOT)
Usage
The Open APIs Content Pack is loaded automatically into the active-metadata-store of Egeria's quickstart. For other deployments, load it into a metadata access store with the Runtime Manager, or add it to the server's start-up archives. Then catalog each server whose APIs you want in the catalog, with an endpoint giving its http or https network address, and the OpenAPICataloguer picks it up.
Leveraging APIs describes how to build an API catalog with Egeria.
Raise an issue or comment below