GET /api/messages/:message_id/comments/:id

get an individual comment

Success Response Code: 200

Params

Param name Description
message_id
optional

id of the message to which the comment belongs


Value: Must be a Integer
id
optional

id of the comment to retrieve


Value: Must be a Integer

Response Fields

comment[id] unique id for the comment Integer
comment[text] comment body String
comment[url] url to access the comment String
comment[permalink_url] url to access the web form of this comment String
comment[user] information about the comment's author Hash<User>
comment[created_at] datetime stamp for when the comment was originally created DateTime
comment[editable] flag to notify clients if the comment is editable by the current user Boolean
comment[detetable] flag to notify clients if the comment is deletable by the current user Boolean
comment[likable] flag to notify clients if the comment is likable by the current user Boolean
comment[likes] likes for this comment Array<Like>
comment[likes_count] total number of likes for this comment Integer
comment[attachments] files attached to this comment Array<Attachment>
comment[external_resources] url links associated with this comment, which can include oembed data. Array<ExternalResource>

Example Curl Commands

curl -X GET -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/messages/424/comments/85.json"

Examples

GET 
200
{
  "comment": {
    "id": 3,
    "url": "https://socialcast.socialcast.test/api/messages/17/comments/3",
    "user": {
      "id": 72,
      "first_name": "J'øhn67",
      "last_name": "D'øe67",
      "name": "J'øhn67 D'øe67",
      "html_name": "J&#39;øhn67 D&#39;øe67",
      "url": "https://socialcast.socialcast.test/users/72-j%C3%B8hn67d%C3%B8e67",
      "avatars": {
        "is_system_default": true,
        "id": null,
        "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square16-3b951350d61d203ece2fa5dd274fa7bd35275e132c17310d9006514f8839c857.png",
        "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square30-6db66ac25c338d1e548a68465e2723ff63367c2aafbcc01db24c83964056b892.png",
        "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square45-16865426333e244c59076d4f2475b711ed1ff9d12c97f4cf354f373a0170a1fd.png",
        "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square70-1708999e8f1fea583408d7fc64b2177f853e4123bea2ffcf35f4839c8697e0ba.png",
        "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square140-7da7e1d98b33ef152280b1f653cfd80e2db24b01b625a72abc320673eea5af53.png"
      },
      "username": "Jøhn67Døe67",
      "active": true,
      "terminated": false,
      "inactive": false,
      "role": "member",
      "type": "User",
      "title": null,
      "out_of_office": false,
      "out_of_office_on": null,
      "back_in_office_on": null,
      "company_login": null
    },
    "text": "http://www.youtube.com/watch?v=MjIyETGKvG0",
    "html_body": "<div class=\"markdown-body\"><p><a href=\"http://www.youtube.com/watch?v=MjIyETGKvG0\" title=\"http://www.youtube.com/watch?v=MjIyETGKvG0\">www.youtube.com/watch?v=MjIyETGKvG0</a></p></div>",
    "created_at": "2017-03-24T11:28:16-07:00",
    "updated_at": "2017-03-24T11:28:19-07:00",
    "attachments": [],
    "media_files": [],
    "permalink_url": "https://socialcast.socialcast.test/messages/17/comments/3",
    "editable": true,
    "deletable": true,
    "likable": false,
    "external_resources": [
      {
        "id": 2,
        "url": "http://www.youtube.com/watch?v=MjIyETGKvG0",
        "title": "Socialcast Product Overview: Communication + Collaboration",
        "description": null,
        "canonical_hashtag": null,
        "type": null,
        "source": {
          "name": "YouTube",
          "url": "http://www.youtube.com/"
        },
        "tags": [],
        "oembed": {
          "version": "1.0",
          "provider_name": "YouTube",
          "provider_url": "http://www.youtube.com/",
          "url": "http://www.youtube.com/watch?v=MjIyETGKvG0",
          "title": "Socialcast Product Overview: Communication + Collaboration",
          "type": "video",
          "thumbnail_url": "https://s3.amazonaws.com/socialcast_test/tenants/1/media_files/2/hqdefault_stream_square.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170321%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170321T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=ddf9b3fff39d8cad635f1e43f1de1d950ce0d9d9f225b3b117eeb2db1f5cb7e7",
          "html": "<iframe width=\"480\" height=\"270\" src=\"http://www.youtube.com/embed/MjIyETGKvG0?feature=oembed\" frameborder=\"0\" allowfullscreen></iframe>",
          "width": 480,
          "height": 270,
          "thumbnail_width": 75,
          "thumbnail_height": 75,
          "author_url": "http://www.youtube.com/user/SocialcastByVMware",
          "author_name": "Socialcast Enterprise Social Networking",
          "description": null
        },
        "media_files": [
          {
            "id": 2,
            "canonical": true,
            "title": "Socialcast Product Overview: Communication + Collaboration",
            "description": null,
            "file_name": "hqdefault.jpg",
            "thumbnails": {
              "stream": "https://s3.amazonaws.com/socialcast_test/tenants/1/media_files/2/hqdefault_stream.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170321%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170321T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=32f77f6e6c28cfa9b5b77f72a09321087db2fa2b98720dc16a8cc437954c144f",
              "stream_square": "https://s3.amazonaws.com/socialcast_test/tenants/1/media_files/2/hqdefault_stream_square.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170321%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170321T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=ddf9b3fff39d8cad635f1e43f1de1d950ce0d9d9f225b3b117eeb2db1f5cb7e7",
              "square45": "https://s3.amazonaws.com/socialcast_test/tenants/1/media_files/2/hqdefault_square45.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170321%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170321T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=14b60eb67a30336e6ed92cc23a73ca6087404dcabb2c9ed30ba8b9385f36b9dd",
              "scaled480": "https://s3.amazonaws.com/socialcast_test/tenants/1/media_files/2/hqdefault_scaled480.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170321%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170321T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=29f500d2f4a39fe674083c30ed0656cd422e1118e638a9bd21da095415dbf1cd"
            },
            "thumbnail_metadata": {
              "stream": {
                "width": 50.0,
                "height": 64.0
              },
              "stream_square": {
                "width": 75.0,
                "height": 75.0
              },
              "square45": {
                "width": 45.0,
                "height": 45.0
              },
              "scaled480": {
                "width": 50.0,
                "height": 64.0
              }
            },
            "width": 50,
            "height": 64,
            "page_url": "http://www.youtube.com/watch?v=MjIyETGKvG0",
            "url": "https://s3.amazonaws.com/socialcast_test/tenants/1/media_files/2/hqdefault.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=stubbed-akid%2F20170321%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170321T234500Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=ffa510a3eb75440f3d6514c6d12940745876e51c1a3788ae5375ea4ab8d84543",
            "content_type": "image/png",
            "attachment_id": null
          }
        ]
      }
    ],
    "likes_count": 0,
    "likes": [],
    "thumbnail_url": null
  }
}