.. _configure-domains: ======== Domains ======== A *domain* is an independent storage target: its own template catalogue, its own on-disk area, and its own upstream storage server. One TOA server can host several domains side-by-side - for example one for production traffic and one for an isolated test environment. Domains are declared as a YAML list under ``toa-server.domains``. Each entry has the following sub-blocks, all documented on this page: .. code-block:: yaml toa-server: domains: - code: production # identification name: Production domain templates: # template catalogue source url: https://cmserver.customer.cz/cmserver2.xml refresh: 24h docAttributes: # per-domain attribute overrides (optional) - id: "Cislo Jednacie" serverGenerated: true storageServer: # upstream storage server url: https://damis.customer.cz/damis/upload domain: b2 A complete example is at the end of this page. At least one domain must be configured for the server to accept any import calls. Identification ============== .. code-block:: yaml - code: production name: Production domain ``code`` Stable identifier of the domain. It appears in every API path (``/import//...``) and is used as the subfolder name under ``dataRoot``. Use a short lowercase ASCII string with no spaces. The code is the contract between the running server and the existing on-disk data; **never rename a code** once imports have landed on disk - the server will look for the new subfolder and the old one becomes orphaned. To retire a domain, keep the entry until its data has been archived off the host, then remove it. ``name`` Human-readable label. Presented to users in the Outlook add-in domain picker when more than one domain is configured. May contain spaces and diacritics; quote the YAML value when it contains special characters. .. _configure-templates: Template catalogue ================== Each domain has a *template catalogue* - an XML file in the legacy cmserver format that lists the document types (``