Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

GetVisibleSearchFields
NameExampleDescription
method
SearchNameDigiZuite_System_Framework_SearchFixed parameter that identifies the endpoint
method
search.
SearchNameDigiZuite_System_Framework_SearchThe search name for which filters should be returned.
configfacet=trueEnables the faceting search.
configfacet.limit=101Limits 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.
configf.sAssetType.facet.sort=count

Sorts the options returns or the sAssetType filter. Available values:

  • count - sorts the options by usage(most used to lease used)
  • index - sorts the options alphabetically
accessKey2d8319f4-7a57-4ca0-a027-c44c2f259aacAccessKey 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
iconfalse

--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
languagejs
{
	"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

NameExampleDescription
SearchNameDigiZuite_System_Framework_SearchFixed parameter that identifies the endpoint search.
configfacet=trueEnables the faceting search.
configfacet.limit=101Limits 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.
configf.sAssetType.facet.sort=count

Sorts the options returns or the sAssetType filter. Available values:

  • count - sorts the options by usage(most used to lease used)
  • index - sorts the options alphabetically
configfq={!tag=sAssetType}sAssetType:("1" OR "4")Filters the results of the search by setting  sAssetType filter to either 1 or 4
accessKey2d8319f4-7a57-4ca0-a027-c44c2f259aacAccessKey for API

cUrl data example

Info
iconfalse

--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
languagejs
{
	"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

...