Models

The models documented here are part of the public API.

Concrete

Service

The Service model is aimed at RESTful services, ideally with an OpenAPI specification. It supports:

  • credentials: ZGW auth (JWT based), API key, basic auth, no auth

  • custom/self-signed server certificates

  • mutual TLS (client certificate)

  • accessing over NLX

class zgw_consumers.models.Service(id, label, oas, oas_file, uuid, api_type, api_root, client_id, secret, auth_type, header_key, header_value, nlx, user_id, user_representation, client_certificate, server_certificate, timeout)[source]
classmethod get_service(url: str) Self | None[source]
classmethod get_client(url: str, **kwargs) ZGWClient | None[source]
classmethod get_auth_header(url: str, **kwargs) dict | None[source]
build_client(**claims)[source]

Build an API client from the service configuration.

Abstract

The abstract models are used as base classes for the concrete models - you can use them to implement your own service types like SOAPService.

class zgw_consumers.models.abstract.Service(*args, **kwargs)[source]
class zgw_consumers.models.abstract.RestAPIService(*args, **kwargs)[source]