Scopes

Scopes can be used in Setup Specs to define different database sources in the Web-UI and to switch on runtime between these database sources. All rest service calls have therefore a dedicated scope header parameter to define the database source by setting the scope id in the header.

Example: Setting the Scope-ID in the header

To set the Scope-ID in the header for the GET URL /setup/v1/{tenant-id}/areas, you can use the following example. This URL doesn’t require any parameters besides the tenant-id, but if the Scope-ID is set in the header, the data will be fetched from the corresponding database instead of the default database defined in the helm chart.

Request

GET /setup/v1/\{tenant-id}/areas HTTP/1.1
Host: example.com
Scope-ID: 0947D655-AFD7-43DD-A92E-BFCAAC8845DF
httprequest

Example with cURL

curl -X GET "https://example.com/setup/v1/1991B3AD-A83D-4893-B7E5-ABF2575800B8/areas" -H "Scope-ID: 0947D655-AFD7-43DD-A92E-BFCAAC8845DF"
bash