-
Notifications
You must be signed in to change notification settings - Fork 8
Notification Profile
TakayukiHoshi1984 edited this page Mar 27, 2017
·
3 revisions
| API | 機能概要 |
|---|---|
| Notification API POST | スマートデバイスにノーティフィケーションを表示する。 |
| Notification API DELETE | スマートデバイスのノーティフィケーションを消去する。 |
| Notification Click Event API | スマートデバイスのノーティフィケーションクリックイベントを受領する。 |
| Notification Show Event API | スマートデバイスのノーティフィケーション表示イベントを受領する。 |
| Notification Close Event API | スマートデバイスのノーティフィケーション消去イベントを受領する。 |
| Notification Error Event API | スマートデバイスのノーティフィケーションエラーイベントを受領する。 |
スマートデバイスのノーティフィケーションを操作する機能。
http://www.w3.org/TR/2013/WD-notifications-20130912/
| インターフェース名称 | Version | 種別 |
|---|---|---|
| Notification API | 2.0.0 | 同期I/F |
スマートデバイスにノーティフィケーションの表示要求をする。 ノーティフィケーションの表示要求の到達成否を応答として返却し、ノーティフィケーションの表示完了を待って応答をするわけではない。 ノーティフィケーションの表示方法は表示要求を受けたスマートデバイスに依存する。
| HTTPメソッド | URI |
|---|---|
| POST | /gotapi/notification/notify |
| 論理名 | 物理名 | データ型 | 省略 | 設定値 |
|---|---|---|---|---|
| サービスID | serviceId | string | - | 取得対象デバイス |
| 通知タイプ | type | number | - | 通知のタイプを識別する。 0: 音声通話着信 1: メール着信 2: SMS着信 3: イベント |
| 向き | dir | string | ○ | メッセージの文字の向き。 auto: 自動 rtl: 右から左 ltr: 左から右 |
| 言語 | lang | string | ○ | メッセージの言語。 ref. BCP47 |
| メッセージ | body | string | ○ | 通知メッセージ。 |
| タグ | tag | string | ○ | 任意タグ文字列 カンマ(,)区切りで任意個数指定。 |
| アイコン | uri | string | ○ | アイコンファイルのURI。 |
| Content-Type | 形式 | HTTPステータス |
|---|---|---|
| application/json | JSON | 200 |
| 論理名 | 物理名 | データ型 | 省略 | 設定値 |
|---|---|---|---|---|
| 処理結果 | result | number | - | 0:正常応答 0以外:異常応答 |
| 通知ID | notificationId | string | ○ | ユニークな文字列。 |
POST http://localhost:4035/gotapi/notification/notify
| POSTデータ |
|---|
| serviceId=localhost.deviceconnect.org&type=0&dir=auto&accessToken=xxxxx |
{
"product":"Device Connect Manager",
"version":"x.x",
"result":0,
"notificationId":"nid001"
}
| インターフェース名称 | Version | 種別 |
|---|---|---|
| Notification API | 2.0.0 | 同期I/F |
スマートデバイスにノーティフィケーションの消去要求をする。 ノーティフィケーションの消去要求の到達成否を応答として返却し、ノーティフィケーションの消去完了を待って応答をするわけではない。
| HTTPメソッド | URI |
|---|---|
| DELETE | /gotapi/notification/notify |
| 論理名 | 物理名 | データ型 | 省略 | 設定値 |
|---|---|---|---|---|
| サービスID | serviceId | string | - | 取得対象デバイス |
| 通知ID | notificationId | string | - | ユニークな文字列。 |
| Content-Type | 形式 | HTTPステータス |
|---|---|---|
| application/json | JSON | 200 |
| 論理名 | 物理名 | データ型 | 省略 | 設定値 |
|---|---|---|---|---|
| 処理結果 | result | number | - | 0:正常応答 0以外:異常応答 |
DELETE http://localhost:4035/gotapi/notification/notify?serviceId=localhost.deviceconnect.org¬ificationId=nid001&accessToken=xxxxx
{
"product":"Device Connect Manager",
"version":"x.x",
"result":0
}
| インターフェース名称 | Version | 種別 |
|---|---|---|
| Notification Click Event API | 2.0.0 | 非同期I/F(イベントI/F) |
スマートデバイスのノーティフィケーションがクリックされたことを通知する。 スマートデバイスでノーティフィケーションがクリック(タップ)された時にイベントが発行される。
| イベント名 | Content-Type |
|---|---|
| /gotapi/notification/onclick | application/json |
| 論理名 | 物理名 | データ型 | 省略 | 設定値 |
|---|---|---|---|---|
| 通知ID | notificationId | string | - | ノーティフィケーションID。 |
{
"product":"Device Connect Manager",
"version":"x.x",
"serviceId":"localhost.deviceconnect.org",
"api" : "gotapi",
"profile":"notification",
"attribute":"onclick",
"sessionKey":"0a93ac0aade4e046ed63eb24d1172f5f35c88ca60daa901547c28d5827cb418a5de1d7c5f9e62405",
"notificationId":"nid001"
}
| インターフェース名称 | Version | 種別 |
|---|---|---|
| Notification Show Event API | 2.0.0 | 非同期I/F(イベントI/F) |
スマートデバイスのノーティフィケーションが表示されたことを通知する。 スマートデバイスでノーティフィケーションが表示された時にイベントが発行される。
| イベント名 | Content-Type |
|---|---|
| /gotapi/notification/onshow | application/json |
| 論理名 | 物理名 | データ型 | 省略 | 設定値 |
|---|---|---|---|---|
| 通知ID | notificationId | string | - | ノーティフィケーションID。 |
{
"product":"Device Connect Manager",
"version":"x.x",
"serviceId":"localhost.deviceconnect.org",
"api" : "gotapi",
"profile":"notification",
"attribute":"onshow",
"sessionKey":"0a93ac0aade4e046ed63eb24d1172f5f35c88ca60daa901547c28d5827cb418a5de1d7c5f9e62405",
"notificationId":"nid001"
}
| インターフェース名称 | Version | 種別 |
|---|---|---|
| Notification Close Event API | 2.0.0 | 非同期I/F(イベントI/F) |
スマートデバイスのノーティフィケーションが消去されたことを通知する。 ユーザ操作による消去、プログラムからの消去要求による消去のいずれのイベントでもイベントは発行される。
| イベント名 | Content-Type |
|---|---|
| /gotapi/notification/onclose | application/json |
| 論理名 | 物理名 | データ型 | 省略 | 設定値 |
|---|---|---|---|---|
| 通知ID | notificationId | string | - | ノーティフィケーションID。 |
{
"product":"Device Connect Manager",
"version":"x.x",
"servieId":"localhost.deviceconnect.org",
"api" : "gotapi",
"profile":"notification",
"attribute":"onclose",
"sessionKey":"0a93ac0aade4e046ed63eb24d1172f5f35c88ca60daa901547c28d5827cb418a5de1d7c5f9e62405",
"notificationId":"nid001"
}
| インターフェース名称 | Version | 種別 |
|---|---|---|
| Notification Error Event API | 2.0.0 | 非同期I/F(イベントI/F) |
スマートデバイスのノーティフィケーション操作でエラーが発生したことを通知する。 スマートデバイスでノーティフィケーション操作でエラーが発生した時にイベントが発行される。 表示要求に対する表示失敗のエラー、非表示要求に対する消去失敗のエラーなどが通知される。
| イベント名 | Content-Type |
|---|---|
| /gotapi/notification/onerror | application/json |
| 論理名 | 物理名 | データ型 | 省略 | 設定値 |
|---|---|---|---|---|
| 属性値 | notificationId | string | - | ノーティフィケーションID。 |
{
"product":"Device Connect Manager",
"version":"x.x",
"serviceId":"localhost.deviceconnect.org",
"api" : "gotapi",
"profile":"notification",
"attribute":"onerror",
"sessionKey":"0a93ac0aade4e046ed63eb24d1172f5f35c88ca60daa901547c28d5827cb418a5de1d7c5f9e62405",
"notificationId":"nid001"
}