通知未読数の取得

メソッド

GET

URL

https://typetalk.com/api/v5/notifications/status

スコープ

my

レスポンスの例

{
    "statuses": [
        {
            "mySpace": {
                "space": {
                    "key": "xxxxxxx",
                    "name": "Nulab Inc",
                    "enabled": true,
                    "imageUrl": "https://apps.nulab.com/spaces/xxxxxx/photo/large"
                },
                "myRole": "ADMIN",
                "isPaymentAdmin": true,
                "invitableRoles": [
                    "ADMIN",
                    "USER",
                    "GUEST"
                ],
                "myPlan": {
                    "plan": {
                        "key": "typetalk.standard25",
                        "name": "スタンダード 25 ユーザー",
                        "limitNumberOfUsers": 25,
                        "limitNumberOfAllowedAddresses": 25,
                        "limitTotalAttachmentSize": 26843545600
                    },
                    "enabled": true,
                    "trial": null,
                    "numberOfUsers": 5,
                    "numberOfAllowedAddresses": 0,
                    "totalAttachmentSize": 0,
                    "createdAt": "2016-01-19T09:29:10Z",
                    "updatedAt": "2018-09-21T02:30:38Z"
                }
            },
            "access": {
                "unopened": 0
            },
            "like": {
                "receive": {
                    "hasUnread": false,
                    "readLikeId": 18919
                }
            },
            "unreads": {
                "topicIds": [
                    3557
                ],
                "dmTopicIds": [
                    6249
                ]
            }
        }
    ],
    "notificationSettings": {
        "favoriteTopicMobile": true,
        "doNotDisturb": {
            "isSuppressed": false,
            "manual": {
                "remainingTimeInMinutes": null
            },
            "scheduled": {
                "enabled": true,
                "start": "22:00",
                "end": "07:00"
            }
        }
    }
}

レスポンスのフォーマットは全てJSONです。GETメソッドはETagに対応しているので、If-None-Match ヘッダを付けて送ると、変更がない場合は304を返します。日付のフォーマットは ISO 8601 で、UTC です。 (例 : 2014-01-09T06:20:08Z )