Browse Facet Options

The browse facet options endpoint lists all the customer-configured facet options (values) present in the latest index.

Request all options for a specific facet
curl -X GET -H "Content-Type: application/json" \
"https://ac.cnstrc.com/browse/facet_options?facet_name=[name of your facet]&key=[your API key]"
Request all options for a specific _hidden_ facet
curl -X GET -H "Content-Type: application/json" \
"https://ac.cnstrc.com/browse/facet_options?facet_name=[name of your hidden facet]&key=[your API key]&fmt_options[show_hidden_facets]=true"

HTTP Request#

GET https://ac.cnstrc.com/browse/facet_options?facet_name=[name of your facet]&key=[your API key]&fmt_options[show_hidden_facets]=true&fmt_options[show_protected_facets]=true

URL Parameters#

The URL parameters the endpoint accepts are shown below.

OptionRequired?DefaultDescription
facet_nameYesn/aName of the facet whose options to return
fmt_options[show_hidden_facets]NoFalseRequesting options of a hidden facet without setting this flag to True, will return 0 results
fmt_options[show_protected_facets]NoFalseRequesting options of a protected facet without setting this flag to True, will return 0 results

Response format overview#

{
"request": {
...
},
"response": {
"facets": [
{
"data": {},
"display_name": "Brand",
"name": "brand",
"options": [
{
"count": 1,
"data": {},
"display_name": "Nike",
"status": "",
"value": "nike"
},
{
"count": 4,
"data": {},
"display_name": "Puma",
"status": "",
"value": "puma"
}
],
"type": "multiple"
}
]
}
}