GET /api/discussions

Returns a list of discussions that match specified filter criteria, as an RSS feed.

Note: GET /api/discussions (list discussions, with custom Accept header) returns the same information as a JSON object. We recommend using that operation rather than this one.

Authorization Roles/Permissions: Anyone can use this operation; login is not required. However, note that for any operations that do not require login, information about private resources is not returned unless the user is logged in and is authorized to view information about those resources. Without login, only public information is returned. However, the results are restricted according to the user's permissions. When the user is not logged in, information about private resources is not returned.

This topic includes the following sections:

HTTP Method

GET

Back to top

URL

https://{hostname}/api/discussions[?DiscussionSubjectID={DiscussionSubjectID}][&ItemID={ItemID}][&Tag={Tag}]
[&SortBy={SortBy}][&IncludeComments={IncludeComments}][&NumberOfComments={NumberOfComments}][&count={count}]

Back to top

Sample Request

Request URL #1

>The example below shows a request for the discussion items relating to a specific API version.

https://{hostname}/api/discussions?DiscussionSubjectID=f8e35097-f3e7-4583-9f6b-f25c7fe0e632.acmepaymentscorp

Request URL #2

The example below shows a request for a specific discussion.

https://{hostname}/api/discussions?ItemID=discussion11019.acmepaymentscorp

Sample request headers

Accept: application/json

Sample request body

Not applicable.

Back to top

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept text/xml, application/rss+xml, or application/json

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
DiscussionSubjectID Query string Optional The unique ID for the specific resource that a discussion relates to; for example, the AppVersionID, APIVersionID, GroupID, or a custom BoardID. Use this if you only want information about discussions for a specific resource such as an app version or API version.
DiscussionType Query string Optional The type of discussion. No longer in use.
RetrievingUserID Query string Optional The ID of the user retrieving the discussion information.
IncludeAPIDiscussions Query boolean Optional Indicates whether API discussions should be included in the information returned. Default: true. If set to false, API discussions are excluded.
IncludeAppDiscussions Query boolean Optional Indicates whether app discussions should be included in the information returned. Default: false. If set to true, app discussions are included.
IncludeBoardDiscussions Query boolean Optional Indicates whether Board discussions should be included in the information returned. Default: false. If set to true, Board discussions are included.
IncludeGroupDiscussions Query boolean Optional Indicates whether group discussions should be included in the information returned. Default: false. If set to true, group discussions are included.
AuthorID Query string Optional The unique ID for the author of a discussion. If this parameter is included, only discussions created by this author are included in the results.
ItemID Query string Optional The unique ID for a specific forum entry.
Tag Query string Optional Name of a specific discussion tag, if information relating to only a specific tag is required.
IncludeComments Query boolean Optional Indicates whether comments should be included in the information returned. Default: true. If set to false, comments are excluded.
NumberOfComments Query integer Optional The number of comments to be returned (if IncludeComments is not set to false). Default value: 2.
count Query integer Optional The number of results to be returned, from the specified starting point. If not specified, all matching results are returned.
IncludeSelfAuthored Query string Optional

Indicates whether resources authored by the requestor should be included.

Default: true.

PublishedState Query string Optional

Indicates that only resources in a specific state should be returned. Valid values: published or unpublished.

Default: published, indicating that only resources that have been published are returned.

IncludeActions Query boolean Optional Indicates whether workflow actions currently valid for the resource should be included in the results. Default: true. For valid workflow actions, see Workflow Actions.

Back to top

Response

If successful, this operation returns HTTP status code 200, with the discussion list. The information is sent as an RSS feed.

Back to top

Sample Response

The sample response below shows the response to sample request #1.

Sample response headers: application/json

Status Code: 200 OK
Content-Type: application/json
Expires: Mon, 11 May 2015 16:10:25 GMTT

Sample response body: application/json

{
  "channel" : {
    "title" : "",
    "link" : "../acmepaymentscorp#/forum/discussions",
    "description" : "",
    "startIndex" : 0,
    "itemsPerPage" : 1,
    "item" : [ {
      "title" : "Call for feature requests ",
      "description" : "We are planning for our next release. Feature requests welcome! 
\n\n![image](http://{hostname}/api/boards/items/063fe661-a74f-40d2-a242-9d49ec426e81.acmepaymentscorp/img_dollars.jpg 
\"img_dollars.jpg\")\n\nCash prizes for the first five suggestions that we use!",
      "category" : [ {
        "value" : "DISCUSSION",
        "domain" : "uddi:soa.com:resourcetype"
      }, {
        "value" : "com.soa.discussion.type.comment",
        "domain" : "uddi:soa.com:discussiontype"
      }, {
        "value" : "true",
        "domain" : "uddi:soa.com:published"
      }, {
        "value" : "true",
        "domain" : "uddi:soa.com:published"
      }, {
        "value" : "text/markdown",
        "domain" : "uddi:soa.com:descriptionmediatype"
      }, {
        "value" : "com.soa.board.item.closed",
        "domain" : "uddi:soa.com:state"
      }, {
        "value" : "Published",
        "domain" : "uddi:soa.com:wfstate"
      } ],
      "guid" : {
        "value" : "063fe661-a74f-40d2-a242-9d49ec426e81.acmepaymentscorp"
      },
      "pubDate" : "Mon, 11 May 2015 20:29:53 +0000",
      "BoardItemArtifacts" : {
        "BoardItemArtifact" : [ {
          "ContextID" : "063fe661-a74f-40d2-a242-9d49ec426e81.acmepaymentscorp",
          "FileName" : "img_dollars.jpg",
          "BaseUri" : "http://{hostname}",
          "UriPath" : "/api/boards/items/063fe661-a74f-40d2-a242-9d49ec426e81.acmepaymentscorp/img_dollars.jpg"
        } ]
      },
      "AuthoringUser" : {
        "ID" : "8dba2d85-1108-417f-ad81-7a369e9e5d79.acmepaymentscorp",
        "Name" : "JaneMead",
        "Image" : {
          "Url" : "http://{hostname}/api/users/8dba2d85-1108-417f-ad81-7a369e9e5d79.acmepaymentscorp/avatar",
          "Title" : "JaneMead",
          "Link" : "#/users/8dba2d85-1108-417f-ad81-7a369e9e5d79.acmepaymentscorp/details"
        }
      },
      "Image" : {
        "Url" : "http://{hostname}/api/users/8dba2d85-1108-417f-ad81-7a369e9e5d79.acmepaymentscorp/avatar"
      },
      "CreatedDate" : "Mon, 11 May 2015 20:29:53 +0000",
      "Actions" : {
        "Action" : [ {
          "value" : "discussion.action.unpublish",
          "label" : "discussion.action.unpublish"
        }, {
          "value" : "discussion.action.delete",
          "label" : "discussion.action.delete"
        } ]
      },
      "Marks" : {
        "Count" : 0,
        "IsMarkedByReader" : false
      },
      "CommentsPreview" : {
        "Count" : 0,
        "Comment" : [ ]
      },
      "EntityReference" : [ {
        "Title" : "ACME Payments API",
        "Guid" : "2f8d7e07-d23c-4f28-9129-02163c032bc7.acmepaymentscorp",
        "Category" : [ {
          "value" : "api",
          "domain" : "uddi:soa.com:resourcetype"
        } ]
      }, {
        "Title" : "1.0",
        "Guid" : "ecbf7010-abcf-41f8-9f52-1c02b3a51984.acmepaymentscorp",
        "Category" : [ {
          "value" : "apiversion",
          "domain" : "uddi:soa.com:resourcetype"
        } ]
      } ]
    } ]
  },
  "version" : "1.0"
}

Back to top

Sample response headers: text/xml

Status Code: 200 OK
Content-Type: text/xml
Expires: Mon, 11 May 2015 16:11:59 GMT

Sample response body: text/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss xmlns:ns2="http://soa.com/xsd/business/1.0" xmlns:ns3="http://soa.com/xsd/user/1.0" 
xmlns:ns4="http://soa.com/xsd/rss/1.0" xmlns:ns5="http://soa.com/xsd/comment/1.0" 
xmlns:ns6="http://a9.com/-/spec/opensearch/1.1/" xmlns:ns7="http://soa.com/xsd/dnmodel/1.0" 
xmlns:ns8="http://soa.com/xsd/resource/1.0" xmlns:ns9="http://soa.com/xsd/legals/1.0" 
xmlns:ns10="http://soa.com/xsd/fault/1.0" xmlns:ns11="http://soa.com/xsd/api/1.0" 
xmlns:ns12="http://soa.com/xsd/board/1.0" xmlns:ns13="http://soa.com/xsd/alert/1.0" 
xmlns:ns14="http://soa.com/xsd/contract/1.0" xmlns:ns15="http://soa.com/xsd/ticket/1.0" 
xmlns:ns16="http://soa.com/xsd/app/1.0" xmlns:ns17="http://soa.com/xsd/discussion/1.0" 
xmlns:ns18="http://soa.com/xsd/review/1.0" xmlns:ns19="http://soa.com/xsd/search/1.0" 
xmlns:ns20="http://soa.com/xsd/workflow/1.0" 
xmlns:ns21="http://soa.com/xsd/client/services/1.0" version="1.0">
  <channel>
    <title></title>
    <link>../acmepaymentscorp#/forum/discussions</link>
    <description></description>
    <ns6:startIndex>0</ns6:startIndex>
    <ns6:itemsPerPage>1</ns6:itemsPerPage>
    <item>
      <title>Call for feature requests </title>
      <description>We are planning for our next release. Feature requests welcome! 

![image](http://{hostname}/api/boards/items/063fe661-a74f-40d2-a242-9d49ec426e81.acmepaymentscorp/img_dollars.jpg "img_dollars.jpg")
Cash prizes for the first five suggestions that we use!</description>
      <category domain="uddi:soa.com:resourcetype">DISCUSSION</category>
      <category domain="uddi:soa.com:discussiontype">com.soa.discussion.type.comment</category>
      <category domain="uddi:soa.com:published">true</category>
      <category domain="uddi:soa.com:published">true</category>
      <category domain="uddi:soa.com:descriptionmediatype">text/markdown</category>
      <category domain="uddi:soa.com:state">com.soa.board.item.closed</category>
      <category domain="uddi:soa.com:wfstate">Published</category>
      <guid>063fe661-a74f-40d2-a242-9d49ec426e81.acmepaymentscorp</guid>
      <pubDate>Mon, 11 May 2015 20:29:53 +0000</pubDate>
      <ns4:Image>
        <Url>http://{hostname}/api/users/8dba2d85-1108-417f-ad81-7a369e9e5d79.acmepaymentscorp/avatar</Url>
      </ns4:Image>
      <ns4:CreatedDate>Mon, 11 May 2015 20:29:53 +0000</ns4:CreatedDate>
      <ns4:Marks>
        <Count>0</Count>
        <IsMarkedByReader>false</IsMarkedByReader>
      </ns4:Marks>
      <ns5:CommentsPreview>
        <ns5:Count>0</ns5:Count>
      </ns5:CommentsPreview>
      <ns4:AuthoringUser>
        <ID>8dba2d85-1108-417f-ad81-7a369e9e5d79.acmepaymentscorp</ID>
        <Name>JaneMead</Name>
        <ns4:Image>
          <Url>http://{hostname}/api/users/8dba2d85-1108-417f-ad81-7a369e9e5d79.acmepaymentscorp/avatar</Url>
          <Title>JaneMead</Title>
          <Link>#/users/8dba2d85-1108-417f-ad81-7a369e9e5d79.acmepaymentscorp/details</Link>
        </ns4:Image>
      </ns4:AuthoringUser>
      <ns4:EntityReference>
        <Title>ACME Payments API</Title>
        <Guid>2f8d7e07-d23c-4f28-9129-02163c032bc7.acmepaymentscorp</Guid>
        <ns4:Category domain="uddi:soa.com:resourcetype">api</ns4:Category>
      </ns4:EntityReference>
      <ns4:EntityReference>
        <Title>1.0</Title>
        <Guid>ecbf7010-abcf-41f8-9f52-1c02b3a51984.acmepaymentscorp</Guid>
        <ns4:Category domain="uddi:soa.com:resourcetype">apiversion</ns4:Category>
      </ns4:EntityReference>
      <ns12:BoardItemArtifacts>
        <ns12:BoardItemArtifact>
          <ns12:ContextID>063fe661-a74f-40d2-a242-9d49ec426e81.acmepaymentscorp</ns12:ContextID>
          <ns12:FileName>img_dollars.jpg</ns12:FileName>
          <ns12:BaseUri>http://{hostname}</ns12:BaseUri>
          <ns12:UriPath>/api/boards/items/063fe661-a74f-40d2-a242-9d49ec426e81.acmepaymentscorp/img_dollars.jpg</ns12:UriPath>
        </ns12:BoardItemArtifact>
      </ns12:BoardItemArtifacts>
      <ns4:Actions>
        <ns4:Action label="discussion.action.unpublish">discussion.action.unpublish</ns4:Action>
        <ns4:Action label="discussion.action.delete">discussion.action.delete</ns4:Action>
      </ns4:Actions>
    </item>
  </channel>
</rss>

Back to top

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type text/xml, application/rss+xml, or application/json

Back to top

Response Body

The response body is in the form of an RSS channel, and includes the items listed below. The RSS version is 1.0. The channel includes a link to the Board for the discussion and also paging values: StartIndex, TotalResults (if applicable), and ItemsPerPage. Each item in the channel represents a discussion, and includes the information listed below.

Name Description
title The text title of the discussion.
link A link to the Board for the discussion.
description A text description, if applicable.
category[ ]

An array of sets of two name/value pairs, each including Value and Domain, with a value for each. For example:

"value" : "DISCUSSION",
"domain" : "uddi:soa.com:resourcetype"

The example above indicates that the item is a discussion.

"value" : "event",
"domain" : "uddi:soa.com:tag"

The example above indicates that the item has the word "event" as one of the tags.

GUID GUID for the dscussion; the DiscussionID.
pubdate The date/timestamp when the information was generated.
AuthoringUser

Information about the user who authored the discussion, including:

  • ID: the unique UserID
  • Name: The user's name as it appears in the platform
  • Image: Information about the user's image, including URL, Title, and Link
Image Information about the image for the resource that the discussion is associated with, including URL and link.
CreatedDate The date/timestamp when the information was generated.
BoardItemArtifacts Information about artifacts associated with the Board item, such as images uploaded in markdown text.
Actions

A list of valid workflow actions available on the discussion. For example:

"value" : "discussion.action.unpublish",
"label" : "discussion.action.unpublish"

The example above indicates that the discussion can be unpublished.

"value" : "discussion.action.delete",
"label" : "discussion.action.delete"

The example above indicates that the discussion can be deleted.

Marks Information about marks on the discussion, including a numeric count and a boolean value, IsMarkedByReader, indicating whether the current user (if a user is logged in) marked the discussion.
CommentsPreview Information about comments on the discussion, including a numeric count and information about each comment, if applicable.
EntityReference

An array of one or more entity references for the discussion. Each includes:

  • Title
  • GUID: the unique ID for the item.
  • Category: an array of name/value pairs with information about the category for the discussion.

Back to top

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics