Skip to main content
Version: Draft

API Consumption Patterns

info

The patterns documented on this page reflect a small number of patterns implemented by Health NZ. The expectation is that this page will grow as more standards contributors get involved.

Direct

The API Service is hosted and published by and from the primary environment in which the Digital Services Hub capability is implemented.

PlantUML diagram describing the direct consumption pattern

Detailed description of figure

The diagram illustrates direct consumption pattern. The Health Sector Participant interacts with the API Gateway to initiate API interactions. The Health NZ Operations team manages the API Management and Developer Portal components. The API Gateway communicates with the API Service Implementation component to process API requests. The Health NZ API Developer interacts with the Developer Portal to access API documentation and tools.

Proxy

Publishes an API Service hosted and published by an External Sector Partner, using API Management owned and managed by them. The Digital Services Hub API Management capability republishes the API Service and routes (proxies) incoming traffic to the provider service through the Digital Services Hub governance capability.

PlantUML diagram describing the proxy consumption pattern

Detailed description of figure

The diagram depicts the proxy consumption pattern, where a health sector participant, such as a hospital or clinic, connects to Health NZ's API Gateway to access healthcare services. Health NZ's API Management component manages the APIs and Developer Portal, which provides documentation and support for developers. Health NZ Operations and developers can also access the API Gateway directly. Sector partners, such as private healthcare providers, connect to their own API Gateways, which in turn connect to their API Service Implementations. Sector partner application developers can access their own API Gateways, and sector partner operations staff can access their API Service Implementations. The diagram also shows the flow of data between the different components and actors. For example, the Health Sector Participant sends API requests to Health NZ's API Gateway, which then routes the requests to the appropriate API Service Implementations. Health NZ's API Management component monitors and manages the API traffic, and the Developer Portal provides documentation and support for developers.