<h1>POST api/reportserver/v3/data/sql/generate</h1>
<div>
<p>
Generates an SQL query from the specified query designer state.
</p>

<h2>Request Information</h2>

<h3>URI Parameters</h3>
<p>None.</p>

<h3>Body Parameters</h3>

<p></p>

<a href="/dotnet-docs/rest-api/v3/generatesqlinfo">GenerateSqlInfo</a>

<table class="help-page-table">
<thead>
<tr><th>Name</th><th>Description</th><th>Type</th><th>Additional information</th></tr>
</thead>
<tbody>
<tr>
<td class="parameter-name">ProviderName</td>
<td class="parameter-documentation">
<p>No documentation available.</p>
</td>
<td class="parameter-type">
string

</td>
<td class="parameter-annotations">
<p>None.</p>
</td>
</tr>
<tr>
<td class="parameter-name">ConnectionString</td>
<td class="parameter-documentation">
<p>No documentation available.</p>
</td>
<td class="parameter-type">
string

</td>
<td class="parameter-annotations">
<p>None.</p>
</td>
</tr>
<tr>
<td class="parameter-name">QueryDesignerState</td>
<td class="parameter-documentation">
<p>No documentation available.</p>
</td>
<td class="parameter-type">
string

</td>
<td class="parameter-annotations">
<p>None.</p>
</td>
</tr>
</tbody>
</table>
<h3>Request body formats</h3>
<div>
<h4 class="sample-header">application/json, text/json, application/*+json</h4>
<div class="sample-content">

```json
{
  "ProviderName": "System.Data.SqlClient",
  "ConnectionString": "Data Source=.;Initial Catalog=Northwind;Integrated Security=True",
  "QueryDesignerState": "{\"query\":\"SELECT * FROM Orders\"}"
}
```

</div>
</div>

<h2>Response Information</h2>

<h3>Resource Description</h3>

<p></p>

string

<h3>Response Formats</h3>
<div>
<h4 class="sample-header">application/json</h4>
<div class="sample-content">

```
"SELECT * FROM Orders"
```

</div>
</div>
</div>
