ユーザー通知一覧の取得
説明
指定したユーザーの通知情報を一括で取得します。
必要権限
なし
URL
GET /system/users/{userId}/notifications
パスパラメーター
| 名前 | 型 | 必須か | 説明 |
|---|---|---|---|
| userId | string | ○ | ユーザーID |
クエリパラメーター
| 名前 | 型 | 必須か | 説明 |
|---|---|---|---|
| unread | boolean | × | 取得する通知の絞り込み ・true:未読のユーザー通知情報のみ取得 ・false/指定なし :全てのユーザー通知情報を取得 |
レスポンス
| 名前 | 型 | 説明 |
|---|---|---|
| totalCount | int | 検索条件に該当するユーザー通知の総数 |
| data | UserNotification[] | 取得したユーザー通知一覧 |
エラーケース
なし
特記事項
なし
サンプル
ユーザーIDを指定して未読の通知情報のみを取得する
GET /system/users/21/notifications?unread=true
Response
200 OK
{
"totalCount":48,
"data":
[
{
id: "24",
byUserId:"23",
entityId:"127",
entityType: "WorkItem",
isRead: false,
readAt: null,
message: "S機器の開発 #3 要求ヒアリングに植田 信貴さんがコメントしました。",
target: "WorkItem.127.Comment",
toUserId: "21",
createdBy:"0",
createdAt:"2022-09-02T00:43:31Z",
updatedBy: "21",
updatedAt: "2022-09-07T10:54:44Z"
},{
id: "24",
byUserId:"23",
entityId:"138",
entityType: "WorkItem",
isRead: false,
readAt: null,
message: "S機器の開発 #14 製作レビュー のリーダーに割り当てられました",
target: "WorkItem.138",
toUserId: "21",
createdBy:"0",
createdAt:"2022-09-02T00:43:31Z",
updatedBy: "21",
updatedAt: "2022-09-07T10:54:44Z"
},
.
.
.
]
}"
型定義
UserNotification
| 名前 | 型 | 説明 |
|---|---|---|
| id | string | ユーザー通知情報ID |
| toUserId | string | 通知先のユーザID |
| byUserId | string | 通知元のユーザID |
| message | string | 通知内容 「メッセージ一覧」を参照 |
| entityId | string | 発生元のデータのID |
| entityType | string | 発生元のデータの種類 |
| isRead | boolean | 既読かどうか |
| readAt | DateTime | 既読になった日時 |
メッセージ一覧
| 通知内容 | メッセージ |
|---|---|
| "プロジェクト名" #"アイテム番号" "アイテム名" に "ユーザー名" がコメントしました。 | 自分が割り当てられているアイテムにコメントが追加された |
| "プロジェクト名" #"アイテム番号" "アイテム名" のリーダーに割り当てられました。 | 自分がリーダーに割り当てられた |
| "プロジェクト名" #"アイテム番号" "アイテム名" が完了されました。 | 自分がリーダーのアイテムが完了した |