Topic APIs
Last updated
Was this helpful?
Last updated
Was this helpful?
This api allow the user to get all the unread topics in nodebb
/unread
{"template":{},"pagination":{},"_header":{},"nextStart":0,"selectedTerm":{},"title":"title","widgets":{},"showSelect":true,"canPost":true,"selectedCids":["selectedCids","selectedCids"],"terms":[{},{}],"bodyClass":"bodyClass","topicCount":6,"rssFeedUrl":"rssFeedUrl","categories":[{"parentCid":5,"color":"color","bgColor":"bgColor","level":"level","name":"name","icon":"icon","selected":true,"cid":4,"imageClass":"imageClass"},{"parentCid":5,"color":"color","bgColor":"bgColor","level":"level","name":"name","icon":"icon","selected":true,"cid":4,"imageClass":"imageClass"}],"showTopicTools":true,"topics":[{"pinned":1,"lastposttime":5,"upvotes":1,"unreplied":true,"unread":true,"timestampISO":"timestampISO","title":"title","teaserPid":{},"tid":7,"uid":3,"lastposttimeISO":"lastposttimeISO","deleterUid":6,"isOwner":true,"mainPid":5,"locked":7,"slug":"slug","timestamp":9,"ignored":true,"index":1,"downvotes":1,"icons":{},"tags":{},"bookmark":{},"deleted":4,"postcount":2,"viewcount":2,"titleRaw":"titleRaw","votes":7,"category":{"parentCid":6,"bgColor":"bgColor","color":"color","backgroundImage":{},"name":"name","icon":"icon","slug":"slug","cid":2,"imageClass":"imageClass"},"user":{"uid":6,"icon:bgColor":"icon:bgColor","icon:text":"icon:text","userslug":"userslug","picture":{},"username":"username","status":"status"},"cid":1,"teaser":{}},{"pinned":1,"lastposttime":5,"upvotes":1,"unreplied":true,"unread":true,"timestampISO":"timestampISO","title":"title","teaserPid":{},"tid":7,"uid":3,"lastposttimeISO":"lastposttimeISO","deleterUid":6,"isOwner":true,"mainPid":5,"locked":7,"slug":"slug","timestamp":9,"ignored":true,"index":1,"downvotes":1,"icons":{},"tags":{},"bookmark":{},"deleted":4,"postcount":2,"viewcount":2,"titleRaw":"titleRaw","votes":7,"category":{"parentCid":6,"bgColor":"bgColor","color":"color","backgroundImage":{},"name":"name","icon":"icon","slug":"slug","cid":2,"imageClass":"imageClass"},"user":{"uid":6,"icon:bgColor":"icon:bgColor","icon:text":"icon:text","userslug":"userslug","picture":{},"username":"username","status":"status"},"cid":1,"teaser":{}}],"filters":[{},{}],"allCategoriesUrl":"allCategoriesUrl","url":"url","selectedFilter":{},"tids":["tids","tids"],"feeds:disableRSS":9,"loggedIn":true,"selectedCategory":{},"relative_path":"relative_path","breadcrumbs":[{},{}]}
This api allow the user to get all the recent topics in nodebb
/recent
{"template":{},"pagination":{},"_header":{},"nextStart":0,"selectedTerm":{},"title":"title","widgets":{},"showSelect":true,"canPost":true,"selectedCids":["selectedCids","selectedCids"],"terms":[{},{}],"bodyClass":"bodyClass","topicCount":6,"rssFeedUrl":"rssFeedUrl","categories":[{"parentCid":5,"color":"color","bgColor":"bgColor","level":"level","name":"name","icon":"icon","selected":true,"cid":4,"imageClass":"imageClass"},{"parentCid":5,"color":"color","bgColor":"bgColor","level":"level","name":"name","icon":"icon","selected":true,"cid":4,"imageClass":"imageClass"}],"showTopicTools":true,"topics":[{"pinned":1,"lastposttime":5,"upvotes":1,"unreplied":true,"unread":true,"timestampISO":"timestampISO","title":"title","teaserPid":{},"tid":7,"uid":3,"lastposttimeISO":"lastposttimeISO","deleterUid":6,"isOwner":true,"mainPid":5,"locked":7,"slug":"slug","timestamp":9,"ignored":true,"index":1,"downvotes":1,"icons":{},"tags":{},"bookmark":{},"deleted":4,"postcount":2,"viewcount":2,"titleRaw":"titleRaw","votes":7,"category":{"parentCid":6,"bgColor":"bgColor","color":"color","backgroundImage":{},"name":"name","icon":"icon","slug":"slug","cid":2,"imageClass":"imageClass"},"user":{"uid":6,"icon:bgColor":"icon:bgColor","icon:text":"icon:text","userslug":"userslug","picture":{},"username":"username","status":"status"},"cid":1,"teaser":{}},{"pinned":1,"lastposttime":5,"upvotes":1,"unreplied":true,"unread":true,"timestampISO":"timestampISO","title":"title","teaserPid":{},"tid":7,"uid":3,"lastposttimeISO":"lastposttimeISO","deleterUid":6,"isOwner":true,"mainPid":5,"locked":7,"slug":"slug","timestamp":9,"ignored":true,"index":1,"downvotes":1,"icons":{},"tags":{},"bookmark":{},"deleted":4,"postcount":2,"viewcount":2,"titleRaw":"titleRaw","votes":7,"category":{"parentCid":6,"bgColor":"bgColor","color":"color","backgroundImage":{},"name":"name","icon":"icon","slug":"slug","cid":2,"imageClass":"imageClass"},"user":{"uid":6,"icon:bgColor":"icon:bgColor","icon:text":"icon:text","userslug":"userslug","picture":{},"username":"username","status":"status"},"cid":1,"teaser":{}}],"filters":[{},{}],"allCategoriesUrl":"allCategoriesUrl","url":"url","selectedFilter":{},"tids":["tids","tids"],"feeds:disableRSS":9,"loggedIn":true,"selectedCategory":{},"relative_path":"relative_path","breadcrumbs":[{},{}]}
This api allow the user to get all the popular topics in nodebb
/recent
{"template":{},"pagination":{},"_header":{},"nextStart":0,"selectedTerm":{},"title":"title","widgets":{},"showSelect":true,"canPost":true,"selectedCids":["selectedCids","selectedCids"],"terms":[{},{}],"bodyClass":"bodyClass","topicCount":6,"rssFeedUrl":"rssFeedUrl","categories":[{"parentCid":5,"color":"color","bgColor":"bgColor","level":"level","name":"name","icon":"icon","selected":true,"cid":4,"imageClass":"imageClass"},{"parentCid":5,"color":"color","bgColor":"bgColor","level":"level","name":"name","icon":"icon","selected":true,"cid":4,"imageClass":"imageClass"}],"showTopicTools":true,"topics":[{"pinned":1,"lastposttime":5,"upvotes":1,"unreplied":true,"unread":true,"timestampISO":"timestampISO","title":"title","teaserPid":{},"tid":7,"uid":3,"lastposttimeISO":"lastposttimeISO","deleterUid":6,"isOwner":true,"mainPid":5,"locked":7,"slug":"slug","timestamp":9,"ignored":true,"index":1,"downvotes":1,"icons":{},"tags":{},"bookmark":{},"deleted":4,"postcount":2,"viewcount":2,"titleRaw":"titleRaw","votes":7,"category":{"parentCid":6,"bgColor":"bgColor","color":"color","backgroundImage":{},"name":"name","icon":"icon","slug":"slug","cid":2,"imageClass":"imageClass"},"user":{"uid":6,"icon:bgColor":"icon:bgColor","icon:text":"icon:text","userslug":"userslug","picture":{},"username":"username","status":"status"},"cid":1,"teaser":{}},{"pinned":1,"lastposttime":5,"upvotes":1,"unreplied":true,"unread":true,"timestampISO":"timestampISO","title":"title","teaserPid":{},"tid":7,"uid":3,"lastposttimeISO":"lastposttimeISO","deleterUid":6,"isOwner":true,"mainPid":5,"locked":7,"slug":"slug","timestamp":9,"ignored":true,"index":1,"downvotes":1,"icons":{},"tags":{},"bookmark":{},"deleted":4,"postcount":2,"viewcount":2,"titleRaw":"titleRaw","votes":7,"category":{"parentCid":6,"bgColor":"bgColor","color":"color","backgroundImage":{},"name":"name","icon":"icon","slug":"slug","cid":2,"imageClass":"imageClass"},"user":{"uid":6,"icon:bgColor":"icon:bgColor","icon:text":"icon:text","userslug":"userslug","picture":{},"username":"username","status":"status"},"cid":1,"teaser":{}}],"filters":[{},{}],"allCategoriesUrl":"allCategoriesUrl","url":"url","selectedFilter":{},"tids":["tids","tids"],"feeds:disableRSS":9,"loggedIn":true,"selectedCategory":{},"relative_path":"relative_path","breadcrumbs":[{},{}]}
This api allow the user to get teaser details of topic in nodebb
/topic/teaser/{topic_id}
This api allow the user to get topics details by using topicId ad slug from nodebb
/topic/{topic_id}/{slug}
{"privileges":{},"upvotes":7,"unreplied":true,"privateUploads":true,"postDeleteDuration":6,"_header":{},"topicStaleDays":4,"teaserPid":6,"loggedInUser":{},"posts":[{},{}],"tid":5,"postEditDuration":9,"deleterUid":1,"necroThreshold":8,"mainPid":1,"rssFeedUrl":"rssFeedUrl","locked":2,"slug":"slug","reputation:disabled":5,"downvotes":1,"tags":["tags","tags"],"bookmark":{},"feeds:disableRSS":9,"isNotFollowing":true,"loggedIn":true,"downvote:disabled":9,"postIndex":3,"titleRaw":"titleRaw","relative_path":"relative_path","breadcrumbs":[{},{}],"cid":0,"allowMultipleBadges":true,"template":{},"pinned":4,"pagination":{},"lastposttime":6,"bookmarkThreshold":6,"postSharing":[{},{}],"timestampISO":"timestampISO","title":"title","widgets":{},"deleter":{},"uid":7,"lastposttimeISO":"lastposttimeISO","maxTags":1,"related":[{},{}],"bodyClass":"bodyClass","tagWhitelist":["tagWhitelist","tagWhitelist"],"timestamp":2,"minTags":7,"isIgnoring":true,"isFollowing":true,"scrollToMyPost":true,"icons":[{},{}],"url":"url","deleted":3,"postcount":5,"thread_tools":["thread_tools","thread_tools"],"viewcount":9,"votes":1,"category":[{},{}],"merger":{}}
This api allow the user to delete a topic in nodebb
/v2/topics/{tid}/state
{"code":"code","payload":{}}
This api allow the user to follow a topic in nodebb
/v2/topics/{tid}/state
{"code":"code","payload":{}}
This api allow the user to unfollow a topic in nodebb
/v2/topics/{tid}/state
{"code":"code","payload":{}}
This api allow the user to delete tags for a topic in nodebb
/v2/topics/{tid}/tags
{"code":"code","payload":{}}
This api allow the user to unpin a topic in nodebb
/v2/topics/{tid}/pin
{"code":"code","payload":{}}
This api allow the user to delete topic in nodebb
/v2/topics/{tid}
{"code":"code","payload":{"topicData":{"pinned":4,"lastposttime":6,"upvotes":7,"unreplied":6,"mainPost":{},"unread":true,"timestampISO":"timestampISO","title":"title","teaserPid":{},"tid":5,"uid":7,"lastposttimeISO":"lastposttimeISO","deleterUid":1,"isOwner":true,"mainPid":1,"locked":2,"slug":"slug","timestamp":2,"ignored":true,"downvotes":1,"icons":{},"tags":{},"bookmark":{},"deleted":3,"postcount":5,"viewcount":9,"titleRaw":"titleRaw","votes":1,"category":{},"user":{},"cid":0,"teaser":{}},"postData":{"isMain":true,"bookmarked":true,"selfPost":true,"index":9,"pid":7,"timestampISO":"timestampISO","display_edit_tools":true,"tid":4,"content":"content","uid":1,"display_moderator_tools":true,"display_move_tools":true,"topic":{},"votes":6,"display_delete_tools":true,"user":{},"timestamp":5,"cid":9}}}
This api allow the user to create new topic in nodebb
/v2/topics
{"code":"code","payload":{"topicData":{"pinned":4,"lastposttime":6,"upvotes":7,"unreplied":6,"mainPost":{},"unread":true,"timestampISO":"timestampISO","title":"title","teaserPid":{},"tid":5,"uid":7,"lastposttimeISO":"lastposttimeISO","deleterUid":1,"isOwner":true,"mainPid":1,"locked":2,"slug":"slug","timestamp":2,"ignored":true,"downvotes":1,"icons":{},"tags":{},"bookmark":{},"deleted":3,"postcount":5,"viewcount":9,"titleRaw":"titleRaw","votes":1,"category":{},"user":{},"cid":0,"teaser":{}},"postData":{"isMain":true,"bookmarked":true,"selfPost":true,"index":9,"pid":7,"timestampISO":"timestampISO","display_edit_tools":true,"tid":4,"content":"content","uid":1,"display_moderator_tools":true,"display_move_tools":true,"topic":{},"votes":6,"display_delete_tools":true,"user":{},"timestamp":5,"cid":9}}}
This api allow the user to add tags to a topic in nodebb
/v2/topics/{tid}/tags
{"code":"code","payload":{}}
This api allow the user to pin to a topic in nodebb
/v2/topics/{tid}/pin
{"code":"code","payload":{}}
This api allow the user to update topic details in nodebb
/v2/topics/{tid}
{"code":"code","payload":{"topicData":{"pinned":4,"lastposttime":6,"upvotes":7,"unreplied":6,"mainPost":{},"unread":true,"timestampISO":"timestampISO","title":"title","teaserPid":{},"tid":5,"uid":7,"lastposttimeISO":"lastposttimeISO","deleterUid":1,"isOwner":true,"mainPid":1,"locked":2,"slug":"slug","timestamp":2,"ignored":true,"downvotes":1,"icons":{},"tags":{},"bookmark":{},"deleted":3,"postcount":5,"viewcount":9,"titleRaw":"titleRaw","votes":1,"category":{},"user":{},"cid":0,"teaser":{}},"postData":{"isMain":true,"bookmarked":true,"selfPost":true,"index":9,"pid":7,"timestampISO":"timestampISO","display_edit_tools":true,"tid":4,"content":"content","uid":1,"display_moderator_tools":true,"display_move_tools":true,"topic":{},"votes":6,"display_delete_tools":true,"user":{},"timestamp":5,"cid":9}}}
This api allow the user to create new reply to topic in nodebb
/v2/topics/{tid}
{"code":"code","payload":{"topicData":{"pinned":4,"lastposttime":6,"upvotes":7,"unreplied":6,"mainPost":{},"unread":true,"timestampISO":"timestampISO","title":"title","teaserPid":{},"tid":5,"uid":7,"lastposttimeISO":"lastposttimeISO","deleterUid":1,"isOwner":true,"mainPid":1,"locked":2,"slug":"slug","timestamp":2,"ignored":true,"downvotes":1,"icons":{},"tags":{},"bookmark":{},"deleted":3,"postcount":5,"viewcount":9,"titleRaw":"titleRaw","votes":1,"category":{},"user":{},"cid":0,"teaser":{}},"postData":{"isMain":true,"bookmarked":true,"selfPost":true,"index":9,"pid":7,"timestampISO":"timestampISO","display_edit_tools":true,"tid":4,"content":"content","uid":1,"display_moderator_tools":true,"display_move_tools":true,"topic":{},"votes":6,"display_delete_tools":true,"user":{},"timestamp":5,"cid":9}}}