Color scheme: Riviera
You are here: start » en » Documentation » Data integration and data access » WKL Database Gateway » Reference » Connection properties of a provider (reference)

Connection properties of a provider (reference)

A provider describes the settings of its connection as individual properties. An administration program shows input fields for them instead of a free-text field for the connection string. The provider itself puts the connection string together and checks it.

Syntax

Read the description:

GET /admin/v1/odata/Providers?$filter=Usable eq true and Latest eq true
GET /admin/v1/odata/ProviderProperties?$filter=Provider eq 'sqlserver' and Language eq 'en'&$orderby=Scope,Position

Create a data source from properties; ConnectionProperties is a JSON object as text:

POST /admin/v1/odata/DataSources
Content-Type: application/json
 
{ "Name": "fachdaten", "Provider": "sqlserver",
  "ConnectionProperties": "{\"Data Source\":\"srv01\",\"Initial Catalog\":\"Fachdaten\",\"Integrated Security\":\"true\"}" }

When read, DataSources returns the same form, without secret values:

{ "Name": "fachdaten", "Provider": "sqlserver", "Connection": null,
  "ConnectionProperties": "{\"Data Source\":\"srv01\",\"Initial Catalog\":\"Fachdaten\",\"Integrated Security\":\"true\"}" }

Parameters

Set Providers

Read-only. One row per installed provider package, usable or not.

FieldContent
Id, PackageVersionKey: the provider's identifier (sqlserver) and the package version
Name, VendorDisplay name and vendor as stated by the package
AliasesFurther names, comma-separated (shipped packages only, for example mssql)
ContractMin, ContractBelowRange of the provider contract the package is built for
BuiltInShipped with the service (true) or installed by the operator
Usable, ProblemWhether the package passes its checks; otherwise the reason
LatestThe highest usable version of this identifier: the version a data source without ProviderVersion gets
DescribesConnectionWhether the provider describes its connection properties; otherwise only the string (Connection) remains

Set ProviderProperties

Read-only. For each usable package that describes its connection: one row per property, scope, and language.

FieldContent
Provider, PackageVersion, Scope, Name, LanguageKey. Scope: Connection (the connection) or Options (provider settings, ProviderOptions). Language: two-letter code; every property exists at least in en
PositionOrder within the scope, starting at 1
TypeText, Integer (digits only), Boolean (true/false), or Choice
Label, DescriptionCaption and explanation in this language; the English one if the provider lacks the language
RequiredWhether a connection needs the value
DefaultValue that applies when none is given, as text; empty if none applies
ChoicesFor Choice: the allowed values as a JSON list, for example ["True","False","Strict"]
SecretA secret (password): written, never returned
CategoryGroup for display, for example Server, Security, Advanced

Reading ProviderProperties loads every usable package that isn't loaded yet: the description is the provider's code.

Fields of DataSources

FieldMeaning
ProviderThe provider's identifier; empty: Dialect applies
ProviderVersionFixed package version; empty: the highest usable one
ProviderOptionsProvider settings as a JSON object of texts, for example {"Modus":"schnell"}; empty when the provider knows none
ConnectionConnection string as text; write-only, reads as empty
ConnectionPropertiesThe connection as a JSON object of property and value, as text. Written: the provider puts the string together from it. Read: the properties of the stored connection without secret values

Provider, ProviderVersion, and ProviderOptions mean the same as in the file; see configuration.

Properties of sqlserver

The shipped SQL Server provider describes these properties; it knows no ProviderOptions. The names are the keywords the SQL Server driver writes into a string. Defaults and allowed values come from the driver itself; ProviderProperties is authoritative.

NameTypeCategoryRequiredMeaning
Data SourceTextServeryesServer, with an instance (srv01\prod) or a port (srv01,1433)
Initial CatalogTextServeryesDatabase the service offers under the alias
Failover PartnerTextServerMirror server for database mirroring
Multi Subnet FailoverBooleanServerAvailability group across several subnets
Application IntentChoiceServerReadWrite (default) or ReadOnly (readable replica)
Integrated SecurityBooleanSecurityWindows authentication under the service account
AuthenticationChoiceSecurityMethod for Microsoft Entra ID, for example ActiveDirectoryIntegrated; empty for a SQL login or Windows authentication
User IDTextSecuritySQL login
PasswordTextSecurityPassword of the SQL login; secret
EncryptChoiceSecurityTrue (default), False, or Strict
Trust Server CertificateBooleanSecurityAccept the server's certificate without checking it; test environments only
Host Name In CertificateTextSecurityExpected name in the certificate
Application NameTextAdvancedName of the connection on the server; Wkl.Data.Gateway when not set
Connect TimeoutIntegerAdvancedSeconds until an attempt to connect is given up (default 15)
Command TimeoutIntegerAdvancedDefault in seconds for statements; the service's limits take precedence

Not offered are settings the service manages itself (Pooling, pool sizes, MultipleActiveResultSets). A string written by hand may contain them; they then don't appear as properties.

Remarks

Who builds the string. The data source's provider—Provider, otherwise Dialect—puts the string together from the properties and checks it. The administration program needs no knowledge of a database's keywords. The service seals the string like one sent as text.

Writing. The service rejects Connection and ConnectionProperties together with 400, and so a provider without a description (DescribesConnection = false). Values may be JSON strings, numbers, or true/false; null or an empty string removes the property. An unknown property, a missing required value, or a value of the wrong type returns 400; the message names the property, never its value.

Password on update. If a secret property is missing from ConnectionProperties, the service keeps its stored value: whoever changes only the server doesn't type the password again. An explicitly empty value ("Password": "") removes it. All other properties replace the stored connection as a whole; whatever is missing then applies with its default.

Reading. ConnectionProperties holds the set properties of the stored connection, never a secret one. The field stays empty when the provider has no description or can't take apart a string written by hand; the connection can then be changed through Connection. The field isn't part of the row version; the version follows the sealed string.

Change log. ConnectionProperties appears there only as “neu gesetzt” (newly set), like Connection.

Example

An administration program fills the provider selection and a property grid:

  1. Read Providers with Usable eq true and Latest eq true and fill the selection (Name, value Id).
  2. For the chosen Id, read ProviderProperties with Scope eq 'Connection' and the program's own language, order by Position, group by Category; Choice as a selection, Boolean as a switch, Secret as a password field.
  3. When editing, read the data source's ConnectionProperties and fill the fields; the password field stays empty.
  4. Save: send only the filled fields as a JSON object in ConnectionProperties, not the empty password field—the stored password then stays.
  5. Check with `test-connection`.

See also

en/wiki/data-conectivity/database-gateway/reference/connection-properties.txt · Last modified: by Wolfgang van der Stille