API Overview

The DIS API is a self-developed API that complies with REST API design specifications. DIS provides the functions listed in Table 1 through the DIS API.

Table 1 API functions

API Name

Function

API URI

Stream management

Creating a DIS Stream

POST /v2/{project_id}/streams

Deleting a DIS Stream

DELETE /v2/{project_id}/streams

Listing DIS Streams

GET /v2/{project_id}/streams

Viewing Details of a DIS Stream

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

  

Querying Stream Monitoring Information

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

label={label}&start_time={start_time}&end_time={end_time}

Obtaining Stream Consumption Information

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

Data management

Uploading Data to a DIS Stream

POST /v2/{project_id}/records

Downloading Data from a DIS Stream

GET /v2/{project_id}/records{?partition-cursor}

Obtaining a Cursor

GET /v2/{project_id}/cursors{?stream-name,partition-id,cursor-type,starting-sequence-number}

Program management

Creating an Application

POST /v2/{project_id}/apps

Deleting an Application

DELETE /v2/{project_id}/apps/{app_name}

  

Querying an Application List

GET /v2/{project_id}/apps

  

Viewing Details About a Consumer Application

GET /v2/{project_id}/apps/{app_name}

Checkpoint management

Adding a Checkpoint

POST /v2/{project_id}/checkpoints

Querying a Checkpoint

GET /v2/{project_id}/checkpoints{?stream_name,partition_id,app_name,checkpoint_type}

  

Deleting a Checkpoint

DELETE /v2/{project_id}/checkpoints

Dump task management

Adding a Dump Task

POST /v2/{project_id}/streams/{stream_name}/transfer-tasks

Deleting a Dump Task

DELETE /v2/{project_id}/streams/{stream_name}/transfer-tasks/{transfer_task_name}

Querying Dump Task Details

GET /v2/{project_id}/streams/{stream_name}/transfer-tasks/{transfer_task_name}

Querying a Dump Task List

GET /v2/{project_id}/streams/{stream_name}/transfer-tasks