Skip to main content

 Services

Web services from /about to /webhooks

get group discussion

/groups/{group}/discussions/{discussion} [GET]

Description

Return a single discussion from the group specified in the URL.

Parameters

NameDescriptionRequiredTypeDefault value
commentsThe comments to include, can be none, first, last, all, archive nostringall
discussionsizeThe maximum number of comments to return per discussionnolong1000

Permission

This service is restricted to guest and higher. If the group is public, anyone can invoke it.

Response

This service returns a single discussion as a <discussion> element.

<discussion id="288"
            title="original"
            replycount="3"
            lastcommentid="292"
            lastcommentdate="2017-02-22T09:21:48+11:00">
  <comment id="288"
           contentrole="Comment"
           created="2017-02-21T15:32:35+11:00">
    <title>original</title>
    <author id="1"
            firstname="John"
            surname="Smith"
            username="jsmith"
            status="activated">
            <fullname>John Smith</fullname>
    </author>
    <content type="text/plain">Original Document</content>
  </comment>
  <comment id="289"
           contentrole="Comment"
           created="2017-02-21T15:32:59+11:00">
    <title>original</title>
    <author id="1" ...> ... </author>
    <content type="text/plain">First Reply</content>
  </comment>
  <comment id="290"
           contentrole="Comment"
           created="2017-02-21T15:33:07+11:00">
    <title>original</title>
    <author id="1" ...> ... </author>
    <content type="text/plain">Second Reply</content>
  </comment>
  <comment id="292"
           contentrole="Comment"
           created="2017-02-22T09:21:48+11:00">
    <title>original</title>
    <author>
      <fullname>Jane Brown</fullname>
    </author>
    <content type="text/plain">TestComment</content>
  </comment>
</discussion>

By default, all discussions and comments are included.

Effect of comments parameter

If comments is first:

<discussion id="288"
            title="original"
            lastcommentid="292"
            lastcommentdate="2017-02-22T09:21:48+11:00">
  <comment id="288"
           contentrole="Comment"
           created="2017-02-21T15:32:35+11:00">
    <title>original</title>
    <author id="1" ...> ... </author>
    <content type="text/plain">Original Document</content>
  </comment>
</discussion>

If comments is last:

<discussion id="288"
            title="original"
            replycount="3"
            lastcommentid="292"
            lastcommentdate="2017-02-22T09:21:48+11:00">
  <comment id="292"
           contentrole="Comment"
           created="2017-02-22T09:21:48+11:00">
    <title>original</title>
    <author>
      <fullname>Jane Brown</fullname>
    </author>
    <content type="text/plain">TestComment</content>
  </comment>
</discussion>

If comments is archive:

<discussion id="288"
            title="original"
            replycount="3"
            lastcommentid="292"
            lastcommentdate="2017-02-22T09:21:48+11:00">
  <comment id="288"
             contentrole="Comment"
             created="2017-02-21T15:32:35+11:00">
        <title>original</title>
        <author id="1" ...> ... </author>
        <content type="text/plain">Original Document</content>
  </comment>
  <comment id="289"
             contentrole="Comment"
             created="2017-02-21T15:32:59+11:00">
        <title>original</title>
        <author id="1"> ... </author>
        <content type="text/plain">First Reply</content>
  </comment>
  <comment id="290"
             contentrole="Comment"
             created="2017-02-21T15:33:07+11:00">
    <title>original</title>
    <author id="1"> ... </author>
    <content type="text/plain">Second Reply</content>
  </comment>
  <comment id="291"
           contentrole="archive-File Attachment"
           created="2017-02-21T15:34:32+11:00">
    <title>original</title>
    <author>
      <fullname>Jane Brown</fullname>
    </author>
    <modifiedby id="1"
                firstname="First Name"
                surname="Surname"
                username="Username"
                status="activated"
                date="2017-02-21T15:35:01+11:00">
      <fullname>Adriano Akaishi</fullname>
    </modifiedby>
    <content type="text/plain">comment</content>
    <attachment>
      <uri id="32"
           scheme="https"
           host="www.facebook.com"
           port="443"
           path="/"
           decodedpath="/"
           external="true"
           mediatype=""
           created="2017-02-15T09:51:42+11:00"
           modified="2017-02-15T09:51:42+11:00">
        <displaytitle>https://www.facebook.com/</displaytitle>
      </uri>
    </attachment>
  </comment>
  <comment id="292"
           contentrole="Comment"
           created="2017-02-22T09:21:48+11:00">
    <title>original</title>
    <author>
      <fullname>Jane Brown</fullname>
    </author>
    <content type="text/plain">TestComment</content>
    </comment>
</discussion>

If comments is none:

<discussion id="288"
            title="original"
            lastcommentid="292"
            lastcommentdate="2017-02-22T09:21:48+11:00">
</discussion>

Error Handling

CodeCause / Description
0x1316The discussion was not found
0x0202The group was not found
Created on , last edited on