Listing DIS Streams

Function

This API is used to query all streams created by the current tenant.

During query, you need to specify the stream from which the stream list is returned and the maximum number of streams returned in a single request.

URI

  • URI format

    GET /v2/{project_id}/streams

  • Parameter description

    None

Request

  • Example request
    GET https://{endpoint}/v2/{project_id}/streams?limit=10&start_stream_name=test_stream 
  • Parameter description
    Table 1 Parameter description

    Parameter

    Mandatory

    Type

    Description

    limit

    No

    Int

    The maximum number of DIS streams to list in a single API call.

    Value range: 1 to 100

    Default value: 10

    start_stream_name

    No

    String

    Name of the DIS stream to start the list with. The returned stream list does not contain this DIS stream name.

    If pagination query is required, this parameter is not transferred when you query data on the first page. If the value of has_more_streams is true, go to the next page,

    start_stream_name is set to the name of the last stream in the query result on the first page.

    NOTE:

    Streams in the stream list are arranged in alphabetical order.

Response

  • Example response
    {
      "total_number": 1,
      "has_more_streams": false,
      "stream_names": [
        "stream_test"
      ]
    }
  • Parameter description
    Table 2 Response parameter description

    Parameter

    Type

    Description

    total_number

    Int

    Total number of DIS streams created by the current tenant.

    stream_names

    List<String>

    Name of the list of the streams meeting the current requests.

    has_more_streams

    Boolean

    Specify whether there are more matching DIS streams to list. Possible values:

    • true: There are more streams.
    • false: There are no more streams.

Status Code

  • Normal

    200 OK

  • Failed

    For more information, see Error Codes.