Get topic messages

Method

GET

URL

https://typetalk.in/api/v1/topics/:topicId

Scope

topic.read

URL parameters

Name Type Description
topicId Number Topic ID

Query parameters

Name Type Description
count (Optional) Number default value: 20, maximum: 200
from (Optional) Number references Post ID
direction (Optional) String “backward” or “forward”

Response Example

{
  "mySpace": {
    "space": {
      "key": "abcdefghij",
      "name": "Joe Tech Inc.",
      "enabled": true,
      "imageUrl": "http://nulabapps.local:18080/nulab-account-web/spaces/abcdefghij/photo/large"
    },
    "myRole": "ADMIN",
    "isPaymentAdmin": true,
    "myPlan": {
      "plan": {
        "key": "typetalk.free",
        "name": "Free Plan",
        "limitNumberOfUsers": 10,
        "limitTotalAttachmentSize": 1073741824
      },
      "enabled": true,
      "trial": null,
      "numberOfUsers": 7,
      "totalAttachmentSize": 0,
      "createdAt": "2016-01-10T02:32:29Z",
      "updatedAt": "2016-01-20T02:32:29Z"
    }
  },
  "team": null,
  "topic": {
    "id": 208,
    "name": "IT Peeps",
    "description": "",
    "suggestion": "IT Peeps",
    "isDirectMessage": false,
    "lastPostedAt": "2014-07-01T02:32:29Z",
    "createdAt": "2014-06-10T02:32:29Z",
    "updatedAt": "2014-06-10T02:32:29Z"
  },
  "bookmark": {
    "postId": 304,
    "updatedAt": "2016-12-21T01:11:42Z"
  },
  "posts": [
    {
      "id": 300,
      "topicId": 208,
      "replyTo": null,
      "message": "Here's an example of a link, images and slide. http://nulab-inc.com https://speakerdeck.com/nulabinc/nulabs-way-of-working-remotely",
      "account": {
        "id": 103,
        "name": "stefhull",
        "fullName": "StefHull",
        "suggestion": "StefHull",
        "imageUrl": "http://typetalk.local:8484/accounts/103/profile_image.png?t=1403836349000",
        "isBot": false,
        "createdAt": "2014-06-27T02:32:29Z",
        "updatedAt": "2014-06-27T02:32:29Z"
      },
      "mention": null,
      "attachments": [
        {
          "attachment": {
            "contentType": "image/jpeg",
            "fileKey": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "fileName": "1.jpg",
            "fileSize": 472263
          },
          "webUrl": "http://typetalk.local:8484/topics/208/posts/300/attachments/1/1.jpg",
          "apiUrl": "http://typetalk.local:8484/api/v1/topics/208/posts/300/attachments/1/1.jpg",
          "thumbnails": [
            {
              "type": "small",
              "fileSize": 16842,
              "width": 480,
              "height": 360
            },
            {
              "type": "medium",
              "fileSize": 23714,
              "width": 800,
              "height": 600
            },
            {
              "type": "large",
              "fileSize": 41130,
              "width": 1024,
              "height": 768
            }
          ]
        },
        {
          "attachment": {
            "contentType": "image/jpeg",
            "fileKey": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
            "fileName": "2.jpg",
            "fileSize": 494376
          },
          "webUrl": "http://typetalk.local:8484/topics/208/posts/300/attachments/2/2.jpg",
          "apiUrl": "http://typetalk.local:8484/api/v1/topics/208/posts/300/attachments/2/2.jpg",
          "thumbnails": [
            {
              "type": "small",
              "fileSize": 8533,
              "width": 480,
              "height": 360
            },
            {
              "type": "medium",
              "fileSize": 26098,
              "width": 800,
              "height": 600
            },
            {
              "type": "large",
              "fileSize": 43551,
              "width": 1024,
              "height": 768
            }
          ]
        },
        {
          "attachment": {
            "contentType": "image/jpeg",
            "fileKey": "cccccccccccccccccccccccccccccccccccccccc",
            "fileName": "5.jpg",
            "fileSize": 218100
          },
          "webUrl": "http://typetalk.local:8484/topics/208/posts/300/attachments/3/5.jpg",
          "apiUrl": "http://typetalk.local:8484/api/v1/topics/208/posts/300/attachments/3/5.jpg",
          "thumbnails": [
            {
              "type": "small",
              "fileSize": 5910,
              "width": 480,
              "height": 20
            },
            {
              "type": "medium",
              "fileSize": 17403,
              "width": 800,
              "height": 33
            },
            {
              "type": "large",
              "fileSize": 34877,
              "width": 1024,
              "height": 43
            }
          ]
        },
        {
          "attachment": {
            "contentType": "image/jpeg",
            "fileKey": "dddddddddddddddddddddddddddddddddddddddd",
            "fileName": "6.jpg",
            "fileSize": 627926
          },
          "webUrl": "http://typetalk.local:8484/topics/208/posts/300/attachments/4/6.jpg",
          "apiUrl": "http://typetalk.local:8484/api/v1/topics/208/posts/300/attachments/4/6.jpg",
          "thumbnails": [
            {
              "type": "small",
              "fileSize": 10439,
              "width": 480,
              "height": 360
            },
            {
              "type": "medium",
              "fileSize": 32664,
              "width": 800,
              "height": 600
            },
            {
              "type": "large",
              "fileSize": 52914,
              "width": 1024,
              "height": 768
            }
          ]
        }
      ],
      "likes": [],
      "talks": [],
      "links": [
        {
          "id": 7,
          "url": "http://nulab-inc.com",
          "contentType": "text/html; charset=UTF-8",
          "title": "Fun. Creative. Collaboration. | Nulab Inc.",
          "description": "We develop collaborative software tools aimed at facilitating effective work communication and collaboration.",
          "imageUrl": "http://nulab-inc.com/ogp_dft.png",
          "embed": null,
          "createdAt": "2016-12-21T01:11:42Z",
          "updatedAt": "2016-12-21T01:11:42Z"
        },
        {
          "id": 8,
          "url": "https://speakerdeck.com/nulabinc/nulabs-way-of-working-remotely",
          "contentType": "text/html; charset=utf-8",
          "title": "Nulab's Way of Working Remotely",
          "description": "Presentation slides at Nulab 10th Anniversary NUCON http://nucon-10th.nulab-inc.com/",
          "imageUrl": "https://speakerd.s3.amazonaws.com/presentations/4445cf303b350132afda224ffdff9a3d/slide_0.jpg",
          "embed": {
            "type": "rich",
            "version": 1,
            "provider_name": "Speaker Deck",
            "provider_url": "https://speakerdeck.com/",
            "title": "Nulab's Way of Working Remotely",
            "author_name": "Nulab Inc.",
            "author_url": "https://speakerdeck.com/nulabinc",
            "html": "<iframe allowfullscreen=\"true\" allowtransparency=\"true\" frameborder=\"0\" height=\"596\" id=\"talk_frame_130304\" mozallowfullscreen=\"true\" src=\"//speakerdeck.com/player/4445cf303b350132afda224ffdff9a3d\" style=\"border:0; padding:0; margin:0; background:transparent;\" webkitallowfullscreen=\"true\" width=\"710\"></iframe>\n",
            "width": 710,
            "height": 596
          },
          "createdAt": "2016-12-21T01:11:42Z",
          "updatedAt": "2016-12-21T01:11:42Z"
        }
      ],
      "createdAt": "2014-06-29T00:32:29Z",
      "updatedAt": "2014-06-29T00:32:29Z"
    },
    {
      "id": 301,
      "topicId": 208,
      "replyTo": null,
      "message": "OK. Moss, what did you have for breakfast this morning?",
      "account": {
        "id": 100,
        "name": "jessica",
        "fullName": "Jessica Fitzherbert",
        "suggestion": "Jessica Fitzherbert",
        "imageUrl": "http://typetalk.local:8484/accounts/100/profile_image.png?t=1403577149000",
        "isBot": false,
        "createdAt": "2014-06-24T02:32:29Z",
        "updatedAt": "2014-06-24T02:32:29Z"
      },
      "mention": null,
      "attachments": [],
      "likes": [],
      "talks": [],
      "links": [],
      "createdAt": "2014-06-30T01:32:29Z",
      "updatedAt": "2014-06-30T01:32:29Z"
    },
    {
      "id": 302,
      "topicId": 208,
      "replyTo": 301,
      "message": "Smarties cereal.",
      "account": {
        "id": 102,
        "name": "moss",
        "fullName": "Moss",
        "suggestion": "Moss",
        "imageUrl": "http://typetalk.local:8484/accounts/102/profile_image.png?t=1403749949000",
        "isBot": false,
        "createdAt": "2014-06-26T02:32:29Z",
        "updatedAt": "2014-06-26T02:32:29Z"
      },
      "mention": null,
      "attachments": [],
      "likes": [
        {
          "id": 400,
          "postId": 302,
          "topicId": 208,
          "comment": null,
          "account": {
            "id": 100,
            "name": "jessica",
            "fullName": "Jessica Fitzherbert",
            "suggestion": "Jessica Fitzherbert",
            "imageUrl": "http://typetalk.local:8484/accounts/100/profile_image.png?t=1403577149000",
            "isBot": false,
            "createdAt": "2014-06-24T02:32:29Z",
            "updatedAt": "2014-06-24T02:32:29Z"
          },
          "createdAt": "2016-12-21T01:11:42Z"
        },
        {
          "id": 401,
          "postId": 302,
          "topicId": 208,
          "comment": null,
          "account": {
            "id": 101,
            "name": "ahorowitz",
            "fullName": "AHorowitz",
            "suggestion": "AHorowitz",
            "imageUrl": "http://typetalk.local:8484/accounts/101/profile_image.png?t=1403663549000",
            "isBot": false,
            "createdAt": "2014-06-25T02:32:29Z",
            "updatedAt": "2014-06-25T02:32:29Z"
          },
          "createdAt": "2016-12-21T01:11:42Z"
        },
        {
          "id": 402,
          "postId": 302,
          "topicId": 208,
          "comment": null,
          "account": {
            "id": 103,
            "name": "stefhull",
            "fullName": "StefHull",
            "suggestion": "StefHull",
            "imageUrl": "http://typetalk.local:8484/accounts/103/profile_image.png?t=1403836349000",
            "isBot": false,
            "createdAt": "2014-06-27T02:32:29Z",
            "updatedAt": "2014-06-27T02:32:29Z"
          },
          "createdAt": "2016-12-21T01:11:42Z"
        }
      ],
      "talks": [],
      "links": [],
      "createdAt": "2014-06-30T04:32:29Z",
      "updatedAt": "2014-06-30T04:32:29Z"
    },
    {
      "id": 303,
      "topicId": 208,
      "replyTo": null,
      "message": "Heard you're single again. All the best, Maurice Moss!",
      "account": {
        "id": 103,
        "name": "stefhull",
        "fullName": "StefHull",
        "suggestion": "StefHull",
        "imageUrl": "http://typetalk.local:8484/accounts/103/profile_image.png?t=1403836349000",
        "isBot": false,
        "createdAt": "2014-06-27T02:32:29Z",
        "updatedAt": "2014-06-27T02:32:29Z"
      },
      "mention": null,
      "attachments": [],
      "likes": [],
      "talks": [],
      "links": [],
      "createdAt": "2014-06-30T14:32:29Z",
      "updatedAt": "2014-06-30T14:32:29Z"
    },
    {
      "id": 304,
      "topicId": 208,
      "replyTo": 303,
      "message": "Yes, I do the whole Lonely Hearts thing! Hello, IT.",
      "account": {
        "id": 102,
        "name": "moss",
        "fullName": "Moss",
        "suggestion": "Moss",
        "imageUrl": "http://typetalk.local:8484/accounts/102/profile_image.png?t=1403749949000",
        "isBot": false,
        "createdAt": "2014-06-26T02:32:29Z",
        "updatedAt": "2014-06-26T02:32:29Z"
      },
      "mention": null,
      "attachments": [],
      "likes": [],
      "talks": [],
      "links": [],
      "createdAt": "2014-06-30T13:32:29Z",
      "updatedAt": "2014-06-30T13:32:29Z"
    },
    {
      "id": 305,
      "topicId": 208,
      "replyTo": null,
      "message": "And I'm a 32 year old IT-man who works in a basement. Word.",
      "account": {
        "id": 104,
        "name": "cooper",
        "fullName": "CooperDaChopper",
        "suggestion": "CooperDaChopper",
        "imageUrl": "http://typetalk.local:8484/accounts/104/profile_image.png?t=1403922749000",
        "isBot": false,
        "createdAt": "2014-06-28T02:32:29Z",
        "updatedAt": "2014-06-28T02:32:29Z"
      },
      "mention": null,
      "attachments": [],
      "likes": [],
      "talks": [
        {
          "id": 901,
          "topicId": 208,
          "name": "2nd talk",
          "suggestion": "2nd talk",
          "createdAt": "2014-07-02T03:52:29Z",
          "updatedAt": "2014-07-02T03:55:29Z",
          "backlog": null
        },
        {
          "id": 900,
          "topicId": 208,
          "name": "About us",
          "suggestion": "About us",
          "createdAt": "2014-07-02T03:42:29Z",
          "updatedAt": "2014-07-02T03:52:29Z",
          "backlog": null
        }
      ],
      "links": [],
      "createdAt": "2014-06-30T14:32:29Z",
      "updatedAt": "2014-06-30T14:32:29Z"
    },
    {
      "id": 306,
      "topicId": 208,
      "replyTo": 305,
      "message": "Oh. What time of the month? The weekend?",
      "account": {
        "id": 100,
        "name": "jessica",
        "fullName": "Jessica Fitzherbert",
        "suggestion": "Jessica Fitzherbert",
        "imageUrl": "http://typetalk.local:8484/accounts/100/profile_image.png?t=1403577149000",
        "isBot": false,
        "createdAt": "2014-06-24T02:32:29Z",
        "updatedAt": "2014-06-24T02:32:29Z"
      },
      "mention": null,
      "attachments": [],
      "likes": [
        {
          "id": 403,
          "postId": 306,
          "topicId": 208,
          "comment": null,
          "account": {
            "id": 101,
            "name": "ahorowitz",
            "fullName": "AHorowitz",
            "suggestion": "AHorowitz",
            "imageUrl": "http://typetalk.local:8484/accounts/101/profile_image.png?t=1403663549000",
            "isBot": false,
            "createdAt": "2014-06-25T02:32:29Z",
            "updatedAt": "2014-06-25T02:32:29Z"
          },
          "createdAt": "2016-12-21T01:11:42Z"
        },
        {
          "id": 404,
          "postId": 306,
          "topicId": 208,
          "comment": null,
          "account": {
            "id": 102,
            "name": "moss",
            "fullName": "Moss",
            "suggestion": "Moss",
            "imageUrl": "http://typetalk.local:8484/accounts/102/profile_image.png?t=1403749949000",
            "isBot": false,
            "createdAt": "2014-06-26T02:32:29Z",
            "updatedAt": "2014-06-26T02:32:29Z"
          },
          "createdAt": "2016-12-21T01:11:42Z"
        },
        {
          "id": 405,
          "postId": 306,
          "topicId": 208,
          "comment": null,
          "account": {
            "id": 103,
            "name": "stefhull",
            "fullName": "StefHull",
            "suggestion": "StefHull",
            "imageUrl": "http://typetalk.local:8484/accounts/103/profile_image.png?t=1403836349000",
            "isBot": false,
            "createdAt": "2014-06-27T02:32:29Z",
            "updatedAt": "2014-06-27T02:32:29Z"
          },
          "createdAt": "2016-12-21T01:11:42Z"
        },
        {
          "id": 406,
          "postId": 306,
          "topicId": 208,
          "comment": null,
          "account": {
            "id": 104,
            "name": "cooper",
            "fullName": "CooperDaChopper",
            "suggestion": "CooperDaChopper",
            "imageUrl": "http://typetalk.local:8484/accounts/104/profile_image.png?t=1403922749000",
            "isBot": false,
            "createdAt": "2014-06-28T02:32:29Z",
            "updatedAt": "2014-06-28T02:32:29Z"
          },
          "createdAt": "2016-12-21T01:11:42Z"
        },
        {
          "id": 407,
          "postId": 306,
          "topicId": 208,
          "comment": null,
          "account": {
            "id": 105,
            "name": "brad",
            "fullName": "BradMarshalls",
            "suggestion": "BradMarshalls",
            "imageUrl": "http://typetalk.local:8484/accounts/105/profile_image.png?t=1404009149000",
            "isBot": false,
            "createdAt": "2014-06-29T02:32:29Z",
            "updatedAt": "2014-06-29T02:32:29Z"
          },
          "createdAt": "2016-12-21T01:11:42Z"
        }
      ],
      "talks": [
        {
          "id": 900,
          "topicId": 208,
          "name": "About us",
          "suggestion": "About us",
          "createdAt": "2014-07-02T03:42:29Z",
          "updatedAt": "2014-07-02T03:52:29Z",
          "backlog": null
        }
      ],
      "links": [],
      "createdAt": "2014-07-01T01:32:29Z",
      "updatedAt": "2014-07-01T01:32:29Z"
    },
    {
      "id": 307,
      "topicId": 208,
      "replyTo": 306,
      "message": "Hope it doesn't sound arrogant but I'm the greatest man in the world!",
      "account": {
        "id": 100,
        "name": "jessica",
        "fullName": "Jessica Fitzherbert",
        "suggestion": "Jessica Fitzherbert",
        "imageUrl": "http://typetalk.local:8484/accounts/100/profile_image.png?t=1403577149000",
        "isBot": false,
        "createdAt": "2014-06-24T02:32:29Z",
        "updatedAt": "2014-06-24T02:32:29Z"
      },
      "mention": null,
      "attachments": [],
      "likes": [
        {
          "id": 408,
          "postId": 307,
          "topicId": 208,
          "comment": null,
          "account": {
            "id": 100,
            "name": "jessica",
            "fullName": "Jessica Fitzherbert",
            "suggestion": "Jessica Fitzherbert",
            "imageUrl": "http://typetalk.local:8484/accounts/100/profile_image.png?t=1403577149000",
            "isBot": false,
            "createdAt": "2014-06-24T02:32:29Z",
            "updatedAt": "2014-06-24T02:32:29Z"
          },
          "createdAt": "2016-12-21T01:11:42Z"
        }
      ],
      "talks": [],
      "links": [],
      "createdAt": "2014-07-01T02:32:29Z",
      "updatedAt": "2014-07-01T02:32:29Z"
    }
  ],
  "hasNext": false,
  "exceedsAttachmentLimit": false
}

All responses are text formatted as JSON, and include ETag. If you call an API with If-None-Match header, the server returns a 304 status code when the data is not changed. The date and time format is ISO 8601 and timezone is UTC (eg. 2014-01-09T06:20:08Z).