PUSH API
- 印刷する
- PDF
PUSH API
- 印刷する
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
基本情報
API URL
https://sens.apigw.ntruss.com/push/v2
API Header
項目 | Mandatory | 説明 |
---|---|---|
Content-Type | Mandatory | リクエスト Body Content Typeを application/jsonに指定(POST) |
x-ncp-apigw-timestamp | Mandatory | 1970年1月1日 00:00:00 協定世界時(UTC)からの経過時間をミリ秒(Millisecond)で表したもの。 API Gatewayサーバとの時間差が5分以上の場合は無効なリクエストとみなす |
x-ncp-iam-access-key | Mandatory | ポータルまたは Sub Accountが発行した Access Key ID |
x-ncp-apigw-signature-v2 | Mandatory | 上記ユースケースの Bodyを Access Key Idとマッピングする SecretKeyで暗号化した署名 HMAC暗号化アルゴリズムは HmacSHA256を使用 |
NAVERクラウドプラットフォームの認証キーおよび Signature作成ガイドに移動する
参考
FCM(GCM)タイプは、2024年6月20日にサービス提供が終了します。FCMv1に移行するには、FCMv1移行ガイドをご参照ください。
デバイス
デバイストークンの登録
デバイストークンを登録し、ユーザーにバインドします。
リクエスト URL
POST https://sens.apigw.ntruss.com/push/v2/services/{serviceId}/users
Content-Type: application/json; charset=utf-8
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
serviceId | Mandatory | String | サービス ID | プロジェクト登録時に発行されたサービス ID |
Headers
リクエスト Body
{
"userId":"string",
"country":"string",
"language":"string",
"timezone":"integer",
"channelName":"string",
"deviceType":"(GCM|FCMv1|APNS)",
"deviceToken":"string",
"isNotificationAgreement":"boolean",
"isAdAgreement":"boolean",
"isNightAdAgreement":"boolean"
}
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
userId | Mandatory | String | ユーザー ID | - ユーザーを識別する ID - 最大128文字 |
country | Optional | String | 国コード | - デバイスの国設定(デフォルト: KR) - ISO-3166-1 alpha-2 - 英大文字のみ使用可能 |
language | Optional | String | 言語コード | - デバイスの言語設定(デフォルト: ko) - ISO-639-1 - 英小文字のみ使用可能 |
timezone | Optional | Integer | タイムゾーン | - Number of seconds away from UTC(デフォルト: 32400) - Example: 28800 (UTC+8) |
channelName | Optional | String | 登録するチャンネル名 | 登録されたチャンネル名を入力するとチャンネルに追加 |
deviceType | Mandatory | String | デバイスのタイプ | - FCMv1: Android - APNS: iOS - GCM: Android (deprecated 2024.6.19.) |
deviceToken | Mandatory | String | デバイストークン | |
isNotificationAgreement | Mandatory | Boolean | プッシュ通知の受信有無 | falseはすべてのプッシュを非受信 |
isAdAgreement | Mandatory | Boolean | プッシュ型広告の受信有無 | falseはプッシュ型広告を非受信 (messageType: AD) |
isNightAdAgreement | Mandatory | Boolean | 夜間のプッシュ型広告の受信有無 | falseは夜間プッシュ型広告を非受信 (messageType: AD) (夜間 - 午後9時~翌日午前8時) |
レスポンス Body
なし
レスポンス Status
HTTP Status | Desc |
---|---|
201 | Created(登録完了) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
デバイストークンの照会
登録されたデバイス/ユーザーを照会します。
リクエスト URL
GET https://sens.apigw.ntruss.com/push/v2/services/{serviceId}/users/{userId}
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
serviceId | Mandatory | String | サービス ID | プロジェクト登録時に発行されたサービス ID |
userId | Mandatory | String | ユーザー ID | デバイストークン登録時にバインドしたユーザー ID |
Headers
リクエスト Body
なし
レスポンス Body
{
"userId":"string",
"country":"string",
"language":"string",
"timezone":"integer",
"channelName":"string",
"notificationAgreement":"boolean",
"adAgreement":"boolean",
"nightAdAgreement":"boolean",
"notificationAgreementTime":"datetime",
"adAgreementTime":"datetime",
"nightAdAgreementTime":"datetime",
"createTime":"datetime",
"updateTime":"datetime",
"devices":[
{
"deviceType":"(GCM|FCMv1|APNS)",
"deviceToken":"string"
}
]
}
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
userId | Mandatory | String | ユーザー ID | |
country | Mandatory | String | 国コード | - デバイスの国設定(デフォルト: KR) - ISO-3166-1 alpha-2 - 英大文字のみ使用可能 |
language | Mandatory | String | 言語コード | - デバイスの言語設定(デフォルト: ko) - ISO-639-1 - 英小文字のみ使用可能 - 例外的に zh-Hant/zh-Hans使用可能(大文字小文字区分) |
timezone | Mandatory | Integer | タイムゾーン | - Number of seconds away from UTC(デフォルト: 32400) - Example: 28800 (UTC+8) |
channelName | Optional | String | 登録されたチャンネル名 | |
notificationAgreement | Mandatory | Boolean | プッシュ通知の受信有無 | falseはすべてのプッシュを非受信 |
adAgreement | Mandatory | Boolean | プッシュ型広告の受信有無 | falseはプッシュ型広告を非受信 (messageType: AD) |
nightAdAgreement | Mandatory | Boolean | 夜間のプッシュ型広告の受信有無 | falseは夜間プッシュ型広告を非受信 (messageType: AD) (夜間 - 午後9時~翌日午前8時) |
notificationAgreementTime | Mandatory | DateTime | プッシュ通知メッセージの受信に同意した日時 | 直近に受信同意した日時 |
adAgreementTime | Mandatory | DateTime | プッシュ型広告の受信に同意した日時 | 直近に受信同意した日時 |
nightAdAgreementTime | Mandatory | DateTime | 夜間のプッシュ型広告の受信に同意した日時 | 直近に受信同意した日時 |
createTime | Mandatory | DateTime | トークンを登録した日時 | |
updateTime | Mandatory | DateTime | トークンを変更した日時 | |
devices.deviceType | Mandatory | String | デバイスのタイプ | - FCMv1: Android - APNS: iOS - GCM: Android (deprecated 2024.6.19.) |
devices.deviceToken | Mandatory | String | デバイストークン |
レスポンス Status
HTTP Status | Desc |
---|---|
200 | OK(照会完了) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
デバイストークンの削除
ユーザー(userId)にバインドされたデバイスをすべて削除します。ユーザーも一緒に削除されます。
リクエスト URL
DELETE https://sens.apigw.ntruss.com/push/v2/services/{serviceId}/users/{userId}
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
serviceId | Mandatory | String | サービス ID | プロジェクト登録時に発行されたサービス ID |
userId | Mandatory | String | ユーザー ID | デバイストークン登録時にバインドしたユーザー ID |
Headers
リクエスト Body
なし
レスポンス Body
なし
レスポンス Status
HTTP Status | Desc |
---|---|
204 | No Content(削除完了) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
チャンネル
チャンネルの作成
チャンネルを作成します。
リクエスト URL
POST https://sens.apigw.ntruss.com/push/v2/services/{serviceId}/channels
Content-Type: application/json; charset=utf-8
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
serviceId | Mandatory | String | サービス ID | プロジェクト登録時に発行されたサービス ID |
channelName | Mandatory | String | チャンネル名 | 作成するチャンネル名 |
Headers
リクエスト Body
{
"channelName":"string",
"channelDesc":"string"
}
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
channelName | Mandatory | String | チャンネル名 | 作成するチャンネル名 |
channelDesc | Optional | String | チャンネルの説明 | 作成するチャンネルの説明 |
レスポンス Body
なし
レスポンス Status
HTTP Status | Desc |
---|---|
201 | Created(追加完了) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
409 | Conflict (チャンネル名重複) |
500 | Internal Server Error |
チャンネルの変更
チャンネルを変更します。
リクエスト URL
PUT https://sens.apigw.ntruss.com/push/v2/services/{serviceId}/channels
Content-Type: application/json; charset=utf-8
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
serviceId | Mandatory | String | サービス ID | プロジェクト登録時に発行されたサービス ID |
Headers
リクエスト Body
[
{
"channelName":"string",
"channelDesc":"string"
}
]
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
channelName | Mandatory | String | チャンネル名 | - 1回のリクエストで1000件までリクエスト可能(List) - チャンネル名に該当する説明がアップデート - 変更するチャンネル名 |
channelDesc | Optional | String | チャンネルの説明 | 変更したチャンネルの説明 |
レスポンス Body
[
{
"channelName": "string",
"channelDesc": "string",
"createTime": "localDateTime",
"updateTime": "localDateTime"
}
]
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
channelName | Mandatory | String | チャンネル名 | 作成するチャンネル名 |
channelDesc | Optional | String | チャンネルの説明 | 変更したチャンネルの説明 |
createTime | Mandatory | String | 作成時間 | format: LocalDateTime |
updateTime | Optional | String | 変更時間 | format: LocalDateTime |
レスポンス Status
HTTP Status | Desc |
---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
429 | Too Many Request |
500 | Internal Server Error |
チャンネル照会
チャンネルを照会します。
リクエスト URL
GET https://sens.apigw.ntruss.com/push/v2/services/{serviceId}/channels
Content-Type: application/json; charset=utf-8
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
serviceId | Mandatory | String | サービス ID | プロジェクト登録時に発行されたサービス ID |
Parameters
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
channelName | Optional | String | チャンネル名 | - like照会結果を返す - 作成したチャンネル名 |
pageSize | Optional | Integer | ページサイズ | - default: 100 - 0~100までの数字のみ入力可能 |
pageIndex | Optional | Integer | ページインデックス | default: 0 |
Headers
リクエスト Body
なし
レスポンス Body
[
{
"channelName": "string",
"channelDesc": "string",
"createTime": "localDateTime",
"updateTime": "localDateTime"
}
]
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
channelName | Mandatory | String | チャンネル名 | 作成したチャンネル名 |
channelDesc | Optional | String | チャンネルの説明 | 作成したチャンネルの説明 |
createTime | Mandatory | String | 作成時間 | format: LocalDateTime |
updateTime | Optional | String | 変更時間 | format: LocalDateTime |
レスポンス Status
HTTP Status | Desc |
---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
429 | Too Many Request |
500 | Internal Server Error |
チャンネルの削除
チャンネルを削除します。
リクエスト URL
DELETE https://sens.apigw.ntruss.com/push/v2/services/{serviceId}/channels
Content-Type: application/json; charset=utf-8
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
serviceId | Mandatory | String | サービス ID | プロジェクト登録時に発行されたサービス ID |
Headers
リクエスト Body
[
{
"channelName":"string"
}
]
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
channelName | Mandatory | String | チャンネル名 | - 1回のリクエストで1000件までリクエスト可能(List) - 削除するチャンネル名 |
レスポンス Body
なし
レスポンス Status
HTTP Status | Desc |
---|---|
204 | No Content |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
429 | Too Many Request |
500 | Internal Server Error |
チャンネルにユーザーを追加
チャンネルにユーザーを追加します。
リクエスト URL
POST https://sens.apigw.ntruss.com/push/v2/services/{serviceId}/channels/{channelName}/users/{userId}
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
serviceId | Mandatory | String | サービス ID | プロジェクト登録時に発行されたサービス ID |
channelName | Mandatory | String | チャンネル名 | ユーザーを追加するチャンネル名 |
userId | Mandatory | String | ユーザー ID | デバイストークン登録時にバインドしたユーザー ID |
Headers
リクエスト Body
なし
レスポンス Body
なし
レスポンス Status
HTTP Status | Desc |
---|---|
201 | Created(追加完了) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
チャンネルからユーザーを削除
チャンネルからユーザーを削除します。
リクエスト URL
DELETE https://sens.apigw.ntruss.com/push/v2/services/{serviceId}/channels/{channelName}/users/{userId}
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
serviceId | Mandatory | String | サービス ID | プロジェクト登録時に発行されたサービス ID |
channelName | Mandatory | String | チャンネル名 | ユーザーを削除するチャンネル名 |
userId | Mandatory | String | ユーザー ID | デバイストークン登録時にバインドしたユーザー ID |
Headers
リクエスト Body
なし
レスポンス Body
なし
レスポンス Status
HTTP Status | Desc |
---|---|
204 | No Content(削除完了) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
メッセージ
メッセージ送信
メッセージを送信します。
リクエスト URL
POST https://sens.apigw.ntruss.com/push/v2/services/{serviceId}/messages
Content-Type: application/json; charset=utf-8
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
serviceId | Mandatory | String | サービス ID | プロジェクト登録時に発行されたサービス ID |
Headers
リクエスト Body
{
"messageType": "(AD | NOTIF)",
"target": {
"type": "(ALL | CHANNEL | USER)",
"deviceType": "(GCM | FCMv1 | APNS)",
"to": [
"string",
"string"
],
"country": [
"string",
"string"
]
},
"message": {
"default": {
"content": "string",
"custom": {
"customKey1": "customValue1",
"customKey2": "customValue2"
},
"option": {},
"i18n": {
"default": {
"content": "string",
"custom": {
"customKey1": "customValue1",
"customKey2": "customValue2"
}
},
"[language]": {
"content": "string",
"custom": {
"customKey1": "customValue1",
"customKey2": "customValue2"
}
}
}
},
"gcm": {
"content": "string",
"custom": {
"customKey1": "customValue1",
"customKey2": "customValue2"
},
"option": {},
"i18n": {
"default": {
"content": "string",
"custom": {
"customKey1": "customValue1",
"customKey2": "customValue2"
}
},
"[language]": {
"content": "string",
"custom": {
"customKey1": "customValue1",
"customKey2": "customValue2"
}
}
}
},
"fcmv1": {
"content": "string",
"custom": {
"customKey1": "customValue1",
"customKey2": "customValue2"
},
"option": {},
"i18n": {
"default": {
"content": "string",
"custom": {
"customKey1": "customValue1",
"customKey2": "customValue2"
}
},
"[language]": {
"content": "string",
"custom": {
"customKey1": "customValue1",
"customKey2": "customValue2"
}
}
}
},
"apns": {
"content": "string",
"custom": {
"customKey1": "customValue1",
"customKey2": "customValue2"
},
"option": {},
"i18n": {
"default": {
"content": "string",
"custom": {
"customKey1": "customValue1",
"customKey2": "customValue2"
}
},
"[language]": {
"content": "string",
"custom": {
"customKey1": "customValue1",
"customKey2": "customValue2"
}
}
}
}
},
"reserveTime": "yyyy-MM-dd HH:mm",
"reserveTimeZone": "string",
"scheduleCode": "string"
}
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
messageType | Optional | String | メッセージタイプ | - NOTIF: 通知メッセージ - AD: プッシュ型広告 - (default: NOTIF) |
target.type | Mandatory | String | 受信対象のタイプ | - ALL: サービスに登録されたすべてのデバイス - CHANNEL: チャンネルに登録されたすべてのデバイス - USER: ユーザーにバインドされたすべてのデバイス |
target.deviceType | Optional | String | 受信対象のデバイスタイプ | - FCMv1: Android - APNS: iOS - GCM: Android (deprecated 2024.6.19.) - nullの場合すべてのデバイス |
target.to | Optional | Array of String | 受信対象の識別子 | - ALL: 入力の必要なし - CHANNEL: チャンネル名 - USER: ユーザー ID - 最大100個 |
target.country | Optional | Array of String | 受信対象の国コード | - 受信対象デバイスの国コード - ISO-3166-1 alpha-2 - 大文字のみ使用可能 |
message | Mandatory | Object | 共通送信メッセージ | メッセージ規格は以下の共通メッセージ規格を参照 |
message.i18n | Optional | Object | デバイス言語別の多言語メッセージ処理のためのオブジェクト | メッセージ規格は以下の多言語メッセージ規格を参照 |
reserveTime | Optional | String | 予約日時 | メッセージの送信予約日時(yyyy-MM-dd HH:mm) |
reserveTimeZone | Optional | String | 予約日時のタイムゾーン | - 予約日時のタイムゾーン(デフォルト: Asia/Seoul) - 対応タイムゾーンリスト - TZ database name値を使用 |
scheduleCode | Optional | String | スケジュールコード | 登録するスケジュールコード |
参考
- Androidデバイスのメッセージ送信時に GCM/FCMの両方をサポートし、NAVERクラウドプラットフォーム SENSでは Typeを GCMとして使用します。
- target.deviceTypeを GCMまたは FCMv1に指定すると、すべての Androidデバイスにメッセージが送信されるのではなく、その Typeで登録されたデバイストークンを持つ Userにのみメッセージが送信されます。
- 同じデバイスのトークンが GCM、FCMv1の両方に登録されている場合、target.deviceType: ALLまたは指定せずにメッセージを送信すると、重複して受信されることがあります。
共通メッセージ
- メッセージ送信 requestBodyの message項目が、共通メッセージのための規格である。
message.default.XXX
、message.gcm.XXX
、message.fcmv1.XXX
、message.apns.XXX
で区分でき、message.default
は必ず作成してください。- defaultのみ作成すると、すべての Push Typeに同じメッセージが送信され、gcm、fcmv1、apnsを作成すると、各 Push Type別にメッセージを分離できます。
- 適用優先順位: gcm = fcmv1 = apns > default
message
に以下の表の通りメッセージを作成すると、各 Push Typeに合わせてメッセージが作成されて送信されます。
messageのサブ項目 | Mandatory | Type | GCM/FCMv1 | APNS |
---|---|---|---|---|
content | Optional | String | data.content | alert or alert.body |
custom | Optional | Object | data.KEYに指定 * FCMv1: customKey:customValue形式 = string:string | apsと同レベルの KEYに指定 |
option | Optional | Object | 以下の Push Type別の使用可能な optionを参照 | |
i18n | Optional | Object |
参考
メッセージの送信時に message.fcmv1を別途構成しないと、message.gcm > message.defaultの優先順位でメッセージを使用することになるので、FCMv1で変更された部分によってメッセージ送信に影響を与えることがあります。
多言語メッセージ
- デバイスに設定された languageに応じて、多言語メッセージを処理するための規格です。
message.default.XXX
、message.[language].XXX
で区分でき、languageは ISO-639-1標準に従って小文字のみ使用できます。ただし、例外的に中国語簡体/繁体に対応するため、zh-Hant、zh-Hansは使用できます。- ISO-639-1
- 小文字のみ使用可能
- zh-Hant/zh-Hans使用可能(大文字小文字区分)
language
は、デバイス登録時に設定された言語コード基準です。- 適用優先順位は、message.content、message.customより高いです。
i18nのサブ項目 | Mandatory | Type | GCM/FCMv1 | APNS |
---|---|---|---|---|
content | Mandatory | String | data.content | alert or alert.body |
custom | Optional | Object | data.KEYに指定 * FCMv1: customKey:customValue形式 = string:string | apsと同レベルの KEYに指定 |
Push Type別の使用可能な option
- GCM(FCM)/FCMv1メッセージ情報ガイドに移動する
- collapse_key
- time to live
参考
FCMv1タイプでは、メッセージ情報ガイドが以下のように変更されます。
- delay while idleオプションを削除
- time to liveオプション名を ttlに変更
- APNSメッセージ情報ガイドに移動する
- aps.badge
- aps.sound
- aps.content-available
- aps.alert.title
- aps.alert.action-loc-key
- ...
レスポンス Body
{
"requestId":"string",
"requestTime":"string",
"statusCode":"string",
"statusName":"string"
}
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
requestId | Mandatory | String | リクエスト ID | |
requestTime | Mandatory | DateTime | リクエスト時間 | |
statusCode | Mandatory | String | リクエスト状態コード | 以下の Response Codeを参照 |
statusName | Mandatory | String | リクエスト状態名 | - success: 成功 - reserved: 予約中 - scheduled: スケジュール中 - fail: 失敗 |
レスポンス Status
HTTP Status | Desc |
---|---|
202 | Accepted(送信リクエスト完了) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
メッセージ送信結果の照会
メッセージの送信結果を照会します。
リクエスト URL
GET https://sens.apigw.ntruss.com/push/v2/services/{serviceId}/messages/{requestId}
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
serviceId | Mandatory | String | サービス ID | プロジェクト登録時に発行されたサービス ID |
requestId | Mandatory | String | メッセージ送信リクエスト ID | メッセージ送信時に返されるリクエスト識別子 |
Headers
リクエスト Body
なし
レスポンス Body
{
"requestId":"string",
"requestTime":"string",
"statusCode":"string",
"statusName":"string",
"messageStatusCode":"string",
"messageStatusName":"string",
"completeTime":"string",
"targetCount":"integer",
"sentCount":"integer",
"messageType":"string",
"target":{
...
},
"message":{
...
}
}
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
requestId | Mandatory | String | リクエスト ID | |
requestTime | Mandatory | DateTime | リクエスト時間 | |
statusCode | Mandatory | String | リクエスト状態コード | - 202: 成功 - その他: 失敗 |
statusName | Mandatory | String | リクエスト状態名 | - success: 成功 - fail: 失敗 |
messageStatusCode | Mandatory | String | 送信状態コード | - 200: 成功 - その他: 失敗 |
messageStatusName | Mandatory | String | 送信状態名 | - success: 成功 - processing: 処理中 - fail: 失敗 |
completeTime | Mandatory | DateTime | 送信完了時間 | |
targetCount | Mandatory | Integer | リクエスト対象デバイスの数 | |
sentCount | Mandatory | Integer | 送信成功デバイスの数 | |
messageType | Mandatory | String | メッセージタイプ | - NOTIF: 通知メッセージ - AD: プッシュ型広告 |
target | Mandatory | Object | リクエスト target情報 | |
message | Mandatory | Object | リクエスト message情報 |
レスポンス Status
HTTP Status | Desc |
---|---|
200 | OK(照会完了) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
予約メッセージ
予約メッセージ状態の照会
メッセージの送信予約状態を照会します。
GET https://sens.apigw.ntruss.com/push/v2/services/{serviceId}/reservations/{reserveId}/reserve-status
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
serviceId | Mandatory | String | サービス ID | プロジェクト登録時に発行されたサービス ID |
reserveId | Mandatory | String | 予約メッセージ ID | 予約送信リクエスト照会時に返されるメッセージ識別子(requestId) |
Headers
リクエスト Body
なし
レスポンス Body
{
"reserveId": "string",
"reserveTimeZone": "string",
"reserveTime": "string",
"reserveStatus": "string"
}
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
reserveId | Mandatory | String | 予約メッセージ ID | 予約送信リクエスト照会時に返されるメッセージ識別子(requestId) |
reserveTime | Mandatory | String | 予約日時 | メッセージの送信予約日時(yyyy-MM-dd HH:mm) |
reserveTimeZone | Mandatory | String | 予約日時のタイムゾーン | - 予約日時のタイムゾーン(デフォルト: Asia/Seoul) - 対応タイムゾーンリスト - TZ database name値を使用 |
reserveStatus | Mandatory | String | 予約状態 | - READY: 送信待機 - PROCESSING: 送信リクエスト中 - CANCELED: 送信キャンセル - FAIL: 送信リクエスト失敗 - DONE: 送信リクエスト成功 - STALE: 送信リクエスト失敗(時間オーバー) |
レスポンス Status
HTTP Status | Desc |
---|---|
200 | OK(照会完了) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
予約メッセージのキャンセル
メッセージの送信予約をキャンセルします。
DELETE https://sens.apigw.ntruss.com/push/v2/services/{serviceId}/reservations/{reserveId}
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
serviceId | Mandatory | String | サービス ID | プロジェクト登録時に発行されたサービス ID |
reserveId | Mandatory | String | 予約メッセージ ID | 予約送信リクエスト照会時に返されるメッセージ識別子(requestId) |
Headers
リクエスト Body
なし
レスポンス Body
なし
レスポンス Status
HTTP Status | Desc |
---|---|
204 | No Content(削除完了) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
スケジュールメッセージ
スケジュールメッセージのキャンセル
メッセージ送信スケジュールをキャンセルします。
DELETE https://sens.apigw.ntruss.com/push/v2/services/{serviceId}/schedules/{scheduleCode}/messages/{messageId}
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
項目 | Mandatory | Type | 説明 | 備考 |
---|---|---|---|---|
serviceId | Mandatory | String | サービス ID | プロジェクト登録時に発行されたサービス ID |
scheduleCode | Mandatory | String | スケジュールコード | スケジュールの登録時に使用したコード |
messageId | Mandatory | String | 予約メッセージ ID | スケジュール送信リクエストを照会する時に返されるメッセージ識別子(requestId) |
Headers
リクエスト Body
なし
レスポンス Body
なし
レスポンス Status
HTTP Status | Desc |
---|---|
204 | No Content(削除完了) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
この記事は役に立ちましたか?