/api/v1/object/data/{objectSlug}/column-values/{fieldSlug}List the distinct values stored in one field, most common first.
List the distinct values stored in one field, most common first.
Returns each distinct, non-empty value of fieldSlug with the number of
records that hold it, sorted by that count and then by value. Use it to
build a filter menu. Only records the credential can see count.
filters narrows the records first, in the same condition format as the
filters query parameter of GET /object/data/{objectSlug}. search
keeps values that contain the text, ignoring case. limit caps the list;
has_more is true when more values exist. For select, status, priority
and source fields, value is the stored option id.
To list the options a select field allows, including unused ones, use
GET /object/data/{objectSlug}/field-options/{fieldSlug}. Multi-select and
tag fields are not supported here.
Body fields are all optional. limit is 1 to 200, default 50.
Scope: read.<object slug>, for example read.contacts.
Errors:
400— no active object has that slug.400—Field with slug 'city-mpoc7h1s' not found or has no column.400— the field is a multi-select or tag field.403— the credential lacksread.<object slug>.422— the body is invalid, for examplelimitis above200or a condition has an unknownoperator.
Request:
{
"filters": [
{ "fieldSlug": "country-mpoc6b3n", "operator": "equals", "value": "Egypt" }
],
"search": "a",
"limit": 20
}
Response 200:
{
"status": 200,
"message": "Column values retrieved successfully",
"data": {
"values": [
{ "value": "Cairo", "count": 42 },
{ "value": "Alexandria", "count": 17 },
{ "value": "Giza", "count": 9 }
],
"has_more": false
}
}
Send request
Use the documented inputs to call this endpoint directly.
Parameters
Values are applied to the request and the example on the right.
Request body
application/jsonrequiredThe view's active filter, as a flat condition list. Narrows the population before the distinct values are taken — omit it to ask about the object.
Type-ahead. Matched as contains, case-insensitively.
Capped rather than merely defaulted: the response is one row per distinct value, and a free-text column has as many as it has records.
Responses
Successful response
{
"message": "string",
"data": "string"
}Bad request
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Unauthorized
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Internal server error
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Powered by heyo-docs