--- title: "REST API call to get incident Ids for network discovery based on custom filter (Using S-Expression)" slug: "rest-api-call-to-get-incident-ids-for-network-discovery-based-on-custom-filter" tags: ["Product Usage", "DLP 11.12.x"] updated: 2026-09-09T08:08:14Z published: 2026-09-09T08:08:14Z canonical: "docs.trellix.com/rest-api-call-to-get-incident-ids-for-network-discovery-based-on-custom-filter" --- > ## 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. # REST API call to get incident Ids for network discovery based on custom filter (Using S-Expression) Use this REST API call to get a list of network discovery incidents based on the custom filters using S-Expression. ### GET request URL `https://<epo_server_name:port>/rest/dlp/incidents/list/networkDiscovery/custom` Where, `epo_server_name:port` is the server IP address and port number. ### Request Parameters | Parameter name | Description | Required | Values | | --- | --- | --- | --- | | **Authorization** | User credentials for ePO - On-prem. | Optional | | | **sexp** | S-Expression taken from query xml generated from query and report section. | Optional | String | **Create an S-Expression using these steps:** 1. Log on to ePO - On-prem. 2. Go to **Queries & Reports** and click **New Query**. 3. Select the **Database Type** as **DLP**, and under **Result Types**, select **DLP Data at Rest (Network) Incidents** and click **Next**. 4. Select an appropriate value in the **Chart** section and click **Next**. 5. Select an appropriate option in the **Columns** section and click **Next**. 6. Add the required filter criteria in the **Filter** section and click **Save**. 7. Enter the **Query Name** and **Query Description** for your S-Expression and click **Save.** 8. Select your S-Expression and click **Export Queries** from **Actions**. The S-Expression Query.xml file gets downloaded. 9. Open the Query.xml file and copy S-Expression after sexp under tag. For example, `<condition-uri>query:condition?orion.condition.sexp=%28+where+%28+gt+UDLP_EPD_Incidents.IncidentId+20++%29+%29</condition-uri>` The S-Expression is passed to the request body: `{` `"sexp" : "%28+where+%28+gt+UDLP_EPD_Incidents.IncidentId+20++%29+%29"` `}` **Sample GET request URL** `https://172.27.108.53:8443/rest/dlp/incidents/list/networkDiscovery/custom` `{` `"sexp":"%28+where+%28+gt+UDLP_DiscoveryIncident.IncidentId+40++%29+%29"` `}` **Sample cURL command** `curl -k -v -X GET 'https://172.27.108.53:8443/rest/dlp/incidents/list/networkDiscovery/custom' -u '<user>:<password>'` `--data-raw '{` `"sexp":"%28+where+%28+gt+UDLP_DiscoveryIncident.IncidentId+40++%29+%29"` `}'` ### Response parameters These parameters are returned for the API request. The response to this API call returns a list of network discovery incident Ids. | Element | Description | Data type | | --- | --- | --- | | **Incident Id list** | List of Incident IDs generated for data-in-use or data-in-motion is displayed. Also, shows the reason for failure, if there is a failure. | List of strings | ### Sample request ``` {    "sexp":"%28+where+%28+gt+UDLP_DiscoveryIncident.IncidentId+40++%29+%29" } ``` **Sample response** ``` [    "41",    "42",    "43",    "44" ] ``` ### Status and error codes List of HTTP status codes returned for the query. | Code | Description | | --- | --- | | **200 OK** | Successfully received Item Ids and name satisfying conditions in request. | | **400 Bad Request** | Returns a bad request if the payload is empty | | **404 Not Found** | Incorrect ePO - On-prem URL. | | **500 Internal Server Error** | An error on the server side that failed the request. See the ePO - On-prem `orion.log` file for more details about the error. |