Search
1 min
Link Enterprise provides a web service endpoint that will allow you to retrieve a subset of documents/folders based on a search criteria. Link Enterprise supports two types of search within box. One using metadata filters and another using metadata queries (real-time).
To enable or disable metadata queries (real-time search) you can do so within the Link Enterprise configurator interface.
We are providing below an example of both a metadata filter example (with search query disabled in the configurator), and a metadata query example (with search query enabled in the configurator).
Search (query)
Search for all documents using a where clause. If succesfull 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.
Precondition: insertName.searchQueryEnabled=true (located in inifile)
POST
https://localhost:82/scrud/search
{
"cmsName":"insertProductionSystemName (located in Link Enterprise gui)",
"whereClause":"{\"from\":\"enterprise_InsertEnterpriseId.insertMetaDataTemplate\",\"query\":\"insertMetaDataColumnName = :value\",\"query_params\":{\"value\":\"insertMetaDataValue\"},\"ancestor_folder_id\":\"insertFolderId\"}",
"selectedCMS":"box"
}
Search (mdfilters)
Search for all files/folders using a where clause. If succesfull 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.
POST
https://localhost:82/scrud/search
{
"cmsName":"insertProductionSystemName (located in Link Enterprise gui)",
"whereClause":"mdfilters=[{\"templateKey\":\"insertMetaDataTemplateName\",\"scope\":\"enterprise\",\"filters\":{\"insertMetaDataColumnName\":\"insertMetaDataValue\"}}]",
"selectedCMS":"box"
}