---
title: Search
slug: rC4C-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/folders 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 sharepoint system configured in Link Enterprise ."
      },
      {
        "kind": "required",
        "name": "whereClause",
        "type": "string",
        "description": "A where clause Used to query sharepoint to return a set of files/folders depending on criteria set."
      },
      {
        "kind": "required",
        "name": "selectedCMS",
        "type": "string",
        "description": "Value should always be set to \"sp\" to let Link Enterprise know which configured content system to search."
      },
      {
        "name": "repository",
        "kind": "required",
        "type": "string",
        "description": "Sharepoint repository Id. It consists of sharepoint domain name and root site name separated with \"/sites/\" or \":/teams/\"",
        "children": []
      },
      {
        "name": "location",
        "kind": "required",
        "type": "string",
        "description": "Sharepoint Document Library location (including any sub site present). Each field is separated with \"/\".",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "l7mAccvIkcMGyR03J3_aP",
        "code": "[\n\t{\n\t\t\"Modified\": \"2022-10-14T19:46:38Z\",\n\t\t\"LinkFilename\": \"demo.txt\",\n\t\t\"ContentType\": \"Document\",\n\t\t\"Edit\": \"0\",\n\t\t\"FileLeafRef\": \"demo.txt\",\n\t\t\"_ComplianceTag\": \"\",\n\t\t\"Created\": \"2022-10-14T19:44:57Z\",\n\t\t\"_DisplayName\": \"\",\n\t\t\"_UIVersionString\": \"1.0\",\n\t\t\"DocIcon\": \"txt\",\n\t\t\"ParentVersionString\": \"\",\n\t\t\"LinkFilenameNoMenu\": \"demo.txt\",\n\t\t\"id\": \"01CHITTN72QLKGJ5B3RREABCDEF3\",\n\t\t\"SapLinkTrigger\": \"False\",\n\t\t\"ParentLeafName\": \"\",\n\t\t\"_ComplianceTagWrittenTime\": \"\",\n\t\t\"_CommentCount\": \"\",\n\t\t\"@odata.etag\": \"\\\"64d482fa-3bf4-498c-b628-f9fbRbf33efb,2\\\"\",\n\t\t\"Title\": \"202\",\n\t\t\"_CheckinComment\": \"\",\n\t\t\"FileSizeDisplay\": \"33456\",\n\t\t\"_ComplianceTagUserId\": \"\",\n\t\t\"ItemChildCount\": \"0\",\n\t\t\"Author\": \"\",\n\t\t\"_ComplianceFlags\": \"\",\n\t\t\"Id\": \"01CHITTN72QLKGJ5B3RREABCDEF3\",\n\t\t\"Editor\": \"\",\n\t\t\"_LikeCount\": \"\",\n\t\t\"FolderChildCount\": \"0\"\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\":\"<domain_name>/sites/<rootSiteName>\",\n\"whereClause\":\"insertMetaDataColumnName eq 'insertMetaDataValue'\",\n\"location\":\"/<subsiteName>/<documentLibraryName>\",\n\"selectedCMS\":\"sp\"\n}\n\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"
}
```
:::

