投稿ダイレクトメッセージリストの取得
メソッド
GET
URL
https://typetalk.com/api/v2/spaces/:spaceKey/messages/@:accountName
スコープ
topic.read
URLパラメーター
名前 |
型 |
説明 |
spaceKey |
文字列 |
組織のキー |
accountName |
文字列 |
アカウント名 |
クエリパラメーター
名前 |
型 |
説明 |
count (任意) |
数値 |
デフォルト値: 20、最大値: 200 |
from (任意) |
数値 |
投稿ID |
direction (任意) |
文字列 |
“backward” または “forward” |
レスポンスの例
{
"topic": {
"id": 6249,
"name": "agata,masanori",
"suggestion": "agata,masanori",
"isDirectMessage": true,
"lastPostedAt": "2018-11-26T01:29:16Z",
"createdAt": "2018-09-25T06:28:07Z",
"updatedAt": "2018-09-25T06:28:07Z"
},
"mySpace": {
"space": {
"key": "xxxxxxxx",
"name": "Nulab Inc",
"enabled": true,
"imageUrl": "https://apps.nulab.com/spaces/xxxxxxxx/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": 39932,
"createdAt": "2016-01-19T09:29:10Z",
"updatedAt": "2018-11-19T23:37:29Z"
}
},
"directMessage": {
"account": {
"id": 2489,
"name": "agata-sample",
"fullName": "Toshitaka Agata",
"suggestion": "Toshitaka Agata",
"imageUrl": "https://typetalk.com/accounts/2489/profile_image.png?t=1453867573519",
"isBot": false,
"createdAt": "2016-01-26T08:18:12Z",
"updatedAt": "2018-11-26T02:35:54Z"
},
"status": {
"presence": "away",
"web": null,
"mobile": null
}
},
"bookmark": {
"postId": 168198,
"updatedAt": "2018-11-26T01:29:18Z"
},
"posts": [
{
"id": 167376,
"topicId": 6249,
"replyTo": null,
"message": "このデザイン、どうですか?",
"account": {
"id": 2489,
"name": "agata-sample",
"fullName": "Toshitaka Agata",
"suggestion": "Toshitaka Agata",
"imageUrl": "https://typetalk.com/accounts/2489/profile_image.png?t=1453867573519",
"isBot": false,
"createdAt": "2016-01-26T08:18:12Z",
"updatedAt": "2018-11-26T02:35:54Z"
},
"mention": null,
"attachments": [],
"likes": [],
"talks": [],
"links": [],
"createdAt": "2018-09-25T06:28:08Z",
"updatedAt": "2018-09-25T06:28:08Z"
},
{
"id": 168198,
"topicId": 6249,
"replyTo": null,
"message": "良いですね!",
"account": {
"id": 2488,
"name": "masa",
"fullName": "masa",
"suggestion": "masa",
"imageUrl": "https://typetalk.com/accounts/2488/profile_image.png?t=1453868694472",
"isBot": false,
"createdAt": "2016-01-26T08:17:39Z",
"updatedAt": "2018-11-26T05:08:22Z"
},
"mention": null,
"attachments": [],
"likes": [],
"talks": [],
"links": [],
"createdAt": "2018-11-26T01:29:16Z",
"updatedAt": "2018-11-26T01:29:16Z"
}
],
"hasNext": false
}
レスポンスのフォーマットは全てJSONです。GETメソッドはETagに対応しているので、If-None-Match ヘッダを付けて送ると、変更がない場合は304を返します。日付のフォーマットは ISO 8601 で、UTC です。 (例 : 2014-01-09T06:20:08Z )