# REST endpoints from Azure SQL

Best practice for production apps is to use REST as the data layer to access data and not directly integrate to SQL using the SQL data provider. The SQL data provider will be squiggled in blue to indicate it is not recommended, together with a message to use [REST](/building-apps-with-jigx/data/data-providers/rest.md) instead.

1. Configure your Azure SQL database to call external REST endpoints. To learn how to call external REST endpoints from Azure SQL databases, read:
   * Microsoft Learn: [sp\_invoke\_external\_rest\_endpoint (Transact-SQL)](https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-invoke-external-rest-endpoint-transact-sql?view=azuresqldb-current\&tabs=request-headers)
   * GitHub sample: [azure-sql-db-invoke-external-rest-endpoints](https://github.com/Azure-Samples/azure-sql-db-invoke-external-rest-endpoints)
2. Now use the [REST data provider ](/building-apps-with-jigx/data/data-providers/rest.md)to configure your Jigx solution to integrate with your Azure SQL data.


---

# 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.jigx.com/building-apps-with-jigx/data/data-providers/microsoft-azure-sql/rest-endpoints-from-azure-sql.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.
