• Data Ingestion Service

dis
  1. Help Center
  2. Data Ingestion Service
  3. API Reference
  4. API Description
  5. Viewing Details of a DIS Stream

Viewing Details of a DIS Stream

Function

This API is used to view details about a specified DIS stream.

URL

  • URL format

    GET /v2/{project_id}/streams/{stream_name}

  • Parameter description

    None

Request

  • Example request
    GGET https://{endpoint}:{port}/v2/6352bba7aaab443aa1d9943efc586a68/streams/stream_test?start_partitionId=shardId-0000000000&limit_partitions=100
    
    Request Header: 
    Content-Type: application/json 
    X-Sdk-Date: 20180820T024248Z 
    Authorization: SDK-HMAC-SHA256 Credential=QRUP2R3QFNAOVAWMYHZW/20180820/eu-de/test/sdk_request,  
    SignedHeaders=host;x-sdk-date,  
    Signature=9d8b56b055c0e1f7a9498d881a7cb726be91b4f0cde1773b0b1557e987a480ce
  • Parameter description
    Table 1 Parameter description

    Parameter

    Mandatory

    Type

    Description

    stream_name

    Yes

    String

    Name of the DIS stream to be queried.

    start_partitionId

    No

    String

    ID of the partition to start the partition list with. The returned partition list does not contain this partition ID.

    limit_partitions

    No

    Int

    Maximum number of partitions to list in a single API call.

    Value range: 1–1000

    Default value: 100

Response

  • Example response
    {
      "stream_name": "stream_test",
      "stream_id": "U7v0U582F8ccXyErJKC",
      "create_time": 1504679587519,
      "last_modified_time": 1504679587519,
      "retention_period": 24,
      "status": "RUNNING",
      "stream_type": "COMMON",
      "data_type": "JSON",
      "writable_partition_count": 3,
      "readable_partition_count": 5,
      "partitions": [
        {
         "status": "ACTIVE",
         "partition_id": "shardId-0000000000",
          "hash_range": "[0 : 9223372036854775807]",
           "sequence_number_range": "[0 : 200]"
        }
     ],
     "data_schema":{
    	"type": "record",
    	"name": "RecordName",
    	"fields": [{
    		"name": "id",
    		"type": "string",
    		"doc": "Type inferred from '\"1\"'"
                    }, {
    		"name": "detail",
    		"type": {
    			"type": "record",
    			"name": "detail",
    			"fields": [{
    				"name": "detID",
    				"type": "string",
    				"doc": "Type inferred from '\"05790110000000000103\"'"
    			}, {
    				"name": "endTime",
    				"type": "string",
    				"doc": "Type inferred from '\"2018/10/07 13:26:35\"'"
    			}]
    		},
    		"doc": "Type inferred from '{\"detID\":\"05790110000000000103\",\"endTime\":\"2018/10/07 13:26:35\"}'"
    	}]
       },
      "has_more_partitions": false,
       "tags": []
    }
  • Parameter description
    Table 2 Response parameter description

    Parameter

    Type

    Description

    stream_name

    String

    Name of the DIS stream.

    stream_id

    String

    Unique ID of each stream.

    create_time

    Long

    Timestamp at which the DIS stream was created.

    last_modified_time

    Long

    Timestamp at which the DIS stream was most recently modified.

    retention_period

    Int

    Period of time for which data is retained in the DIS stream.

    status

    String

    The stream status is one of the following:

    stream_type

    String

    Partition type.

    data_type

    String

    Type of the source data.

    data_schema

    String

    Source data structure that defines JOSN and CSV formats. It is described in the syntax of Avro. For details about Avro, see http://avro.apache.org/docs/current/#schemas.

    writable_partition_count

    Int

    Total number of writable partitions (including partitions in ACTIVE and DELETED states).

    readable_partition_count

    Int

    Total number of readable partitions (including partitions in ACTIVE state only).

    tags

    List<Tag>

    Label of the stream.

    partitions

    List<PartitionResult>

    A list of partitions that comprise the DIS stream. For more information, see Table 3.

    has_more_partitions

    Boolean

    Specify whether there are more matching partitions of the DIS stream to list.

    • true: There are more partitions.
    • false: There are no more partitions.
    Table 3 PartitionResult parameter description

    Parameter

    Type

    Description

    status

    String

    Current status of each partition.

    • CREATING
    • ACTIVE
    • DELETED
    • EXPIRED

    partition_id

    String

    Unique ID of the partition.

    hash_range

    String

    Possible value range of the hash key used by each partition.

    sequence_number_range

    String

    Sequence number range of each partition.

    Table 4 Tag parameter description

    Parameter

    Mandatory

    Type

    Description

    key

    Yes

    String

    Key. A tag key cannot contain special characters such as =*<>\,|/ or start or end with a space.

    value

    Yes

    String

    Value. A tag value cannot contain special characters such as =*<>\,|/ or start or end with a space.

Status Code

  • Normal

    200 OK

  • Failed

    For more information, see Error Codes.