Adding second application type

We decided to maintain 1:1 relation between a tenant and instance. In other words, every tenant has its own configuration instance.

Database changes

The tenant identifiers might be used as instance ids. Having that in mind, no database changes are necessary.

API changes

Most of the current APIs don't require any changes for the following reasons:

  1. Configuration API stays the same since there are no changes in the DB
  2. Synchronization API stays the same since every time we are synchronizing everything from the root of repository
  3. Fetching resources are flexible enough to be used with application types, need to be prefixed on the application side

In case a component requires more granular structure (ie. different brands, access template sets) the Fetching resource paths API need to be able to determine available directories for a given path. For that purpose we are adding additional, optional flag directories_only.

  • Endpoint /api/v1/resource/paths
  • Request method: GET
Parameter name Description Example
instance_id unique identifier for an application instance 7e0ba28f-bd65-46be-bea8-0a4a1b4677bc
path path to specific directory in S3 to list paths extension-resources
directories_only return only directories for the given path. defaults to false true

Example

For the following example files in S3

json [ "7e0ba28f-bd65-46be-bea8-0a4a1b4677bc/access/template-set-1/consent/consent.html", "7e0ba28f-bd65-46be-bea8-0a4a1b4677bc/access/template-set-1/messages.properties", "7e0ba28f-bd65-46be-bea8-0a4a1b4677bc/access/template-set-2/consent/consent.html", ]

And the request /api/v1/resource/paths?instance_id=7e0ba28f-bd65-46be-bea8-0a4a1b4677bc&path=access&directories_only=true, the response is:

[
    "template-set-1",
    "template-set-2"
]