メールフォルダのリスト照会
メールフォルダのリストを照会します。
API の種類
サービス API
Request URL
https://apis.worksmobile.com/r/{API ID}/mail/v2/getFolderList
HTTP Method
GET(Content-Type: application/x-www-form-urlencoded; charset=UTF-8)
Request
パラメータなし
Response
API 呼び出しに成功すると HTTP Status コード 200 を返し、応答内容は JSON 形式で返します。
プロパティ | タイプ | 必須 | 説明 |
---|---|---|---|
lastMailSN | Integer | Y | 最新のメールのシリアルナンバー 例) 337 |
totalSizeMB | Integer | Y | メール全体の使用容量(単位: MB) 例) 20 |
totalUnreadMail | Integer | Y | 未読メール数 例) 10 |
totalSize | Long | Y | メール全体の使用容量(単位: byte) 例) 203107 |
vipMailBox | Object | N | VIP フォルダの情報 |
vipMailBox.vipList | List | N | VIP フォルダのリスト |
vipMailBox.vipList[].lastReceivedTime | Long | N | 最新のメールの受信時刻 UNIXタイムスタンプ形式で表示。 例) 1513206287 |
vipMailBox.vipList[].name | String | N | VIP フォルダ名 |
vipMailBox.vipList[].unreadMailCount | Integer | N | 未読メール数 |
vipMailBox.vipList[].mailCount | Integer | N | 全体のメール数 |
vipMailBox.vipList[].email | String | N | VIP フォルダのメールアドレス |
vipMailBox.totalUnreadMail | Integer | N | VIP フォルダの全体の未読メール数 |
folderList | List | Y | 個人フォルダのリスト |
folderList[].usage | Long | Y | 各フォルダの使用量(単位: byte) |
folderList[].folderSN | Integer | Y | フォルダのシリアルナンバー |
folderList[].folderType | String | Y | フォルダタイプ ● S: システム ● U: メンバー作成 (メモフォルダの場合はすべて「S」に設定されます) |
folderList[].folderName | String | Y | フォルダ名 例) 受信メール |
folderList[].unreadMailCount | Integer | Y | 未読メール数 例) 0 |
folderList[].mailCount | Integer | Y | 全メール数 例) 100 |
folderList[].parentFolderSN | Integer | Y | 階層構造のフォルダの場合、上位フォルダのシリアルナンバー 例) 0 |
folderList[].folderDepth | Integer | Y | 階層の深さ 既定値は 0。 |
folderList[].hasChildFolder | Integer | Y | 下位フォルダの有無 ● 1: 有 ● 0: 無 |
Response Example
{
"totalSize": 41564065,
"vipMailBox": {
"vipList": [{
"lastReceivedTime": 1513206287,
"name": "テスト00",
"unreadMailCount": 1,
"mailCount": 1,
"email": "api_test00@mail.wdomain8.com"
}],
"totalUnreadMail": 1
},
"lastMailSN": 337,
"totalSizeMB": 39,
"totalUnreadMail": 151,
"humanReadable": "40MB",
"folderList": [{
"folderSN": 0,
"folderType": "S",
"folderName": "受信フォルダ",
"unreadMailCount": 151,
"mailCount": 238,
"usage": 33701530,
"folderDepth": 0,
"parentFolderSN": 0,
"hasChildFolder": 0,
"folderOrder": 0,
"idomain": "N"
}, {
"folderSN": 1,
"folderType": "S",
"folderName": "送信済みメール",
"unreadMailCount": 0,
"mailCount": 62,
"usage": 7443959,
"folderDepth": 0,
"parentFolderSN": 0,
"hasChildFolder": 0,
"folderOrder": 0,
"idomain": "N"
}, {
"folderSN": 2,
"folderType": "S",
"folderName": "送信確認",
"unreadMailCount": 0,
"mailCount": 63,
"usage": 0,
"folderDepth": 0,
"parentFolderSN": 0,
"hasChildFolder": 0,
"folderOrder": 0,
"idomain": "N"
}, {
"folderSN": 3,
"folderType": "S",
"folderName": "下書き",
"unreadMailCount": 0,
"mailCount": 13,
"usage": 21890,
"folderDepth": 0,
"parentFolderSN": 0,
"hasChildFolder": 0,
"folderOrder": 0,
"idomain": "N"
}, {
"folderSN": 4,
"folderType": "S",
"folderName": "ゴミ箱",
"unreadMailCount": 5,
"mailCount": 15,
"usage": 396686,
"folderDepth": 0,
"parentFolderSN": 0,
"hasChildFolder": 0,
"folderOrder": 0,
"idomain": "N"
}, {
"folderSN": 5,
"folderType": "S",
"folderName": "迷惑メール",
"unreadMailCount": 0,
"mailCount": 0,
"usage": 0,
"folderDepth": 0,
"parentFolderSN": 0,
"hasChildFolder": 0,
"folderOrder": 0,
"idomain": "N"
}, {
"folderSN": 6,
"folderType": "S",
"folderName": "メモフォルダ",
"unreadMailCount": 0,
"mailCount": 0,
"usage": 0,
"folderDepth": 0,
"parentFolderSN": 0,
"hasChildFolder": 0,
"folderOrder": 0,
"idomain": "N"
}, {
"folderSN": 102,
"folderType": "U",
"folderName": "外部メール用メールフォルダ",
"unreadMailCount": 0,
"mailCount": 0,
"usage": 0,
"folderDepth": 0,
"parentFolderSN": 0,
"hasChildFolder": 0,
"folderOrder": 0,
"idomain": "N"
}, {
"folderSN": 101,
"folderType": "U",
"folderName": "Daum(ハンメール)",
"unreadMailCount": 0,
"mailCount": 0,
"usage": 0,
"folderDepth": 0,
"parentFolderSN": 0,
"hasChildFolder": 0,
"folderOrder": 0,
"idomain": "N"
}]
}
Error
呼び出しに失敗すると HTTP Status と以下のエラー情報を返します。
プロパティ | タイプ | 説明 |
---|---|---|
code | String | Error Code |
message | String | Error Message |
HTTP Status | Error Code | 説明 |
---|---|---|
500 | SYSTEM_ERROR | 内部サーバーエラー |
Error Example
{
"code": "SYSTEM_ERROR",
"message": "internal error",
"domain": "mail"
}