OpenObserve Docs
ReferenceApiSearch

Field values

Updated View MarkdownOpen in ChatGPTOpen in Claude

Endpoint: GET /api/{organization}/{stream}/_values?fields={fields}&start_time={start_time}&end_time={end_time}&size=10&keyword=&no_count=false

Request

Description

Field nameData typeDefault valueDescription
streamstring-stream name
fieldsstring-the fields you want to get values, field1,field2
sizeint640how many values do you want to response, order by values num
start_timeint640Only list the values in the time range
end_timeint640Only list the values in the time range
keywordstring-search for the values
filterstring-optional filter, for example k8s_namespace_name=prod
fromint640offset into the value list
typestringlogsstream type (optional)
no_countboolfalseset to true will not response count and order by the value

Response

{
	"took": 155,
	"hits": [
		{
			"field": "field name",
			"values": [
				{
                    "zo_sql_key": "value1",
                    "zo_sql_num": 2070
                }
			]
		}
	],
	"total": 10,
	"from": 0,
	"size": 0,
	"scan_size": 28943
}

Response description:

Description

Field nameData typeDefault valueDescription
tookint64-unit: milliseconds, query execute time
fromint640value from query.from
sizeint640value from query.size
scan_sizeint640unit: MB, the amount of data scanned by the query.
hitsarray-one entry per requested field, with its values (zo_sql_key = value, zo_sql_num = count)
Was this page helpful?

On this page