Querying a Stream List

Initialize a DIS SDK client instance as instructed in Initializing a DIS SDK Client Instance.

The listStream_sample.py file provides a code sample. Configure the following parameter in this file:

1
start_stream_name = ""  #Leave unspecified or set to an existing stream name.

Run the listStream_sample.py file to call listStream_test. If response code 200 is returned, the stream list is displayed.

The following is an example response:

1
2
200
{"stream_names": ["dis-test1", "dis-xx"], "has_more_streams": false, "stream_info_list": [{"status": "RUNNING", "stream_name": "dis-xx", "data_type": "BLOB", "partition_count": 1, "stream_type": "COMMON", "retention_period": 168, "create_time": 1532423804480}, {"status": "RUNNING", "stream_name": "dis-test1", "data_type": "CSV", "partition_count": 1, "stream_type": "ADVANCED", "retention_period": 24, "create_time": 1532328674686}], "total_number": 8}