---
title: "Return values for a single facet"
method: POST
path: "/faceted-search/{facetClass}/facet/{id}"
---

# Return values for a single facet

`POST /faceted-search/{facetClass}/facet/{id}`

## Path parameters

- `facetClass` string, required
- `id` string, required

## Request body

- object
  - `sortBy` string
  - `sortDirection` string
  - `constraints` object[], nullable
  - `constrainSelf` boolean
  - `langTag` string

## Response `200`

Facet values

- object
  - `data` union — Facet values as an array of objects (checkbox facets) or as a single object (timespan facets).
    - object[]
    - object
  - `flatData` object[] — Facet values as an array of objects with no hierarchy
  - `id` string — The id of facet
  - `sparqlQuery` string — The SPARQL query that was used for the values of the facet

## Changes

> 21 revisions in range; 1 could not be searched.

- **2020-04-30** `b907579d6a5c` — 1 warning
  - removed the request property `langTag`

[Change history](https://skmtc.dev/semanticcomputing/apis/sampo-ui-api/changes/faceted-search/:facetClass/facet/:id/post.md)

---

[API](https://skmtc.dev/semanticcomputing/apis/sampo-ui-api.md) · [All operations](https://skmtc.dev/semanticcomputing/apis/sampo-ui-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/semanticcomputing/sampo-ui-api/revisions/7fb94a21eac7/schema)
