OpenObserve Docs
ReferenceApiStreams

List streams

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

Request

  • fetchSchema: true / false

    fetchSchema set to true will response the schema for each stream or without schema.

  • type: logs / metrics / traces

    default is logs.

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
			},
            "schema": [
				{
					"name": "_timestamp",
					"type": "Int64"
				},
				{
					"name": "kubernetes.annotations.kubernetes.io/psp",
					"type": "Utf8"
				},
            ],
			"settings": {
				"partition_keys": {},
				"full_text_search_keys": ["log"]
			}
		}
	]
}

Description

Field nameData typeDefault valueDescription
namestring-stream name
storage_typestring-s3 / disk
stream_typestringlogslogs / metrics / traces
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_sizeint640ingestion data size of the original data
stats.compressed_sizeint640stored size in storage after compression
schemaarray-the schema of the stream, if fetchSchema set to false, has no this field
schema.namestring-field name
schema.typestring-field data type: Utf8 / Int64 / Float64 / Timestamp / Boolean
settingsobject-settings of the stream
settings.partition_keysobject-custom partition keys for the stream. By default OpenObserve uses timestamp as the first level partition key
settings.full_text_search_keysarray[string]-full text search fields, default OpenObserve uses log, message, msg, content, data, json, if there is no those fields in your stream, will report error: you should set the full text search fields.
Was this page helpful?

Last updated on

On this page