This API is used to handle requests coming from the TS Files page (https://platform.tetrascience.com/files). It can be used independently, but it expects a very specific format of the request body. It handles the expression generated by TS UI search filters and facets and translates them into EQL search query, which is then searched in the same manner as in the searchEql APi (https://developers.tetrascience.com/reference/search-files-via-elasticsearch-query), An example of a request searching for IDS files created up to a specific date and coming from specific source would be:

{
  "version": true,
  "from": 0,
  "size": 100,
  "sort": "createdAt",
  "searchTerm": "*",
  "expression": {
    "g": "AND",
    "e": [
      {
        "k": "createdAt",
        "v": "2021-04-04T09:05:00+02:00",
        "f": {
          "id": "createdAt",
          "path": "createdAt",
          "esPath": "createdAt",
          "text": "Date Created",
          "default": true,
          "schemaSlug": "default",
          "schemaId": "default",
          "type": "date"
        },
        "o": "less than"
      },
      {
        "k": "category",
        "v": "IDS",
        "f": {
          "id": "category",
          "path": "category",
          "esPath": "category",
          "text": "File Category",
          "type": "category",
          "default": true,
          "schemaSlug": "default",
          "schemaId": "default"
        },
        "o": "is"
      }
    ]
  },
  "selectedPipelineIds": [
    
  ],
  "selectedSourceTypes": [
    "dotmatics_register_compound"
  ],
  "order": "desc"
}

Some additional parameters that can be in the request body are:

  1. search_after - to support large result sets and paging (https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-search-after.html)
  2. fieldsToRetrieve - to support source filtering (https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-source-filtering.html), if not present, all fields will be retrieved
Language
Authentication
Click Try It! to start a request and see the response here!