---
title: "REST - Saved Search"
canonical: "https://help.agiloft.com/space/HELP/43714188/REST+-+Saved+Search"
format: markdown
---
The EWSavedSearch operation returns details about the saved searches defined for a table. It returns the name and label of the search; the saved search identifier in the Agiloft database; and the description of the search.

- **Returns**: the name, label, ID, and description of each search defined for the specified table.
- **Supported Content-Type**:
  - For requests: application/x-www-form-urlencoded
  - For returns: application/json
- Accepts a URL with URL-encoded parameters and record data. For more information about general URL conventions, see [REST Interface](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/43715778).
- Additionally, the URL must include the logical name of a table in the KB. JSON is the only output format supported, and you must use `/.json` after EWSavedSearch in the URL.

> ⚠️ This operation supports GET and POST requests. For POST requests, the table parameter can be specified in the POST Request body instead of the URL parameter ( `?$table=<logical_name_of_the_table>`).
> ⚠️ 
> ⚠️ 
> ⚠️  It must be used with [EWLogin](https://wiki.agiloft.com/display/PROD/REST+-+Login) or OAuth 2.0 authorization. This operation is never used asynchronously.

## Example

Assume an instance of Agiloft is available on localhost, port 8080 and is called "Demo". Retrieve a list of saved searches for the Contract table, using its logical name of `contract`.

After obtaining authorization with EWLogin, the following request is issued: 

```xml
https://localhost:8080/ewws/EWSavedSearch/.json?$table=contract
```

A result similar to the following excerpt will be returned: 

```xml
{
    "success": true,
    "message": "",
    "result": [
  {
      "label": "R:Renewal date is tomorrow and Renewal Type is not one-time",
      "name":"contract|r: renewal date is tomorrow",
      "id": 265185,
      "description":""
  },
  {
      "label": "R:Contract is expiring tomorrow",
      "name": "contract|r:contract is expiring tomorrow",
      "id": 265186,
      "description":""
  }
}
```

> Macro (hide-if)
> 
> #### Related articles
> 
> > Macro (contentbylabel)