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: Must be logged in and have permission to view the requested resources. If the user is logged in but doesn't have permission to view certain resources, the operation works, but limited (or empty) results are returned.
This topic includes the following sections:
HTTP Method
GET
URL
https://{hostname}/api/discussions[?DiscussionSubjectID={DiscussionSubjectID}][&ItemID={ItemID}][&Tag={Tag}] [&SortBy={SortBy}][&IncludeComments={IncludeComments}][&NumberOfComments={NumberOfComments}][&count={count}]
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.
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 |
Cookie | AtmoAuthToken_{fedmemberid}={cookie value, which usually starts with TokenID}—The platform cookie. This is the Akana API Platform authorization token, and must be sent with every API request that requires login. For more information and an example, see Session cookies. |
X-Csrf-Token_{fedmemberID} | The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login. |
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. |
Response
If successful, this operation returns HTTP status code 200, with the discussion list. The information is sent as an RSS feed.
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" }
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 |
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:
|
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:
|
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.