NotificationItems
通知項目をクエリ、作成、変更します。
ビュー固有の情報
Garoon は、このビューをフィルタリングするためのカラムをサポートしていません。すべてのフィルタはクライアント側で実行されます。
Upsert
NotificationItem を追加/更新するには、少なくともNotificationKey、Operation、Url、Title、App およびDestinations(Code、Type およびId)カラムを指定する必要があります。
Note:アプリでは、値に外部通知コードを指定する必要があります。
クエリで既存のNotificationKey が指定されている場合、API は既存のレコードを更新します。指定されていない場合は、新しいレコードが作成されます。
テンポラリテーブルの使用:
INSERT INTO Destinations#TEMP (Code, Type, id) VALUES ('cybozu', 'USER', 2)
UPSERT INTO NotificationItems (NotificationKey, Operation, Url, Title, App, Destinations) VALUES ('15', 'remove', 'https://developer.cybozu.io/hc/ja/articles/360026939911', 'Sample title', 'Concur', 'Destinations#TEMP')
集計の使用:
UPSERT INTO NotificationItems (NotificationKey, Operation, Url, Title, App, Destinations) VALUES ('15', 'remove', 'https://developer.cybozu.io/hc/ja/articles/360026939911', 'Sample title', 'Concur', '[
{
"type": "USER",
"code": "userCode",
"id": "1"
}
]')
Columns
| Name | Type | ReadOnly | Description |
| NotificationKey [KEY] | String | True |
Garoon 通知キー。 |
| ModuleId [KEY] | String | True |
Garoon のモジュールのID。 |
| CreatorId | Int | True |
通知の作成者のGaroon のユーザーID。 |
| CreatorCode | String | True |
通知の作成者のGaroon のユーザー名。 |
| CreatorName | String | True |
通知の作成者のGaroon のユーザーログイン名。 |
| CreatedAt | Datetime | True |
通知の作成日時。 |
| Operation | String | True |
通知操作の概要。次の3つの値から1つを指定できます:add、modify、remove。 |
| Url | String | True |
通知に含まれるURL。 |
| Title | String | True |
通知タイトル。 |
| Body | String | True |
通知本文。 |
| Icon | String | True |
通知アイコン。サンプルアイコンまたはURI を指定できます。 |
| IsRead | Boolean | True |
通知が既読かどうか。 |
Pseudo-Columns
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| Destinations | String |
通知の宛先リスト。カラムは挿入に使用され、データを返しません。 |
| App | String |
Garoon のアプリケーションの管理で設定されている「外部通知コード」を指定します。 |