--- title: "REST API call to get incident IDs for data-in-use or data-in-motion based on custom filter (using S-Expression)" slug: "rest-api-call-to-get-incident-ids-for-data-in-use-or-data-in-motion-1" 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-data-in-use-or-data-in-motion-1" --- > ## 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 data-in-use or data-in-motion based on custom filter (using S-Expression) Use this REST API call to get a list of data-in-use or data-in-motion incidents based on the custom filters using S-Expression. ### GET request URL `https://<epo_server_name:port>/rest/dlp/incidents/list/useOrMotion/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 In-use/motion 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 needed 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 the S-Expression after sexp under tag. For example, `<condition-uri>query:condition?orion.condition.sexp=%28+where+%28+udlp_eq_status_op+UDLP_IncidentsQueriesView.StatusId+7++%29+%29</condition-uri>` The S-Expression is passed to the request body: `{` `"sexp" : "%28+where+%28+udlp_eq_status_op+UDLP_IncidentsQueriesView.StatusId+7++%29+%29"` `}` **Sample GET request URL** `https://172.27.108.53:8443/rest/dlp/incidents/list/useOrMotion/custom` `{` `"sexp":"%28+where+%28+udlp_eq_status_op+UDLP_IncidentsQueriesView.StatusId+7++%29+%29"` `}` **Sample cURL command** `curl -k -v -X GET 'https://172.27.108.53:8443/rest/dlp/incidents/list/useOrMotion/custom' -u '<user>:<password>'--data-raw '` `"sexp":"%28+where+%28+udlp_eq_status_op+UDLP_IncidentsQueriesView.StatusId+7++%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+udlp_eq_status_op+UDLP_IncidentsQueriesView.StatusId+7++%29+%29" } ``` **Sample response** ``` [    "3",    "24",    "65" ] ``` ### 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. |