This API returns a list of a post's messages. Note: Use nextPageUrl and prevPageUrl from the response data for query pagination.

URL Parameters

NameDescriptionLocationRequiredDefault Value
postIdUnique identifier of the post.PathYes
sizeThe number of messages in the response data.QueryNo30
pagerefReadonly. This parameter is not used by Spaces and is only a reference. i.e.: the value sent will be the same value returned.queryNo
nextRefObjIdThe post ID used for finding the next message.QueryNo
prevRefObjIdThe post ID used for finding the previous message.QueryNo

Body Parameters

None.

Authentication

JwtAuthenticator, Oauth2Authenticator, AnonymousAuthenticator

Authorization

PERM_TOPIC_READ

Example Request

URL

GET https://spacesapis.zang.io/api/ideas/{postId}/messages

Headers

Authorization: "jwt eyJhbGciOiJSUzI1NiIsIdfgdfgnR5cCI6IkpXVCJ9.eyJ1c2VyX2lkX3NpZyI6ImxPWHpxNzVzR3J3X0xwWEMyRGRMakhyYXJlWVhyTzFMdEZHZkhkOWNkTXciLCJwcm9kdWN0X3R5cGUiOiJhY2NvdW50cyIsImxhc3R1cGRhdGV0aW1lIjoiMjAxNy0wMS0zMFQxMzo1ODo0Ny4yMDYiLCJpc3MiOiJ6YW5nLmlvIiwicHVibGlja2V5aWQiOiJhZ3h6Zm05dVpYTnVZVEl3TVRSeUdnc1NEVWRLZDNSUWRXSnNhV05MWlhrdfgdWdJQ2dsUEtFakFvTSIsImV4cCI6MTQ5NTM5MTIwMywidXNlcl9pZCI6ImFneHpmbTl1WlhOdVlUSXdNVFJ5RVFzU0JGVnpaWElZZ0lEQXMtX25fUW9NIiwidmVyIjoiMi4wIn0.SqZpw1uPIebqW3qlDsm0-DWYFKEH0SgPwtD-tSESWOF-5hLkZMqJH28ooWux2S7s9riIew7pTVPnZpTgJa5zHcEAG0gXSEJVOqmpGp_4ufM8YtZoZMpBFjyAkwyAt-ILkGUYIo0GU5WyzMPLV8YLXfgdfgOgkE2MGGOajBkjPmC2Db3pA0D0M9k-21EL1gwWBC5YIq0PDAkgulegwl6khRmB8irJQ-dfg-d-KV9eYfFpsCdJKRGzSfqg"

Or

Authorization: "bearer f746696f5de4528u128ae2f274eea253e8a7943a"

Example Response

{
  "data": [
    {
      "_id": "58ebebf6e6cac84ae5a06811",
      "category": "chat",
      "topicId": "5890b188b1021d1d23a00815",
      "modified": null,
      "content": {
        "bodyText": "1231231",
        "description": "",
        "data": []
      },
      "created": "2017-04-10T20:32:54.469Z",
      "sender": {
        "_id": "5890b1243bab0e18ff044943",
        "type": "user",
        "username": "patrickhan@esna.com",
        "displayname": "Patrick-123 Han-han",
        "picture_url": "https://storage.googleapis.com/onesnatesting/pictures/pfpic_user_287f310f-aba5-4879-a18e-247c07c4894a",
        "gender": "",
        "addresses": [],
        "phone_numbers": [],
        "name": {
          "familyname": "Han-han",
          "formatted": "",
          "givenname": "Patrick-123",
          "honorific_prefix": "",
          "honorific_suffix": "",
          "middlename": "",
          "pronunciation": "",
          "pronunciation_url": ""
        }
      },
      "likeCount": 0,
      "chatCount": 0,
      "parentMsg": {
        "_id": "58a777f68f0120664e0dea45",
        "bodyText": "hj,hj",
        "category": "idea"
      }
    }
  ],
  "nextPageUrl": "/api/ideas/58a777f68f0120664e0dea45/messages?size=1&pageref=2&nextRefObjId=58ebebf6e6cac84ae5a06811",
  "previousPageUrl": "",
  "total": 1
}