Simple Search

Applies to: Repository API v2.
See Repository API v1.

The simple search API can run a search query in the repository and return the results of the search immediately in the response of the call. See this guide to view the differences between simple search and search.

In the following simple search, we want to find entries with a specific value in the Purchase Order ID field.

POST https://api.laserfiche.com/repository/v2/Repositories/{repositoryId}/SimpleSearches
{
"searchCommand":"{[]:[Purchase Order ID]=\"789\"}"
}

The response will include a listing of the entries that matched the search query. See the following sample response for the above search:

{
  "@odata.context": "https://api.laserfiche.com/repository/v2/$metadata#Collection(Laserfiche.Repository.Entry)",
  "value":[
    {
      "@odata.type": "#Laserfiche.Repository.SearchResultEntry",
      "id": 1234,
      "isContainer": false,
      "isLeaf": true,
      "name": "PurchaseOrder",
      "parentId": 1,
      "fullPath": null,
      "folderPath": null,
      "creator": "Guide User",
      "creationTime": "2023-09-01T19:11:22Z",
      "lastModifiedTime": "2023-09-11T07:37:38Z",
      "entryType": "Document",
      "templateName": null,
      "templateId": 0,
      "volumeName": "DEFAULTVOLUME",
      "rowNumber": 1
    }
  ]
}

Additional Information

Simple searches are limited to a maximum of 100 results. An HTTP 206 Partial Content status code indicates that the search results are truncated. A non-truncated search response will include an HTTP 200 OK status code.

Simple searches will automatically time out if the search operation exceeds 15 seconds. A single session, distinguished by a valid OAuth access token, can only have a limited number of searches running at one time. This limit does not differentiate between search and simple search.