1. REST API

通知

日本語翻訳に関する免責事項

このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。

システム内の各通知は、通知リソースによって表されます。このリソースを使用して、通知を取得および更新できます。

サポートされている方法は、GETHEADPUTです。

GET /api/notifications

このユーザーに適用される通知を含む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
}
この記事を改善するための提案がある場合は、 お知らせください!