全部產品
Search
文件中心

Simple Log Service:GetCheckPoint - 擷取指定消費組的消費點

更新時間:Dec 23, 2025

調用GetCheckPoint介面擷取指定消費組消費資料時Shard的checkpoint。

介面說明

介面說明

  • 請求文法中 Host 由 Project 名稱和Log Service Endpoint 構成,您需要在 Host 中指定 Project。

  • 已建立並擷取 AccessKey。更多資訊,請參見存取金鑰

阿里雲帳號 AccessKey 擁有所有 API 的存取權限,風險很高。強烈建議您建立並使用 RAM 使用者進行 API 訪問或日常營運。RAM 使用者需具備動作記錄服務資源的許可權。具體操作,請參見建立 RAM 使用者及授權

鑒權資源

下表列出了 API 對應的授權資訊。您可以在 RAM 權限原則語句的 Action 元素中添加該資訊,用於為 RAM 使用者或 RAM 角色授予調用此 API 的許可權。

動作(Action)授權策略中的資源描述方式(Resource)
log:GetConsumerGroupCheckPointacs:log:{#regionId}:{#accountId}:project/{#ProjectName}/logstore/{#logstoreName}/consumergroup/{#ConsumerGroup}

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求文法

GET /logstores/{logstore}/consumergroups/{consumerGroup} HTTP/1.1

路徑參數

名稱

類型

必填

描述

樣本值

logstore

string

Logstore 名稱。

test-logstore

consumerGroup

string

消費組名稱。

consumer-group-1

請求參數

名稱

類型

必填

描述

樣本值

project

string

Project 名稱。

ali-test-project

shard

integer

Shard ID。

  • 如果指定的 Shard 不存在,則返回空列表。

  • 如果不指定 Shard,則返回所有 Shard 的 Checkpoint。

1

返回參數

名稱

類型

描述

樣本值

array

指定消費組消費資料時 Shard 的 Checkpoint 列表。

object

Checkpoint 結構體。

shard

integer

Shard ID。

0

checkpoint

string

Checkpoint 值。

MTUyNDE1NTM3OTM3MzkwODQ5Ng==

updateTime

integer

Checkpoint 最後的更新時間。Unix 時間戳記格式,表示從 1970-1-1 00:00:00 UTC 計算起的秒數。

1524224984800922

consumer

string

Checkpoint 處的消費者。

consumer_1

樣本

正常返回樣本

JSON格式

[
  {
    "shard": 0,
    "checkpoint": "MTUyNDE1NTM3OTM3MzkwODQ5Ng==",
    "updateTime": 1524224984800922,
    "consumer": "consumer_1"
  }
]

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情