> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Execute NQL

Execute an NQL query and return the results.

<Note>
  External Documentation

  To learn more, visit the [Nexthink documentation](https://developer.nexthink.com/docs/api/nql-api/operations/create-a-api-v-2-nql-execute).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter  | Description                                                                                                                                                                                                                        |
  | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Parameters | Parameters to replace within the NQL query in order to compose a final query for execution.<br /><br />For Example:<br /><br /><pre><code>\{<br />  "alert\_name": "my\_alert",<br />  "alert\_status": "Open"<br />}</code></pre> |
  | Query ID   | The ID of the query to execute.                                                                                                                                                                                                    |
</div>

## Example Output

```json theme={"dark"}
{
	"queryId": "string",
	"executedQuery": "string",
	"rows": -9007199254740991,
	"executionDateTime": "2023-03-07T15:56:02",
	"data": [
		{
			"key1": "my-device",
			"key2": "device-info"
		}
	]
}
```

## Workflow Library Example

[Execute Nql with Nexthink and Send Results Via Email](https://library.blinkops.com/workflows/execute-nql-with-nexthink-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/execute-nql-with-nexthink-and-send-results-via-email/canvas" />
</div>
