---
title: Search
slug: search
docTags: 
createdAt: 2022-01-04T21:19:17.000Z
---

Link Enterprise provides a web service endpoint that will allow you to retrieve a subset of documents based on a search criteria.

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://localhost:82/scrud/search",
  "name": "Search ",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "cmsName",
        "type": "String",
        "description": "Name of the filenet system configured in Link Enterprise ."
      },
      {
        "kind": "required",
        "name": "whereClause",
        "type": "string",
        "description": "A where clause Used to query filenet to return a set of files depending on criteria set."
      },
      {
        "kind": "required",
        "name": "selectedCMS",
        "type": "string",
        "description": "Value should always be set to \"filenet\" to let Link Enterprise know which configured content system to search."
      },
      {
        "name": "location",
        "kind": "optional",
        "type": "string",
        "description": "filenet folder where the file exists.",
        "children": []
      },
      {
        "name": "repository",
        "kind": "required",
        "type": "string",
        "description": "Filenet repository where the file exists.",
        "children": []
      },
      {
        "name": "domain",
        "kind": "required",
        "type": "string",
        "description": "Filenet domain where the file exists.",
        "children": []
      },
      {
        "name": "selectClause",
        "kind": "required",
        "type": "string",
        "description": "filenet metadata field on which search is performed.",
        "children": []
      },
      {
        "name": "fromClause",
        "kind": "required",
        "type": "string",
        "description": "metadata Class name where the metadata fields and values are available.",
        "children": []
      },
      {
        "name": "recursive",
        "kind": "required",
        "type": "string",
        "description": "enable it to check if the file exists inside a subfolder.",
        "children": []
      },
      {
        "name": "orderBy",
        "kind": "required",
        "type": "string",
        "description": "filenet property that needs to be displayed in response. This can multiple values separated with \",\".",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "l7mAccvIkcMGyR03J3_aP",
        "code": "[\n\t{\n\t\t\"someRequiredMetadataField\": \"someRequiredMetadataValue\"\n\t}\n]",
        "language": "200"
      },
      {
        "id": "C0tj4vmrgrTV7Xq8ZvvAu",
        "code": "",
        "language": "500"
      }
    ],
    "selectedLanguageId": "l7mAccvIkcMGyR03J3_aP"
  },
  "examples": {
    "languages": [
      {
        "id": "RinXZo0WaAz3lEkUOH2ux",
        "code": "{\n\"cmsName\":\"insertProductionSystemName (located in Link Enterprise gui)\",\n\"repository\":\"filenet_repository_name\",\n\"domain\":\"filenet_Domain_Name\",\n\"selectedCMS\":\"filenet\",\n\t\"selectClause\":\"someMetadataField\",\n\t\"whereClause\":\"This INFOLDER '/someFolderName' AND This = OBJECT('someMetadataValue')\",\n\t\"fromClause\":\"metadataClassName\",\n\t\"recursive\":\"True\",\n\"orderBy\":\"someRequiredMetadataField\",\n\t\"includeSubFolders\":\"True\"\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "RinXZo0WaAz3lEkUOH2ux"
  },
  "description": "Search for all documents using a where clause. If successful will return a JSON Array with a size greater then or equal to zero with status code of 200. Otherwise status code 500 is returned. If it's a known error returns 200 with error message in response.\n",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "search",
  "legacyHash": "2I1lkUo-tBmvDr0MrlixB"
}
```
:::

