This API is used to query the consumption status of an app.
For details, see Calling APIs.
GET /v2/{project_id}/apps/{app_name}/streams/{stream_name}
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID |
app_name |
Yes |
String |
Name of the app to be queried |
stream_name |
Yes |
String |
Name of the stream to be queried Maximum: 60 |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
limit |
No |
Integer |
Max. number of partitions to list in a single API call. The minimum value is 1 and the maximum value is 1,000. The default value is 100. Minimum: 1 Maximum: 1000 Default: 100 |
start_partition_id |
No |
String |
Name of the partition to start the partition list with. The returned partition list does not contain this partition. |
checkpoint_type |
Yes |
String |
Type of the checkpoint.
Enumeration values:
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
has_more |
Boolean |
Whether there are more matching consumer applications.
|
stream_name |
String |
Name of the stream to be queried Maximum: 64 |
app_name |
String |
Name of the consumer application to be queried |
partition_consuming_states |
Array of PartitionConsumingStates objects |
Consumption status of the current partition |
Parameter |
Type |
Description |
|---|---|---|
partition_id |
String |
Partition identifier of the stream.Two partition ID formats are available:- shardId-0000000000- 0For example, if a stream has three partitions, the partition IDs are 0, 1, and 2, or shardId-0000000000, shardId-0000000001, and shardId-0000000002. |
sequence_number |
String |
Sequence number to be submitted, which is used to record the consumption checkpoint of the stream. Ensure that the sequence number is within the valid range. |
latest_offset |
Long |
Latest index position |
earliest_offset |
Long |
Earliest index position |
checkpoint_type |
String |
Type of the checkpoint.
Enumeration values:
|
status |
String |
Current status of the partition
Enumeration values:
|
Querying App Consumption Status
GET https://{Endpoint}/v2/{project_id}/apps/{app_name}/streams/{stream_name}
Status code: 200
Normal response
{
"has_more" : false,
"stream_name" : "disMonitorTest",
"app_name" : "4aSiZ",
"partition_consuming_states" : [ {
"partition_id" : 0,
"sequence_number" : -1,
"latest_offset" : 1658297359,
"earliest_offset" : 1653120573,
"checkpoint_type" : "LAST_READ",
"status" : "ACTIVE"
} ]
}
Status Code |
Description |
|---|---|
200 |
Normal response |
See Error Codes.