> ## 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).

## Parameters

| Parameter | Description |
| - | - |
| Parameters | Parameters to replace within the NQL query in order to compose a final query for execution. For Example: <pre>`{  "alert_name": "my_alert",  "alert_status": "Open"}`</pre> |
| Query ID | The ID of the query to execute. |

## 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)

![Workflow Library](https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max\&auto=format\&n=ojHYuDeYX5FWuN8a\&q=85\&s=b8af968e71438a9499c3223c9bd29fb2)

Preview this Workflow on desktop

[https://library.blinkops.com/workflows/execute-nql-with-nexthink-and-send-results-via-email/canvas](https://library.blinkops.com/workflows/execute-nql-with-nexthink-and-send-results-via-email/canvas)
