Search
2 min
Docuflow provides a web service endpoint that will allow you to retrieve a subset of documents/folders based on a search criteria. Docuflow supports two types of search within box. One using metadata filters and another using metadata queries (real-time).
You can learn about the pros and cons of which one to utilize here.
To enable or disable metadata queries (real-time search) you can do so within the docuflow 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
Body Parameters
- cmsNameStringrequiredDescription
- whereClausestringrequiredDescription
- selectedCMSstringrequiredDescription
json
{
"cmsName":"insertProductionSystemName (located in docuflow gui)",
"whereClause":"{\"from\":\"enterprise_InsertEnterpriseId.insertMetaDataTemplate\",\"query\":\"insertMetaDataColumnName = :value\",\"query_params\":{\"value\":\"insertMetaDataValue\"},\"ancestor_folder_id\":\"insertFolderId\"}",
"selectedCMS":"box"
}
200
[
{
"name": "check",
"id": "895736641171",
"type": "file"
},
{
"name": "demo1.txt",
"id": "897859484481",
"type": "file"
}
]500
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
Body Parameters
- cmsNamestringrequiredDescription
- whereClausestringDescription
- selectedCMSstringDescription
JSON
{
"cmsName":"insertProductionSystemName (located in docuflow gui)",
"whereClause":"mdfilters=[{\"templateKey\":\"insertMetaDataTemplateName\",\"scope\":\"enterprise\",\"filters\":{\"insertMetaDataColumnName\":\"insertMetaDataValue\"}}]",
"selectedCMS":"box"
}
200
[
{
"name": "check",
"id": "895736641171",
"type": "file"
},
{
"name": "demo1.txt",
"id": "897859484481",
"type": "file"
},
{
"name": "Cataray.pdf",
"id": "901051603311",
"type": "file"
},
{
"name": "Version3.pdf",
"id": "901048740163",
"type": "file"
},
{
"name": "TEST XLS.xls",
"id": "900741822394",
"type": "file"
},
{
"name": "TEST HTM.htm",
"id": "900747633313",
"type": "file"
},
{
"name": "TEST GIF.gif",
"id": "900747915499",
"type": "file"
}
]500