# Pipeline Search History Archive

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Pipeline Search History Archive"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/api/v1/workspaces/{workspace_name}/pipelines/{pipeline_name}/search_history_archive"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Retrieves pipeline's complete search history sorted by the most recent items first.

Pipeline's search history is only available 30 minutes after completing a search request.
To retrieve recent search history, use the
[Pipeline Search History](https://docs.cloud.deepset.ai/reference/pipeline_search_history_api_v1_workspaces__workspace_name__pipelines__pipeline_name__search_history_get)
endpoint.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"description":"Name of the pipeline.","in":"path","name":"pipeline_name","required":true,"schema":{"description":"Name of the pipeline.","title":"Pipeline Name","type":"string"}},{"description":"Type the name of the workspace.","in":"path","name":"workspace_name","required":true,"schema":{"description":"Type the name of the workspace.","title":"Workspace Name","type":"string"}},{"description":"Groups sequential records by the specified field so that records sharing the same value appear consecutively. Supported values: `QUERY`, `PIPELINE`, `SESSION_ID`, `USER`, `FEEDBACK_SCORE`, `FEEDBACK_RATING`, `BOOKMARKED`, `API_KEY`, `ANSWER`.","in":"query","name":"group_by","required":false,"schema":{"anyOf":[{"enum":["QUERY","PIPELINE","SESSION_ID","USER","FEEDBACK_SCORE","FEEDBACK_RATING","BOOKMARKED","API_KEY","ANSWER"],"title":"SearchHistoryGroupByField","type":"string"},{"type":"null"}],"description":"Groups sequential records by the specified field so that records sharing the same value appear consecutively. Supported values: `QUERY`, `PIPELINE`, `SESSION_ID`, `USER`, `FEEDBACK_SCORE`, `FEEDBACK_RATING`, `BOOKMARKED`, `API_KEY`, `ANSWER`.","title":"Group By"}},{"description":"The number of entries to display. Leaving this field empty keeps the default, and max 10 results are returned.","in":"query","name":"limit","required":false,"schema":{"default":10,"description":"The number of entries to display. Leaving this field empty keeps the default, and max 10 results are returned.","maximum":1000,"title":"Limit","type":"integer"}},{"description":"Opaque pagination cursor from the previous response. Use this for reliable pagination with any sort order. If provided, 'after' and 'after_id' are ignored.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque pagination cursor from the previous response. Use this for reliable pagination with any sort order. If provided, 'after' and 'after_id' are ignored.","title":"Cursor"}},{"description":"Enter the URL-encoded datetime in ISO format if you want to see all entries after this datetime.","in":"query","name":"after","required":false,"schema":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Enter the URL-encoded datetime in ISO format if you want to see all entries after this datetime.","title":"After"}},{"description":"The OpenSearch document ID from the last item on the previous page. Used as a tie-breaker when multiple entries have the same timestamp. This parameter is optional but recommended for consistent pagination when entries share timestamps.","in":"query","name":"after_id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The OpenSearch document ID from the last item on the previous page. Used as a tie-breaker when multiple entries have the same timestamp. This parameter is optional but recommended for consistent pagination when entries share timestamps.","title":"After Id"}},{"description":"The OData filter you want to use to in your query. It supports exact match and `AND` operations. For example, to filter for a metadata `category:news` and `published_date` greater than or equal to January 1 2025, here's what the URL could look like: 'url = \"https://api.cloud.deepset.ai/api/v1/workspaces/production/files?limit=10&filter=category eq 'news' and published_date ge '2025-01-01' \"'. OData filters only work with cursor-based pagination (leave the `page_number` field blank to enable it).To learn more about the OData filter syntax, see: [Querying Data](https://www.odata.org/getting-started/basic-tutorial/#queryData).","in":"query","name":"filter","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The OData filter you want to use to in your query. It supports exact match and `AND` operations. For example, to filter for a metadata `category:news` and `published_date` greater than or equal to January 1 2025, here's what the URL could look like: 'url = \"https://api.cloud.deepset.ai/api/v1/workspaces/production/files?limit=10&filter=category eq 'news' and published_date ge '2025-01-01' \"'. OData filters only work with cursor-based pagination (leave the `page_number` field blank to enable it).To learn more about the OData filter syntax, see: [Querying Data](https://www.odata.org/getting-started/basic-tutorial/#queryData).","title":"Filter"}},{"description":"The name of the entity you want to sort by.","in":"query","name":"field","required":false,"schema":{"default":"created_at","description":"The name of the entity you want to sort by.","enum":["created_at","query","duration","feedbacks/score"],"title":"Field","type":"string"}},{"description":"Choose how you want to sort the results.","in":"query","name":"order","required":false,"schema":{"default":"DESC","description":"Choose how you want to sort the results.","enum":["ASC","DESC"],"title":"Order","type":"string"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"api_key":{"anyOf":[{"properties":{"id":{"description":"The unique identifier of the API key with which the request was made.","format":"uuid","title":"API Key ID","type":"string"},"name":{"default":"","description":"Name of the API key.","title":"API Key Name","type":"string"}},"required":["id"],"title":"APIKey","type":"object"},{"type":"null"}]},"client_source_path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The origin of the request (e.g. BUILDER, PLAYGROUND, PROMPT-EXPLORER, SYSTEM).","title":"Client Source Path"},"duration":{"description":"Duration of the query in milliseconds.","title":"Query Duration","type":"number"},"feedback":{"anyOf":[{"description":"Simple feedback model for embedding in search history responses.","properties":{"api_token_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"title":"Api Token Id"},"bookmarked":{"default":false,"title":"Bookmarked","type":"boolean"},"comment":{"default":"","title":"Comment","type":"string"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"created_by_user_id":{"format":"uuid","title":"Created By User Id","type":"string"},"feedback_id":{"format":"uuid","title":"Feedback Id","type":"string"},"result_id":{"format":"uuid","title":"Result Id","type":"string"},"score":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Score"},"tags":{"items":{"format":"uuid","type":"string"},"title":"Tags","type":"array"}},"required":["feedback_id","created_by_user_id"],"title":"SimpleFeedback","type":"object"},{"type":"null"}]},"pipeline":{"properties":{"name":{"description":"Name of the pipeline.","title":"Pipeline Name","type":"string"}},"required":["name"],"title":"PipelineName","type":"object"},"pipeline_version_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"The version of pipeline used to execute the query.","title":"Pipeline Version ID"},"request":{"description":"Query request.","title":"Query Request","additionalProperties":true,"properties":{"added_files":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Added Files"},"files":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Files"},"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"}},"type":"object"},"response":{"description":"Response list from Haystack open source.","items":{"properties":{"documents":{"description":"Documents that contain the search result.","items":{"additionalProperties":true,"type":"object"},"title":"Search Result Documents","type":"array"},"rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The rank of the search result. A lower value means more relevant result.","title":"Search Result Rank"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"List of search results.","title":"Search Results"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The score of the search result.","title":"Search Result Score"},"search_result_history_id":{"description":"List of search results.","format":"uuid","title":"Search Results","type":"string"},"type":{"description":"The type of the search result. This can be either 'document' or 'answer'.","title":"Search Result Type","type":"integer"}},"required":["search_result_history_id","type","documents"],"title":"SearchResultHistoryEntry","type":"object"},"title":"Response List","type":"array"},"search_history_id":{"description":"Unique identifier of the search.","format":"uuid","title":"Search history ID","type":"string"},"session_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"The ID of the search session you want to use for chat.","title":"Search Session ID"},"time":{"description":"Timestamp when the query was sent.","format":"date-time","title":"Query Time","type":"string"},"user":{"properties":{"family_name":{"description":"Family name of a user.","title":"Family name","type":"string"},"given_name":{"description":"Given name of a user.","title":"Given name","type":"string"},"user_id":{"description":"Unique identifier of a user.","format":"uuid","title":"User ID","type":"string"}},"required":["given_name","family_name","user_id"],"title":"Oauth User","type":"object"}},"required":["search_history_id","request","response","time","duration","user","pipeline"],"title":"Search History","type":"object"},"title":"Data","type":"array"},"has_more":{"description":"Indicates if there are more results to show.","title":"Has more results","type":"boolean"},"total":{"description":"The total number of results matching your query.","title":"Total number of results","type":"integer"}},"required":["data","has_more","total"],"title":"PaginatedResult[SearchHistory]","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}}},"description":"Validation Error"}}}
>
  
</StatusCodes>
