GET /api/businesses/{BusinessID}/forum

Returns information about forum entries for a business.

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

Back to top

URL

https://{hostname}/api/businesses/{BusinessID}/forum

Back to top

Sample Request

The examples below show requests for forum entries for the specified business.

Request URL #1

Query parameters limit the results to published discussions.

https://{hostname}/api/businesses/tenantbusiness.acmepaymentscorp/forum?PublishedState=published&ItemType=Discussion&IncludeActions=true&Comments=published

Request URL #2

No query parameters.

https://{hostname}/api/businesses/tenantbusiness.acmepaymentscorp/forum

Request URL #3

Returns unpublished board entries relating to a specific API.

https://{hostname}/api/businesses/tenantbusiness.acmepaymentscorp/forum?SubjectID=d89826df-21c2-4063-8f86-ec84b16769ee.acmepaymentscorp

Request URL #4

Returns all published discussions.

https://{hostname}/api/businesses/tenantbusiness.acmepaymentscorp/forum?PublishedState=published&ItemType=Discussion

Request URL #5

Returns unpublished board entries for the board for a group.

https://{hostname}/api/api/businesses/tenantbusiness.acmepaymentscorp/forum?SubjectID=08bf43f4-1b78-48a4-8729-d549faaad796.acmepaymentscorp

Request URL #6

Returns unpublished board entries authored by a specific user.

https://{hostname}/api/businesses/tenantbusiness.acmepaymentscorp/forum?AuthorId=df492b7e-ce2a-478c-86d2-b0bf09c27e52.acmepaymentscorp

Sample request headers

Accept: application/vnd.soa.v72+json
X-Csrf-Token_acmepaymentscorp":"TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...

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 application/json, application/vnd.soa.v72+json, application/vnd.soa.v80+json, application/vnd.soa.v81+json
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.

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
BusinessID Path string Required The unique ID for a specific business organization on the platform.
ItemType[ ] Query string Optional One or more Board item types. Valid values: discussion, review, all.
SubjectID Query string Optional The subject ID for a specific forum entry. Must be a valid ID for a resource that could be the subject of a forum entry: AppID, AppVersionID, APIID, APIVersionID, or GroupID.
IncludeActions Query boolean Optional

Indicates whether workflow actions currently valid for the resource should be included in the results. Default: false. For valid workflow actions, see Workflow Actions.

Default: true.

start Query integer Optional

The starting point for the comments to be returned, with 0 as the first comment. For example, if there are 73 comments and the start value is 50, comment number 50 is the first to be returned.

Default: 0.

count Query integer Optional

The number of comments to be returned, from the specified starting point. If not specified, all comments associated with the specified discussion are returned. For example, if there are 105 comments and start is 50 with count 50, comments 50-100 are returned.

Default: 20.

SortBy Query string Optional An optional parameter allowing users to sort results by a specific value; for example, com.soa.sort.order.updated sorts with the most updated entries first. For valid values, see Sort By Values. If not specified, items are returned in the sort order of DescendingDate, which means that the most recent items are first.
PublishedState Query string Optional

Indicates whether only items in a specific published state should be returned (either published, or unpublished).

Default: unpublished

AuthorID query string Optional Unique UserID for the author of the forum entry. If specified, only forum entries by a specific user are returned.

Back to top

Response

If successful, this operation returns HTTP status code 200, with the forum entries requested.

Back to top

Sample Response

The sample response below shows successful completion of this operation. In this example, the requestor was not logged in, so only public resources are included in the results.

Sample response headers: application/json

Status Code: 200 OK
Content-Type: application/json
Expires: Mon, 02 Feb 2015 16:36:51 GMT

Sample response body: application/json

{
  "BoardItemDetails" : [ {
    "Type" : "Ticket",
    "Ticket" : {
      "TicketID" : "ticket10278.acmepaymentscorp",
      "Title" : "API Has Backward Compatibility issues",
      "Description" : "The api works fine on old build and faces some problems with the latest build",
      "Environment" : "Production",
      "UserID" : "bc8dd63c-f90a-4a39-b521-6ea7f6493ce9.acmepaymentscorp",
      "Created" : "2015-02-02T21:25:31Z",
      "Label" : [ "com.soa.ticket.label.priority.high" ],
      "Comments" : 3,
      "Marks" : 0,
      "IsMarked" : false,
      "Visibility" : "Public",
      "PubDate" : "2015-02-02T21:25:32Z",
      "Image" : {
        "Url" : "http://{hostname}/api/users/bc8dd63c-f90a-4a39-b521-6ea7f6493ce9.acmepaymentscorp/avatar",
        "Link" : "/user/bc8dd63c-f90a-4a39-b521-6ea7f6493ce9.acmepaymentscorp/details"
      },
      "AuthoringUser" : {
        "UserID" : "bc8dd63c-f90a-4a39-b521-6ea7f6493ce9.acmepaymentscorp",
        "Name" : "TicketCreatorEmployee",
        "Image" : {
          "Url" : "http://{hostname}/api/users/bc8dd63c-f90a-4a39-b521-6ea7f6493ce9.acmepaymentscorp/avatar",
          "Title" : "TicketCreatorEmployee",
          "Link" : "/users/bc8dd63c-f90a-4a39-b521-6ea7f6493ce9.acmepaymentscorp/details"
        }
      },
      "Published" : true
    },
    "TargetResources" : {
      "TargetResource" : [ {
        "Name" : "PublicApiEA511a1",
        "ID" : "e70dcffe-fea0-45ce-a15d-2e5324019b12.acmepaymentscorp",
        "Type" : "api",
        "Image" : {
          "Url" : "http://{hostname}/api/apis/e70dcffe-fea0-45ce-a15d-2e5324019b12.acmepaymentscorp/avatar"
        }
      }, {
        "Name" : "123e",
        "ID" : "3ef349b1-6579-420e-af30-86c6f8ef11b5.acmepaymentscorp",
        "Type" : "apiversion"
      }, {
        "Name" : "TicketCreatorEmployee",
        "ID" : "bc8dd63c-f90a-4a39-b521-6ea7f6493ce9.acmepaymentscorp",
        "Type" : "user"
      } ]
    }
  } ]
}

Back to top

Response Headers

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

Header Description
Content-Type application/json, application/vnd.soa.v72+json, application/vnd.soa.v80+json, application/vnd.soa.v81+json

Back to top

Response Body

Name Type Description
BoardItemList BoardItemList Contains information about board items.

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
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics