API Explorer

Dynamic Endpoint Manage

If you want to create endpoints from Swagger / Open API specification files, use Dynamic Endpoints.

We use the term "Dynamic" because these Endpoints persist in the OBP database and are served from real time generated Scala code.

This contrasts to the "Static" endpoints (see the Static glossary item) which are served from static Scala code.

Dynamic endpoints can be changed in real-time and do not require an OBP instance restart.

When you POST a swagger file, all the endpoints defined in the swagger file, will be created in this OBP instance.

You can create a set of endpoints in three different modes:

  1. If the host field in the Swagger file is set to "dynamic_entity", then you should link the swagger JSON fields to Dynamic Entity fields. To do this use the Endpoint Mapping endpoints.

  2. If the host field in the Swagger file is set to "obp_mock", the Dynamic Endpoints created will return example responses defined in the swagger file.

  3. If you need to link the responses to external resource, use the Method Routing endpoints.

Dynamic Endpoints can be created at the System level (bank_id is null) or Bank / Space level (bank_id is NOT null). You might want to create Bank level Dynamic Entities in order to grant automated roles based on user email domain. See the OBP-API sample.props.template

Upon the successful creation of each Dynamic Endpoint, OBP will automatically:

*Create a Guard with a named Role on the Endpoint to protect it from unauthorised users. *Grant you an Entitlement to the required Role so you can call the endpoint and pass its Guard.

Served URL

Dynamic Endpoints are served under a dedicated path prefix, not under /obp/vX.Y.Z/:

/obp/dynamic-endpoint + optional dynamic_endpoints_url_prefix (from props) + the path declared in the uploaded Swagger file.

For example, if your Swagger declares /fashion-brand-list/{brandId} and dynamic_endpoints_url_prefix is unset (the default), the endpoint will be available at:

/obp/dynamic-endpoint/fashion-brand-list/{brandId}

For Bank / Space level Dynamic Endpoints, OBP automatically prepends /banks/BANK_ID to each path in the Swagger file at creation time. So a Swagger path of /fashion-brand-list created for bank gh.29.uk is served at:

/obp/dynamic-endpoint/banks/gh.29.uk/fashion-brand-list

(plus dynamic_endpoints_url_prefix if set.)

Note: the /obp/vX.Y.Z/management/banks/BANK_ID/dynamic-endpoints routes are only the administrative CRUD endpoints for creating and managing Dynamic Endpoints — they are not the served URLs of the endpoints themselves.

The following videos are available:

* [Introduction to Dynamic Endpoints](https://vimeo.com/426235612)
* [Features of Dynamic Endpoints](https://vimeo.com/444133309)