GetVisibleSearchFields is used for fetching information about the filters that can be used for different searches. This is a search on the Digizuite productSome searches support faceted search and filtering. This can be used to obtain more details about the filters available and provide a better user experience
Fetching the faceted filters
Information about faceted filters will be returned as part of the same search response, if enabled.
URL : /SearchService.js
Method : POST
Auth required : Yes
Required parameters
Name | Example | Description |
---|
SearchName | DigiZuite_System_Framework_Search | Fixed parameter that identifies the endpoint |
search. |
config | facet=true | Enables the faceting search. |
config | facet.limit=101 | Limits the number of options returned for each filter . |
config | facet.field={!ex=sAssetType}sAssetType | Enabled faceted result for the filter sAssetType. A list of all filters can be obtain using the DC 5.4 GetVisibleSearchFields endpoint. |
config | f.sAssetType.facet.sort=count | Sorts the options returns or the sAssetType filter. Available values:
|
accessKey | 2d8319f4-7a57-4ca0-a027-c44c2f259aac | AccessKey for API |
Optional parametersN/A
More than 1 facet fields can be added to a search.
It is recommended to avoid faceting field of type date(datebetween) as they increase significantly the size of the search response.
cUrl data example
Info | ||
---|---|---|
| ||
--data "method=GetVisibleSearchFields&searchNameSearchName=DigiZuite_System_Framework_Search&accessKey=d8eb5e9a-cf83-4cf0-a1f9-16d7a8e51cfb&config=facet=true&config=facet.field=%7B!ex=sAssetType%7DsAssetType&config=f.sAssetType.facet.sort=count" |
Success Response
Code : 200 OK
Content example
Code Block | ||
---|---|---|
| ||
{ "success":true, "error":"", "total":"3396", "items":[ /* ...items returned by the search... */ ], "searchFieldsextra":[ { "itemIdresponseHeader":0,{ "metafieldItemIdwarnings":[ "Raising facet.mincount from 0 to 1, because field sAssetType is Points-based.", "dataTypeId":0 ], "parameterNamestatus":"sAssetType0", "renderTypeQTime":"assettype2", "valueHandlerparams":"InList", { "hardcodedValuesfacet.field":[] "{!ex=sAssetType}sAssetType", { ], "itemIdf.sAssetType.facet.sort":12996"count", "metafieldItemIdstart":12994"0", "dataTypeIdsort":61"sortAssetidDesc desc", "parameterName "rows":"1", "facet.limit":"sBitInput101", "renderTypewt":"boolxml", "valueHandlerfacet":"Equals"true" } } }, { "hardcodedValuesfacet_counts":[]{ "facet_queries":{}, "facet_fields":{ "itemId":13000, "metafieldItemId":12998, "dataTypeId":68 "sAssetType":{ "4":"3013", // Number of asset of asset type 4 "1":"135", // Number of asset of asset type 1 "8":"72", "parameterName14":"sComboValueInput43", "renderType15":"combo37", "valueHandler9":"Equals21", "hardcodedValues2":[] }"17", "10":"13", { "16":"10", "itemId17":0"10", "metafieldItemId11":0"9", "dataTypeId5":0"6", "parameterName7":"sDateBetween4", "renderType18":"datebetween2", "valueHandler19":"Between2", "hardcodedValues100":[]"2" }, }, "facet_ranges":{}, "itemIdfacet_intervals":9310{}, "metafieldItemIdfacet_heatmaps":9309, "dataTypeId":61, "parameterName":"sIsPublic", "renderType":"bool", "valueHandler":"Equals", "hardcodedValues":[] },{} } } ] } |
Error Response
Code : 200 OK
Content example
Code Block |
---|
{
"success": false,
"total": 0,
"error": "A critical exception occurred while we executed the search.\r\n",
"items": null,
"warnings": [{
"Severity": 150,
"Code": 420,
"Description": "A critical exception occurred while we executed the search."
}]
} |
Using faceted filters
URL : /SearchService.js
Method : POST
Auth required : Yes
Required parameters
Name | Example | Description |
---|---|---|
SearchName | DigiZuite_System_Framework_Search | Fixed parameter that identifies the endpoint search. |
config | facet=true | Enables the faceting search. |
config | facet.limit=101 | Limits the number of options returned for each filter . |
config | facet.field={!ex=sAssetType}sAssetType | Enabled faceted result for the filter sAssetType. A list of all filters can be obtain using the DC 5.4 GetVisibleSearchFields endpoint. |
config | f.sAssetType.facet.sort=count | Sorts the options returns or the sAssetType filter. Available values:
|
config | fq={!tag=sAssetType}sAssetType:("1" OR "4") | Filters the results of the search by setting sAssetType filter to either 1 or 4 |
accessKey | 2d8319f4-7a57-4ca0-a027-c44c2f259aac | AccessKey for API |
cUrl data example
Info | ||
---|---|---|
| ||
--data "SearchName=DigiZuite_System_Framework_Search&config=facet=true&config=facet.field=%7B!ex=sAssetType%7DsAssetType&config=f.sAssetType.facet.sort=count&config=fq=%7B!tag=sAssetType%7DsAssetType:(%221%22%20OR%20%224%22)" |
Success Response
Code : 200 OK
Content example
Code Block | ||
---|---|---|
| ||
{ "success":true, "error":"", "total":"3396", "items":[ /* ...items returned by the search... */ ], "extra":[ { "itemIdresponseHeader":2481,{ "metafieldItemIdwarnings":2380,[ "dataTypeId":169, Raising facet.mincount from 0 to 1, because field sAssetType is Points-based.", ], "parameterNamestatus":"sKeywords0", "renderTypeQTime":"multicombo2", "valueHandlerparams":"AllInList",{ "hardcodedValuesfacet.field":[] "{!ex=sAssetType}sAssetType", { ], "f.sAssetType.facet.sort":"count", "itemIdstart":5722"0", "metafieldItemIdsort":5719"sortAssetidDesc desc", "dataTypeIdrows":300"1", "parameterNamefacet.limit":"sMenu101", "renderTypewt":"treexml", "valueHandlerfacet":"InList"true" } } }, { "hardcodedValuesfacet_counts":[]{ "facet_queries":{}, "facet_fields":{ "itemId":13040, "sAssetType":{ "4":"3013", // Number of asset of asset type 4 "metafieldItemId1":13038, "135", // Number of asset of asset type 1 "dataTypeId8":60"0", "parameterName14":"sStringInput0", "renderType15":"string0", "valueHandler9":"Equals0", "hardcodedValues2":[] }, { "0", "10":"0", "16":"0", "itemId17":22406"0", "metafieldItemId11":22402"0", "dataTypeId5":68"0", "parameterName7":"sWorkflowStatus0", "renderType18":"multicombo0", "valueHandler19":"InList0", "hardcodedValues100":[] "0" }, }, ] "facet_ranges":{}, "successfacet_intervals":true{}, "errors":[ "facet_heatmaps":{} } } ] } |
Error Response
Code : 200 OK
Content example
...