Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: gtema <artem.goncharov@gmail.com> Co-committed-by: gtema <artem.goncharov@gmail.com>
9.8 KiB
Querying App Consumption Status
Function
This API is used to query the consumption status of apps.
URI
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:
|
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
app_name |
String |
Name of the app. |
app_id |
String |
Unique identifier of the app. |
create_time |
Long |
Time when the app is created, in milliseconds. |
commit_checkpoint_stream_names |
Array of strings |
List of associated streams. |
Example Requests
Querying App Consumption Status
GET https://{Endpoint}/v2/{project_id}/apps/{app_name}/streams/{stream_name}
Example Responses
Status code: 200
Normal response.
{ "stream_name" : "newstream", "app_name" : "newapp", "partition_consuming_states" : [ { "partition_id" : "2", "sequence_number" : "485", "latest_offset" : "1000", "earliest_offset" : "10", "checkpoint_type" : "LAST_READ" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Normal response. |
Error Codes
See Error Codes.