> For the complete documentation index, see [llms.txt](https://docs.truedat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.truedat.io/v8.8/api-integrations/data-catalog-data-lineage-and-grants-apis/user-search-filters.md).

# User Search Filters

## List current user's search filters

> Retrieves search filters that belong to the current authenticated user.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.8.2"},"paths":{"/api/user_search_filters/me":{"get":{"description":"Retrieves search filters that belong to the current authenticated user.","operationId":"TdDdWeb.UserSearchFilterController.index_by_user","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSearchFilterListResponse"}}},"description":"User search filter list"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List current user's search filters","tags":["User Search Filters"]}}},"components":{"schemas":{"UserSearchFilterListResponse":{"additionalProperties":false,"properties":{"data":{"description":"List of user search filters","items":{"$ref":"#/components/schemas/UserSearchFilterResource"},"type":"array"}},"required":["data"],"title":"UserSearchFilterListResponse","type":"object"},"UserSearchFilterResource":{"additionalProperties":false,"properties":{"filters":{"additionalProperties":true,"nullable":true,"type":"object"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_global":{"default":false,"nullable":true,"type":"boolean"},"name":{"type":"string"},"scope":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"user_id":{"type":"integer"}},"required":["id","name","user_id","scope","is_global"],"title":"UserSearchFilterResource","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Get a user search filter

> Retrieves a specific user search filter by ID.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.8.2"},"paths":{"/api/user_search_filters/{id}":{"get":{"description":"Retrieves a specific user search filter by ID.","operationId":"TdDdWeb.UserSearchFilterController.show","parameters":[{"description":"User search filter ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSearchFilterResponse"}}},"description":"User search filter details"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdNotFoundErrorResponse"}}},"description":"Not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get a user search filter","tags":["User Search Filters"]}}},"components":{"schemas":{"UserSearchFilterResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/UserSearchFilterResource"}},"required":["data"],"title":"UserSearchFilterResponse","type":"object"},"UserSearchFilterResource":{"additionalProperties":false,"properties":{"filters":{"additionalProperties":true,"nullable":true,"type":"object"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_global":{"default":false,"nullable":true,"type":"boolean"},"name":{"type":"string"},"scope":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"user_id":{"type":"integer"}},"required":["id","name","user_id","scope","is_global"],"title":"UserSearchFilterResource","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdNotFoundErrorResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdNotFoundErrorResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Delete a user search filter

> Deletes the specified user search filter.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.8.2"},"paths":{"/api/user_search_filters/{id}":{"delete":{"description":"Deletes the specified user search filter.","operationId":"TdDdWeb.UserSearchFilterController.delete","parameters":[{"description":"User search filter ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"User search filter deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdNotFoundErrorResponse"}}},"description":"Not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Delete a user search filter","tags":["User Search Filters"]}}},"components":{"schemas":{"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdNotFoundErrorResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdNotFoundErrorResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## List user search filters

> Retrieves all user search filters available to the current user.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.8.2"},"paths":{"/api/user_search_filters":{"get":{"description":"Retrieves all user search filters available to the current user.","operationId":"TdDdWeb.UserSearchFilterController.index","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSearchFilterListResponse"}}},"description":"User search filter list"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List user search filters","tags":["User Search Filters"]}}},"components":{"schemas":{"UserSearchFilterListResponse":{"additionalProperties":false,"properties":{"data":{"description":"List of user search filters","items":{"$ref":"#/components/schemas/UserSearchFilterResource"},"type":"array"}},"required":["data"],"title":"UserSearchFilterListResponse","type":"object"},"UserSearchFilterResource":{"additionalProperties":false,"properties":{"filters":{"additionalProperties":true,"nullable":true,"type":"object"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_global":{"default":false,"nullable":true,"type":"boolean"},"name":{"type":"string"},"scope":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"user_id":{"type":"integer"}},"required":["id","name","user_id","scope","is_global"],"title":"UserSearchFilterResource","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Create a user search filter

> Creates a new user search filter for the current user.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.8.2"},"paths":{"/api/user_search_filters":{"post":{"description":"Creates a new user search filter for the current user.","operationId":"TdDdWeb.UserSearchFilterController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSearchFilterCreateRequest"}}},"description":"User search filter payload","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSearchFilterResponse"}}},"description":"User search filter created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create a user search filter","tags":["User Search Filters"]}}},"components":{"schemas":{"UserSearchFilterCreateRequest":{"additionalProperties":false,"properties":{"user_search_filter":{"additionalProperties":false,"properties":{"filters":{"additionalProperties":true,"description":"Filter criteria","nullable":true,"type":"object"},"is_global":{"default":false,"description":"Whether the filter is global (admin only)","nullable":true,"type":"boolean"},"name":{"description":"Filter name","type":"string"},"scope":{"description":"Scope (e.g., 'rule', 'rule_implementation', 'data_structure')","type":"string"}},"required":["name","scope"],"type":"object"}},"required":["user_search_filter"],"title":"UserSearchFilterCreateRequest","type":"object"},"UserSearchFilterResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/UserSearchFilterResource"}},"required":["data"],"title":"UserSearchFilterResponse","type":"object"},"UserSearchFilterResource":{"additionalProperties":false,"properties":{"filters":{"additionalProperties":true,"nullable":true,"type":"object"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_global":{"default":false,"nullable":true,"type":"boolean"},"name":{"type":"string"},"scope":{"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"user_id":{"type":"integer"}},"required":["id","name","user_id","scope","is_global"],"title":"UserSearchFilterResource","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdUnprocessableEntityObjectResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnprocessableEntityObjectResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```
