> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siftstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# saved_searches

> sift/saved_searches/v1/saved_searches.proto

<a name="sift_saved_searches_v1_saved_searches-proto" />

<a name="sift_saved_searches_v1_saved_searches-proto-services" />

## Services

*RPC methods exposed by this API.*

### SavedSearchService

| Method                   | Request                                                             | Response                                                              | Description                                                                                 |
| :----------------------- | :------------------------------------------------------------------ | :-------------------------------------------------------------------- | :------------------------------------------------------------------------------------------ |
| GetSavedSearch           | [GetSavedSearchRequest](#getsavedsearchrequest)                     | [GetSavedSearchResponse](#getsavedsearchresponse)                     | Retrieve a saved search.                                                                    |
| CreateSavedSearch        | [CreateSavedSearchRequest](#createsavedsearchrequest)               | [CreateSavedSearchResponse](#createsavedsearchresponse)               | Create a saved search.                                                                      |
| ListSavedSearches        | [ListSavedSearchesRequest](#listsavedsearchesrequest)               | [ListSavedSearchesResponse](#listsavedsearchesresponse)               | List saved searches.                                                                        |
| UpdateSavedSearch        | [UpdateSavedSearchRequest](#updatesavedsearchrequest)               | [UpdateSavedSearchResponse](#updatesavedsearchresponse)               | Updates an existing saved search using using the list of fields specified in `update_mask`. |
| DeleteSavedSearch        | [DeleteSavedSearchRequest](#deletesavedsearchrequest)               | [DeleteSavedSearchResponse](#deletesavedsearchresponse)               | Delete a saved search.                                                                      |
| BatchDeleteSavedSearches | [BatchDeleteSavedSearchesRequest](#batchdeletesavedsearchesrequest) | [BatchDeleteSavedSearchesResponse](#batchdeletesavedsearchesresponse) | Batch deletes saved searches.                                                               |

<a name="sift_saved_searches_v1_saved_searches-proto-messages" />

## Messages

*Data models used across requests/responses.*

### BatchDeleteSavedSearchesRequest

The request for a call to `SavedSearchService_BatchDeleteSavedSearches` to delete saved searches.

| Field              | Type   | Label    | Description                      |
| :----------------- | :----- | :------- | :------------------------------- |
| saved\_search\_ids | string | repeated | Limit of 1000 searches per batch |

### BatchDeleteSavedSearchesResponse

The response of a call to `SavedSearchService_BatchDeleteSavedSearches`.

*This message has no fields.*

### CreateSavedSearchRequest

The request for a call to `SavedSearchService_CreateSavedSearch` to create a saved search.

| Field            | Type                                            | Label | Description                                                                 |
| :--------------- | :---------------------------------------------- | :---- | :-------------------------------------------------------------------------- |
| name             | string                                          |       |                                                                             |
| properties       | [SavedSearchProperties](#savedsearchproperties) |       |                                                                             |
| organization\_id | string                                          |       | This field is only required if your user belongs to multiple organizations. |

### CreateSavedSearchResponse

The response for a call to `SavedSearchService_CreateSavedResponse`.

| Field         | Type                        | Label | Description |
| :------------ | :-------------------------- | :---- | :---------- |
| saved\_search | [SavedSearch](#savedsearch) |       |             |

### DeleteSavedSearchRequest

The request for a call to `SavedSearchService_DeleteSavedSearch` to delete a saved search.

| Field             | Type   | Label | Description |
| :---------------- | :----- | :---- | :---------- |
| saved\_search\_id | string |       |             |

### DeleteSavedSearchResponse

The response of a call to `SavedSearchService_DeleteSavedSearch`.

*This message has no fields.*

### GetSavedSearchRequest

The request for a call to `SavedSearchService_GetSavedSearch` to retrieve a saved search;

| Field             | Type   | Label | Description |
| :---------------- | :----- | :---- | :---------- |
| saved\_search\_id | string |       |             |

### GetSavedSearchResponse

The response of a call to `SavedSearchService_GetSavedSearch`.

| Field         | Type                        | Label | Description |
| :------------ | :-------------------------- | :---- | :---------- |
| saved\_search | [SavedSearch](#savedsearch) |       |             |

### ListSavedSearchesRequest

The request for a call to `SavedSearchService_ListSavedSearches` to retrieve saved searches.

| Field            | Type   | Label | Description                                                                                                                                                                                                                                                                                                                                                                                                                              |
| :--------------- | :----- | :---- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| page\_size       | uint32 |       | The maximum number of saved searches to return. The service may return fewer than this value. If unspecified, at most 50 saved searches will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. Optional.                                                                                                                                                                                                |
| page\_token      | string |       | A page token, received from a previous `ListSavedSearches` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSavedSearches` must match the call that provided the page token. Optional.                                                                                                                                                                                         |
| filter           | string |       | A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string. Available fields to filter by are 'name', 'saved\_search\_id', and 'overview\_mode'. For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions).                                                                                            |
| organization\_id | string |       | This field is only required if your user belongs to multiple organizations.                                                                                                                                                                                                                                                                                                                                                              |
| order\_by        | string |       | How to order the retrieved saved searches. Formatted as a comma-separated string i.e. "FIELD\_NAME\[ desc],...". Available fields to order\_by are `name`, `created_date`, and `modified_date`. If left empty, items are ordered by `created_date` in ascending order (oldest-first). For more information about the format of this field, read [this](https://google.aip.dev/132#ordering) Example: "created\_date desc,modified\_date" |

### ListSavedSearchesResponse

The response of a call to `SavedSearchService_ListSavedSearchesResponse`.

| Field             | Type                        | Label    | Description |
| :---------------- | :-------------------------- | :------- | :---------- |
| saved\_searches   | [SavedSearch](#savedsearch) | repeated |             |
| next\_page\_token | string                      |          |             |

### SavedSearch

| Field                  | Type                                            | Label | Description |
| :--------------------- | :---------------------------------------------- | :---- | :---------- |
| saved\_search\_id      | string                                          |       |             |
| organization\_id       | string                                          |       |             |
| name                   | string                                          |       |             |
| properties             | [SavedSearchProperties](#savedsearchproperties) |       |             |
| created\_by\_user\_id  | string                                          |       |             |
| modified\_by\_user\_id | string                                          |       |             |
| created\_date          | google.protobuf.Timestamp                       |       |             |
| modified\_date         | google.protobuf.Timestamp                       |       |             |

### SavedSearchFilterItem

| Field | Type   | Label | Description |
| :---- | :----- | :---- | :---------- |
| id    | string |       |             |
| name  | string |       |             |

### SavedSearchMetadataItem

| Field                       | Type   | Label | Description |
| :-------------------------- | :----- | :---- | :---------- |
| key                         | string |       |             |
| oneof value. string\_value  | string |       |             |
| oneof value. number\_value  | double |       |             |
| oneof value. boolean\_value | bool   |       |             |

### SavedSearchProperties

| Field                   | Type                                                | Label    | Description                                                                                                                                                                                                          |
| :---------------------- | :-------------------------------------------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| overview\_mode          | string                                              |          |                                                                                                                                                                                                                      |
| search\_term            | string                                              | optional |                                                                                                                                                                                                                      |
| from\_date\_time        | google.protobuf.Timestamp                           | optional |                                                                                                                                                                                                                      |
| to\_date\_time          | google.protobuf.Timestamp                           | optional |                                                                                                                                                                                                                      |
| asset\_items            | [SavedSearchFilterItem](#savedsearchfilteritem)     | repeated |                                                                                                                                                                                                                      |
| user\_items             | [SavedSearchFilterItem](#savedsearchfilteritem)     | repeated |                                                                                                                                                                                                                      |
| tag\_items              | [SavedSearchFilterItem](#savedsearchfilteritem)     | repeated |                                                                                                                                                                                                                      |
| annotation\_items       | [SavedSearchFilterItem](#savedsearchfilteritem)     | repeated |                                                                                                                                                                                                                      |
| run\_items              | [SavedSearchFilterItem](#savedsearchfilteritem)     | repeated |                                                                                                                                                                                                                      |
| report\_template\_items | [SavedSearchFilterItem](#savedsearchfilteritem)     | repeated | Superseded by `template_items`, which also carries canvases. Saved searches written before that field exists only populate this one, and reads hydrate `template_items` from it with `kind` set to "reportTemplate". |
| show\_advanced\_filters | bool                                                | optional |                                                                                                                                                                                                                      |
| include\_archived       | bool                                                | optional |                                                                                                                                                                                                                      |
| order\_by               | string                                              | optional |                                                                                                                                                                                                                      |
| metadata\_items         | [SavedSearchMetadataItem](#savedsearchmetadataitem) | repeated |                                                                                                                                                                                                                      |
| duration                | string                                              | optional |                                                                                                                                                                                                                      |
| template\_items         | [SavedSearchTemplateItem](#savedsearchtemplateitem) | repeated | Reports search: report templates and canvases are stored together in a single filter.                                                                                                                                |
| report\_type            | string                                              | optional | Reports search: restricts results to a single report kind. One of "RULE\_EVALUATION" or "CANVAS", matching the `report_type` filter values.                                                                          |

### SavedSearchTemplateItem

A report template or canvas selected in the reports Template filter. Distinct
from `SavedSearchFilterItem`, which is shared by filters that have no kind.

| Field | Type   | Label | Description                          |
| :---- | :----- | :---- | :----------------------------------- |
| id    | string |       |                                      |
| name  | string |       |                                      |
| kind  | string |       | One of "reportTemplate" or "canvas". |

### UpdateSavedSearchRequest

The request for a call to `SavedSearchService_UpdateSavedSearch` to update a saved search.

| Field         | Type                                                    | Label | Description                                                                                       |
| :------------ | :------------------------------------------------------ | :---- | :------------------------------------------------------------------------------------------------ |
| saved\_search | [SavedSearch](#savedsearch)                             |       | The saved search to update.                                                                       |
| update\_mask  | [google.protobuf.FieldMask](#google-protobuf-fieldmask) |       | The list of fields to be updated. The fields available to be updated are `name` and `properties`. |

### UpdateSavedSearchResponse

The response of a call to `SavedSearchService_UpdateSavedSearch`.

| Field         | Type                        | Label | Description |
| :------------ | :-------------------------- | :---- | :---------- |
| saved\_search | [SavedSearch](#savedsearch) |       |             |

<a name="sift_saved_searches_v1_saved_searches-proto-enums" />

## Enums

*Allowed constant values used in message fields.*
