Skip to content

API routes

ePascalC edited this page Jun 7, 2017 · 13 revisions

Overview

The following routes will be created (so under example.com/wp-json/bbp-api/v1/):

  • /forums
  • /forums/id
  • /topics
  • /topics/id
  • /replies
  • /replies/id
  • /topic-tags
  • /topic-tags/topic-tag-name
  • /users
  • /users/user/topics
  • /stats

Details:

/bbp-api/v1/forums/999

For now: {
"id":999,
"title":"Beer",
"parent":888,
"topic_count":"6",
"reply_count":"14",
"permalink":"http://example.com/forums/forum/drinks/beer/",
"content":"",
"type":"forum",
"topics":[{"id":6045,"title":"Test mention 1","reply_count":"7","permalink":"http://example.com/forums/topic/bbpress-help/"},{"id":5408,"title":"test post 1","reply_count":"1","permalink":"http://example.com/forums/topic/test-post-1-6/"}]
}

Standard from post would be: {
"id":999,
"date":"2015-10-20T18:21:16",
"date_gmt":"2015-10-20T16:21:16",
"guid":{"rendered":"http://example.com/?post_type=forum&p=999"},
"modified":"2015-10-20T18:21:16",
"modified_gmt":"2015-10-20T16:21:16",
"slug":"beer",
"link":"http://example.com/forums/forum/drinks/beer/",
"title":{"rendered":"Beer"},
"content":{"rendered":"","protected":false},
"featured_media":0,
"parent":888,
"_links":{"self":[{"href":"http://example.com/bbp-api/v1/forum/999"}]}
}

Clone this wiki locally