GET api/v2.0/Discussions/GetPagedDiscussionPosts?communityKey={communityKey}&maxRecords={maxRecords}&continuationToken={continuationToken}&fieldList={fieldList}
Administrator-only endpoint. Provides a customizable and paged list of Discussion Post Properties. The paging mechanism is a 'continuationToken' that is comprised of a DateTime and DiscussionPostId that informs the query engine which DiscussionPost was last retrieved. The Response will include a standard 'Link' Header that will include rel="next" to denote the Uri to be utilized for the next page in the sequence. Paging relies on the continuationToken property to determine the next set of requested DiscussionPosts, as page size may vary depending upon the "maxRecords" value requested by the client.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
communityKey |
Filters the Discussion Posts by the specified Community. Note that not all Communities have Discussions, and in this case, a null Response will be returned. |
globally unique identifier |
Required |
maxRecords |
Maximum number of records to return in the Response. Has an upper limit of 500 per page request. |
integer |
Default value is 50 |
continuationToken |
Optional - if absent, will return the first page of data. Comprised of a format of "{DateTime}_{DiscussionPostId}" used to determine how to retrieve the requested page of data. {DateTime} is the PostDate and {DiscussionPostId} is the DiscussionPostId of the last DiscussionPost seen. |
string |
None. |
fieldList |
Comma-separated string comprised of data fields to return in the Response. Fields that aren't found will be returned with a value of null. |
string |
Default value is DiscussionPostKey,DiscussionPostId,DiscussionName,DatePosted |
Body Parameters
None.
Response Information
Resource Description
Page of Discussion Post Data for the specified community.
DiscussionPostPageName | Description | Type | Additional information |
---|---|---|---|
CommunityKey |
Unique Community Identifier for the Discussion. |
globally unique identifier |
None. |
RecordCount |
Number of records being returned. |
integer |
None. |
DiscussionPostData |
Discussion data requested. |
Collection of Object |
None. |
Response Formats
application/json, text/json
{ "CommunityKey": "c0281dea-5373-483d-991b-0c6a14a60381", "RecordCount": 1, "DiscussionPostData": [ {}, {} ] }
application/xml, text/xml
<DiscussionPostPage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise.Discussions"> <CommunityKey>c0281dea-5373-483d-991b-0c6a14a60381</CommunityKey> <DiscussionPostData xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:anyType /> <d2p1:anyType /> </DiscussionPostData> <RecordCount>1</RecordCount> </DiscussionPostPage>