プッシュ通知履歴管理

プッシュ配信履歴の取得

以下は、プッシュ配信履歴の取得を行う例です。配信開始日時のFrom~Toは必須で、最長3ヶ月まで検索することができます。

const result = await RKZ.Push.historyQuery()
  .find({
    pushStartDteFrom: '2025-05-29 00:00',
    pushStartDteTo: '2025-07-12 23:59',
  })
result.data.forEach(history => {
  console.debug('push_no:', history.push_no)
  console.debug('push_message:', history.push_message)
  console.debug('push_start_dte:', history.push_start_dte)
})

配信開始日時以外の条件で検索することも可能です。詳細はAPIリファレンスを参照ください。

curl --location '<配布したベースURL>/api_zeus/push/list' \
--header 'Authorization: Bearer <配布したサーバー認証トークン>' \
--form 'tenant_id="<配布したテナントID>"' \
--form 'contents[push_start_dte_from]="2025-05-29 00:00"' \
--form 'contents[push_start_dte_to]="2025-07-12 23:59"'

プッシュ配信の中止

プッシュ配信の中止を行うには、中止したい履歴のプッシュ番号を指定してください。

await RKZ.Push.abort(1) // push_no=1の履歴を中止
curl --location '<配布したベースURL>/api_zeus/push/abort' \
--header 'Authorization: Bearer <配布したサーバー認証トークン>' \
--form 'tenant_id="<配布したテナントID>"' \
--form 'contents[push_no]="1"'

中止した履歴は送信されませんが、ステータスが「9:配信中止」になり、履歴としては残ります。

注意

中止できるのは、ステータスが「0:配信予約」の履歴です。