--- title: "Run query with ID number: best practice" slug: "run-query-with-id-number-best-practice" tags: ["Product Usage", "ePolicy Orchestrator – On-prem", "ePO 5.10.x", "ePO 5.10.0"] updated: 2026-09-07T17:47:05Z published: 2026-09-07T17:47:05Z canonical: "docs.trellix.com/run-query-with-id-number-best-practice" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Run query with ID number: best practice The quickest way to run a query using a web URL is to use the preconfigured query ID, then use the output from the web browser in other scripts or in an email. You must have administrator permissions to run the query. Running web API queries is quicker than running a query using the ePO - On-prem user interface. Plus, you can use their output in scripts and redirect the output and port it for further processing. For example, to access the query **New Agents Added to ePO per Week** using the ePO - On-prem user interface, select **Menu** → **Reports** → **Queries & Reports**, select the **New Agents Added to ePO per Week** query, and click **Actions** → **Run**. As an alternative, you can paste, `https://<localHost>:8443/remote/core.executeQuery?queryId=34` in a browser address bar to display this URL output. This web URL output is similar to the query output with the user interface, plus it allows you to use the output in another script or manipulate it as needed. 1. Use your browser to log on to your ePO - On-prem server. 2. To get a list of the preconfigured queries and their ID numbers, type this URL into the browser address bar, then press **Enter**. `https://<localHost>:8443/remote/core.listQueries?:output=terse` 3. From the `listQueries` command output, find the query to run. In this example, the `queryId=34` argument is appended to the web URL `https://<localHost>/remote/core.executeQuery?queryId=<number>` to run the **New Agents Added to ePO per Week** query.