通知リソース
通知リソース
システムにある各通知は通知リソースで表されます。 このリソースを使用して通知を取得および更新できます。
GET、HEAD、PUT の各メソッドを使用できます。
GET /api/notifications
現在のユーザーに適用する通知を収めた通知配列が返されます。
要求の例:
GET http://hostname/api/notifications Host: hostname Accept: application/json
応答の例:
HTTP/1.1 200 OK Content-Length: content length Content-Type: application/json; charset=utf-8 ETag: "hash string" { "items": [ { "id": 16, "notificationtype": "SearchChanged", "notificationtypelabel": "Saved search results changed", "is_user_owned": false, "created_on": "2017-04-11T01:11:12.149588Z", "created_by": { "href": "https://stylelabs_example.com/api/entities/6", "title": "The user who created the entity" }, "modified_on": "2017-04-11T01:11:12.149588Z", "modified_by": { "href": "https://stylelabs_example.com/api/entities/6", "title": "The user who last modified the entity" }, "channels": [ { "channelname": "EmailNotification", "is_checked": true }, { "channelname": "RealTimeNotification", "is_checked": false } ], "UserId": 0, "self": { "href": "https://stylelabs_example.com/api/notifications", "title": "This Notification." } }, { "id": 17, "notificationtype": "OrderCompleted", "notificationtypelabel": "Order completed", "is_user_owned": true, "created_on": "2017-04-11T01:11:12.2121017Z", "created_by": { "href": "https://stylelabs_example.com/api/entities/6", "title": "The user who created the entity" }, "modified_on": "2017-04-11T01:11:12.2121017Z", "modified_by": { "href": "https://stylelabs_example.com/api/entities/6", "title": "The user who last modified the entity" }, "channels": [ { "channelname": "EmailNotification", "is_checked": true }, { "channelname": "RealTimeNotification", "is_checked": true } ], "UserId": 0, "self": { "href": "https://stylelabs_example.com/api/notifications", "title": "This Notification." } }, ... ], "total_items": 9 }