Service Provider

In the WireBootstrap framework, a Data Connector uses a JavaScript class called a service provider to make calls to a data service. The service provider is used with a DataSource to be able to make calls to a specific type of data service.

The WireBootstrap Table Service Provider is used with a data source to make calls to the WireBootstrap Query Service for executing queries against relational databases.

Provider Key

Use the sqlprovider key to use this service provider with a data source.

const service = new"sql", {

Note, early versions of the service provider used table as the servicer provider key.


The following creates a data source using the table service provider. The table service configuration options are specified in the Provider property.

const Northwind = new"sql", {
    ServiceRoot: "http://localhost:1895",
    Provider: {
        ServiceId: "qs_ebi-appdev2",
        SecretKey: "WireBootstrap$",
        ConnectionId: "northwind_ebi-appdev2"


The service provider prepares the call to the query service based on the query and the configuration options passed in as part of the call.

Calls to the query service use a Basic authentication scheme. An Authorization header is set using a hash of the ServiceId and SecretKey provider properties. These are used to validate each request by the query service.

Authorization: Basic cXNfZWJpLWFwcGRldjI6V2lyZUJvb3RzdHJhcCQ=


The Content-Type header is set to text/plain when making calls to the query service.

Content-Type: text/html


The ConnectionId is passed to the query service as a query parameter in the URL.

POST: http://localhost:1895/table/exec?connection=northwind_ebi-appdev2


Service providers are able to tell consumers about the functionality they support through an allow property. Below is a list of the functionality that the table service provider supports.

Last updated