# API Deployments

The SQL Connector works through a service that you place between Power Omni and your SQL Server instance.

This Service is responsible for:

* Expose the procedures of a database as an OpenAPI schema
* Provide HTTP endpoints for executing these procedures
* Convert the execution results into a format acceptable by Power Omni (including database errors)

The development and maintenance of this connector is the responsibility of Power Tuning, but it is you, or your team, who decides how and where it will run.

It is a Node.Js application, available through a Linux docker image, which makes it easy for you to deploy it in virtually any environment, cloud or on-premises.

This section provides some guides on how to perform the deployments, so that you have guidance. Use the side navigation and choose the method that is best for you

### About the Docker Image

The integration service API is made available in a docker image built by the Power Tuning team. Regardless of how you deploy it, the same environment variables are available for configuration. See the table below:

<table><thead><tr><th width="171">Variable</th><th>Description</th></tr></thead><tbody><tr><td><code>SQL_CONNECTION</code></td><td>Connection string to the SQL Server instance</td></tr><tr><td><code>PUBLIC_URLS</code></td><td>Public URL through which the API will be accessible. The service will generate the OpenAPI schema using this URL and it is the one that Omni will use when invoking the procedure</td></tr><tr><td><code>KEYS</code></td><td>List of ApiKeys separated by a ";". Use random and strong values. To reinforce security, other services that generate encrypted apikeys can be used</td></tr><tr><td><code>CUSTOM_AUTHSCHEME</code></td><td>String with a yaml specifying an alternative Auth Scheme that will be used when generating the OpenAPI Schema. Use only if you need to use another type of authentication other than ApiKey. It is an advanced configuration to be done with the support of Power Tuning</td></tr><tr><td><code>AUTO_RELOAD</code></td><td>Changes the AutoReload, specifying the frequency, in milliseconds, that the API will load the modified procedures. Based on this time, the API frequently queries the database identifying procedures that were modified and recreating the schema.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.poweromni.ai/en/integrations/sql-server/api-deploy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
