Agnostic Guides
...
Box Endpoints
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) { "tab" "examples", "url" "https //localhost 82/scrud/search", "name" "search (query)", "method" "post", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "kind" "required", "name" "cmsname", "type" "string", "description" "name of the box system configured in link enterprise " }, { "kind" "required", "name" "whereclause", "type" "string", "description" "a where clause (json in string form) used to query box to return a set of files/folders depending on criteria set " }, { "kind" "required", "name" "selectedcms", "type" "string", "description" "value should always be set to \\"box\\" to let link enterprise know which configured content system to search " } ], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "l7maccvikcmgyr03j3 ap", "code" "\[\n\t{\n\t\t\\"name\\" \\"check\\",\n\t\t\\"id\\" \\"895736641171\\",\n\t\t\\"type\\" \\"file\\"\n\t},\n\t{\n\t\t\\"name\\" \\"demo1 txt\\",\n\t\t\\"id\\" \\"897859484481\\",\n\t\t\\"type\\" \\"file\\"\n\t}\n]", "language" "200" }, { "id" "c0tj4vmrgrtv7xq8zvvau", "code" "", "language" "500" } ], "selectedlanguageid" "l7maccvikcmgyr03j3 ap" }, "examples" { "languages" \[ { "id" "rinxzo0waaz3lekuoh2ux", "code" "{\r\n \\"cmsname\\" \\"insertproductionsystemname (located in link enterprise gui)\\",\r\n \\"whereclause\\" \\"{\\\\\\"from\\\\\\" \\\\\\"enterprise insertenterpriseid insertmetadatatemplate\\\\\\",\\\\\\"query\\\\\\" \\\\\\"insertmetadatacolumnname = \ value\\\\\\",\\\\\\"query params\\\\\\" {\\\\\\"value\\\\\\" \\\\\\"insertmetadatavalue\\\\\\"},\\\\\\"ancestor folder id\\\\\\" \\\\\\"insertfolderid\\\\\\"}\\",\r\n \\"selectedcms\\" \\"box\\"\r\n}\r\n\r\n", "language" "json" } ], "selectedlanguageid" "rinxzo0waaz3lekuoh2ux" }, "description" "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 \n\nprecondition insertname searchqueryenabled=true (located in inifile)", "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" } } { "tab" "examples", "url" "https //localhost 82/scrud/search", "name" "search (mdfilters)", "method" "post", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "kind" "required", "name" "cmsname", "type" "string", "description" "name of the box system configured in link enterprise " }, { "kind" "optional", "name" "whereclause", "type" "string", "description" "a where clause (json in string form) used to query box to return a set of files/folders depending on criteria set " }, { "kind" "optional", "name" "selectedcms", "type" "string", "description" "value should always be set to \\"box\\" to let link enterprise know which configured content system to search " } ], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "fgxdotbzmqjtdkdumy0wt", "code" "\[\n\t{\n\t\t\\"name\\" \\"check\\",\n\t\t\\"id\\" \\"895736641171\\",\n\t\t\\"type\\" \\"file\\"\n\t},\n\t{\n\t\t\\"name\\" \\"demo1 txt\\",\n\t\t\\"id\\" \\"897859484481\\",\n\t\t\\"type\\" \\"file\\"\n\t},\n\t{\n\t\t\\"name\\" \\"cataray pdf\\",\n\t\t\\"id\\" \\"901051603311\\",\n\t\t\\"type\\" \\"file\\"\n\t},\n\t{\n\t\t\\"name\\" \\"version3 pdf\\",\n\t\t\\"id\\" \\"901048740163\\",\n\t\t\\"type\\" \\"file\\"\n\t},\n\t{\n\t\t\\"name\\" \\"test xls xls\\",\n\t\t\\"id\\" \\"900741822394\\",\n\t\t\\"type\\" \\"file\\"\n\t},\n\t{\n\t\t\\"name\\" \\"test htm htm\\",\n\t\t\\"id\\" \\"900747633313\\",\n\t\t\\"type\\" \\"file\\"\n\t},\n\t{\n\t\t\\"name\\" \\"test gif gif\\",\n\t\t\\"id\\" \\"900747915499\\",\n\t\t\\"type\\" \\"file\\"\n\t}\n]", "language" "200" }, { "id" "j0ifgft2wz db1qwgif2b", "code" "", "language" "500" } ], "selectedlanguageid" "fgxdotbzmqjtdkdumy0wt" }, "examples" { "languages" \[ { "id" "jgf6sqdzbwlq6 z9ziwpf", "code" "{\r\n \\"cmsname\\" \\"insertproductionsystemname (located in link enterprise gui)\\",\r\n\t \\"whereclause\\" \\"mdfilters=\[{\\\\\\"templatekey\\\\\\" \\\\\\"insertmetadatatemplatename\\\\\\",\\\\\\"scope\\\\\\" \\\\\\"enterprise\\\\\\",\\\\\\"filters\\\\\\" {\\\\\\"insertmetadatacolumnname\\\\\\" \\\\\\"insertmetadatavalue\\\\\\"}}]\\",\r\n \\"selectedcms\\" \\"box\\"\r\n}\r\n\r\n", "language" "json", "customlabel" "json" } ], "selectedlanguageid" "jgf6sqdzbwlq6 z9ziwpf" }, "description" "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 ", "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" } }