OpenObserve Docs
ReferenceApiStreams

List streams

Updated View MarkdownOpen in ChatGPTOpen in Claude

Endpoint: GET /api/{organization}/streams?fetchSchema=false&type={StreamType}

Request

All query parameters are optional.

  • fetchSchema: true / false (default false)

    Set to true to include each stream's field list in schema. With false, schema is an empty array.

  • type: logs / metrics / traces / enrichment_tables / metadata

    When omitted, streams of all types are listed.

  • keyword: only streams whose name contains this text (case-insensitive).

  • offset, limit: pagination. limit=0 (the default) returns all streams.

  • sort: field to sort by (default name); asc: true (default) or false.

Response

{
	"list": [
		{
			"name": "k8s",
			"storage_type": "s3",
			"stream_type": "logs",
			"stats": {
				"doc_time_min": 1673715046856933,
				"doc_time_max": 1673849134852901,
				"doc_num": 3300000,
				"file_num": 16,
				"storage_size": 3323.5,
				"compressed_size": 11.42,
				"index_size": 0.0
			},
            "schema": [
				{
					"name": "_timestamp",
					"type": "Int64"
				},
				{
					"name": "kubernetes.annotations.kubernetes.io/psp",
					"type": "Utf8"
				},
            ],
			"settings": {
				"partition_keys": {},
				"full_text_search_keys": ["log"]
			}
		}
	],
	"total": 1
}

Description

Field nameData typeDefault valueDescription
namestring-stream name
storage_typestring-s3 / disk
stream_typestringlogslogs / metrics / traces / enrichment_tables / metadata
statsobject-stats for the stream
stats.doc_time_minint640the minimum timestamp of the record in the stream
stats.doc_time_maxint640the maximum timestamp of the record in the stream
stats.doc_numint640the records num of the stream
stats.file_numint640the files num in storage of the stream
stats.storage_sizefloat640ingestion data size of the original data
stats.compressed_sizefloat640stored size in storage after compression
stats.index_sizefloat640size of the index files
schemaarray-the schema of the stream; empty when fetchSchema is false
schema.namestring-field name
schema.typestring-field data type: Utf8 / Int64 / Float64 / Timestamp / Boolean
settingsobject-settings of the stream (see Settings for all fields)
settings.partition_keysobject-custom partition keys, keyed L0, L1, … Each value has field, types ("value", "prefix" or {"hash": <buckets>}) and disabled. OpenObserve always partitions by time first
settings.full_text_search_keysarray[string]-full text search fields set on the stream. When empty, match_all searches the default fields (ZO_FEATURE_FULLTEXT_EXTRA_FIELDS adds more).
totalint64-top-level: number of streams that matched, before pagination
Was this page helpful?

On this page