Topic APIs

Get unread topics

get

This api allow the user to get all the unread topics in nodebb

Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
get
GET /api/discussion/unread HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "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": [
    {},
    {}
  ]
}

Get recent topics

get

This api allow the user to get all the recent topics in nodebb

Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
get
GET /api/discussion/recent HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "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": [
    {},
    {}
  ]
}
get

This api allow the user to get all the popular topics in nodebb

Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
get
GET /api/discussion/popular HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "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": [
    {},
    {}
  ]
}

Get teaser of topic

get

This api allow the user to get teaser details of topic in nodebb

Path parameters
topic_idintegerRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
get
GET /api/discussion/topic/teaser/{topic_id} HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "pid": 16,
  "tid": 16,
  "content": "<p dir=\"auto\">Disucssion umesh 1</p>",
  "uid": 4,
  "timestamp": 1610103898937,
  "deleted": false,
  "upvotes": 0,
  "downvotes": 0,
  "replies": 0,
  "votes": 0,
  "timestampISO": "2021-01-08T11:04:58.937Z",
  "user": {
    "uid": 4,
    "username": "nodebb",
    "userslug": "nodebb",
    "picture": null,
    "status": "offline",
    "displayname": "nodebb",
    "icon:text": "N",
    "icon:bgColor": null
  },
  "topic": {
    "uid": 4,
    "tid": 16,
    "title": "Disucssion umesh 1",
    "cid": 8,
    "slug": "16/disucssion-umesh-1",
    "deleted": 0,
    "postcount": 1,
    "mainPid": 16,
    "teaserPid": null,
    "titleRaw": "Disucssion umesh 1"
  },
  "category": {
    "cid": 8,
    "name": "Announcements",
    "icon": "fa-comments",
    "slug": "8/announcements",
    "parentCid": 7,
    "bgColor": null,
    "color": null,
    "backgroundImage": null,
    "imageClass": "cover"
  },
  "isMainPost": true
}

Get topics details

get

This api allow the user to get topics details by using topicId ad slug from nodebb

Path parameters
topic_idintegerRequired
slugstringRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
get
GET /api/discussion/topic/{topic_id}/{slug} HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "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": {}
}

Create new topic

post

This api allow the user to create new topic in nodebb

Header parameters
AuthorizationstringRequired
Body
cidintegerRequired
titlestringRequired
contentstringRequired
Responses
200
successful operation
application/json
post
POST /api/discussion/v2/topics HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 66

{
  "cid": 1,
  "title": "Learning",
  "content": "All Javascript frameworks"
}
{
  "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
    }
  }
}

Delete a topic (Soft delete)

put

This api allow the user to delete a topic in nodebb

Path parameters
tidintegerRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
put
PUT /api/discussion/v2/topics/{tid}/state HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "code": "code",
  "payload": {}
}

Follow a topic

put

This api allow the user to follow a topic in nodebb

Path parameters
tidintegerRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
put
PUT /api/discussion/v2/topics/{tid}/follow HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "code": "code",
  "payload": {}
}

UnFollow a Post

delete

This api allow the user to unfollow a topic in nodebb

Path parameters
tidintegerRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
delete
DELETE /api/discussion/v2/topics/{tid}/follow HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "code": "code",
  "payload": {}
}

Add tags for a topic

put

This api allow the user to add tags to a topic in nodebb

Path parameters
tidintegerRequired
Header parameters
AuthorizationstringRequired
Body
string[]Optional
Responses
200
successful operation
application/json
put
PUT /api/discussion/v2/topics/{tid}/tags HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 8

[
  "text"
]
{
  "code": "code",
  "payload": {}
}

Delete tags for a topic

delete

This api allow the user to delete tags for a topic in nodebb

Path parameters
tidintegerRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
delete
DELETE /api/discussion/v2/topics/{tid}/tags HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "code": "code",
  "payload": {}
}

Pin a topic

put

This api allow the user to pin to a topic in nodebb

Path parameters
tidintegerRequired
Header parameters
AuthorizationstringRequired
Body
string[]Optional
Responses
200
successful operation
application/json
put
PUT /api/discussion/v2/topics/{tid}/pin HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 8

[
  "text"
]
{
  "code": "code",
  "payload": {}
}

Unpin a topic

delete

This api allow the user to unpin a topic in nodebb

Path parameters
tidintegerRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
delete
DELETE /api/discussion/v2/topics/{tid}/pin HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "code": "code",
  "payload": {}
}

Updates topic details

put

This api allow the user to update topic details in nodebb

Path parameters
tidintegerRequired
Header parameters
AuthorizationstringRequired
Body
pidintegerRequired
contentstringRequired
handlestringOptional
titlestringOptional
topic_thumbintegerOptional
tagsstring[]Optional
Responses
200
successful operation
application/json
put
PUT /api/discussion/v2/topics/{tid} HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 113

{
  "content": "Example content",
  "pid": 1,
  "handle": "example",
  "title": "Topic title",
  "topic_thumb": 0,
  "tags": [
    "Angular"
  ]
}
{
  "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
    }
  }
}

Create new reply to topic

post

This api allow the user to create new reply to topic in nodebb

Path parameters
tidintegerRequired
Header parameters
AuthorizationstringRequired
Body
contentstringRequired
toPidintegerOptional
Responses
200
successful operation
application/json
post
POST /api/discussion/v2/topics/{tid} HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 46

{
  "content": "Example reply to topic",
  "toPid": 1
}
{
  "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
    }
  }
}

delete topic

delete

This api allow the user to delete topic in nodebb

Path parameters
tidintegerRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
delete
DELETE /api/discussion/v2/topics/{tid} HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "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
    }
  }
}

Last updated

Was this helpful?