User APIs

Fetch nodebb user details

This api is used for fetching the user details based on user slug from nodebb.

get

/discussion/user/{userslug}

Path parameters
userslugstringrequired
Header parameters
Authorizationstringrequired
Responses
curl -L \
  --url 'https://staging.sunbirded.org/api/discussion/user/{userslug}' \
  --header 'Authorization: text'
{
  "websiteLink": "websiteLink",
  "reputation": 5,
  "blocksCount": true,
  "icon:text": "icon:text",
  "isGlobalModerator": true,
  "joindate": 0,
  "reputation:disabled": true,
  "banned_until_readable": "banned_until_readable",
  "allowCoverPicture": true,
  "isAdmin": true,
  "moderationNote": "moderationNote",
  "aboutme": "aboutme",
  "email:confirmed": true,
  "isTargetAdmin": true,
  "isAdminOrGlobalModerator": true,
  "emailClass": "emailClass",
  "loggedIn": true,
  "downvote:disabled": true,
  "topiccount": 2,
  "relative_path": "relative_path",
  "isSelf": true,
  "status": "status",
  "birthday": "birthday",
  "showHidden": true,
  "yourid": 1,
  "lastposttime": 7,
  "isModerator": true,
  "signature": "signature",
  "icon:bgColor": true,
  "canEdit": true,
  "flags": "flags",
  "groupTitle": "groupTitle",
  "isBlocked": true,
  "title": "title",
  "followingCount": 2,
  "lastonlineISO": "lastonlineISO",
  "email:disableEdit": true,
  "uid": "uid",
  "canChangePassword": true,
  "profileviews": 1,
  "bodyClass": "bodyClass",
  "cover:url": "cover:url",
  "banned": true,
  "banned_until": 4,
  "userslug": "userslug",
  "followerCount": 3,
  "email": "email",
  "website": "website",
  "isFollowing": true,
  "uploadedpicture": "uploadedpicture",
  "canBan": true,
  "lastonline": 6,
  "disableSignatures": true,
  "banned:expire": 9,
  "username:disableEdit": true,
  "joindateISO": "joindateISO",
  "url": "url",
  "isSelfOrAdminOrGlobalModerator": true,
  "websiteName": "websiteName",
  "hasPrivateChat": 1,
  "isAdminOrGlobalModeratorOrModerator": true,
  "cover:position": "cover:position",
  "postcount": 5,
  "location": "location",
  "fullname": "fullname",
  "aboutmeParsed": "aboutmeParsed",
  "age": 7,
  "theirid": 1,
  "username": "username",
  "latestPosts": [
    null,
    null
  ],
  "bestPosts": [
    null,
    null
  ],
  "groupTitleArray": [
    "groupTitleArray",
    "groupTitleArray"
  ],
  "_header": {},
  "ips": {},
  "template": {},
  "widgets": {},
  "sso": [
    {},
    {}
  ],
  "profile_links": [
    {},
    {}
  ],
  "breadcrumbs": [
    {},
    {}
  ],
  "selectedGroup": [
    {},
    {}
  ],
  "groups": [
    {},
    {}
  ],
  "posts": [
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "votes": 9,
      "timestamp": 4,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "tid": 9,
        "slug": "slug",
        "cid": 6,
        "teaserPid": {}
      },
      "category": {
        "parentCid": 6,
        "bgColor": "bgColor",
        "color": "color",
        "name": "name",
        "icon": "icon",
        "slug": "slug",
        "cid": 2,
        "imageClass": "imageClass",
        "backgroundImage": {}
      },
      "user": {
        "uid": 6,
        "icon:bgColor": "icon:bgColor",
        "icon:text": "icon:text",
        "userslug": "userslug",
        "username": "username",
        "status": "status",
        "picture": {}
      }
    },
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "votes": 9,
      "timestamp": 4,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "tid": 9,
        "slug": "slug",
        "cid": 6,
        "teaserPid": {}
      },
      "category": {
        "parentCid": 6,
        "bgColor": "bgColor",
        "color": "color",
        "name": "name",
        "icon": "icon",
        "slug": "slug",
        "cid": 2,
        "imageClass": "imageClass",
        "backgroundImage": {}
      },
      "user": {
        "uid": 6,
        "icon:bgColor": "icon:bgColor",
        "icon:text": "icon:text",
        "userslug": "userslug",
        "username": "username",
        "status": "status",
        "picture": {}
      }
    }
  ]
}

Fetch nodebb user details by using uid

This api is used for fetching the user details based on nodebb uid.

get

/discussion/user/uid/{uid}

Path parameters
uidstringrequired
Header parameters
Authorizationstringrequired
Responses
curl -L \
  --url 'https://staging.sunbirded.org/api/discussion/user/uid/{uid}' \
  --header 'Authorization: text'
{
  "uid": 1,
  "username": "text",
  "userslug": "text",
  "email:confirmed": 1,
  "joindate": 1,
  "lastonline": 1,
  "picture": {},
  "location": {},
  "birthday": {},
  "website": {},
  "aboutme": {},
  "signature": {},
  "uploadedpicture": {},
  "profileviews": 1,
  "reputation": 1,
  "postcount": 1,
  "topiccount": 1,
  "lastposttime": 1,
  "banned": 1,
  "banned:expire": 1,
  "status": "text",
  "flags": {},
  "followerCount": 1,
  "followingCount": 1,
  "cover:url": {},
  "cover:position": {},
  "groupTitle": {},
  "sunbird-oidcId": {},
  "displayname": "text",
  "groupTitleArray": {},
  "icon:text": "text",
  "icon:bgColor": "text",
  "joindateISO": "text",
  "lastonlineISO": "text",
  "banned_until": 1,
  "banned_until_readable": "text"
}

Fetch user upvoted posts list

This api is used for fetching the user upvote details from nodebb.

get

/discussion/user/{userslug}/upvoted

Path parameters
userslugstringrequired
Header parameters
Authorizationstringrequired
Responses
curl -L \
  --url 'https://staging.sunbirded.org/api/discussion/user/{userslug}/upvoted' \
  --header 'Authorization: text'
{
  "websiteLink": "websiteLink",
  "reputation": 5,
  "blocksCount": true,
  "icon:text": "icon:text",
  "isGlobalModerator": true,
  "joindate": 0,
  "reputation:disabled": true,
  "banned_until_readable": "banned_until_readable",
  "allowCoverPicture": true,
  "isAdmin": true,
  "moderationNote": "moderationNote",
  "aboutme": "aboutme",
  "email:confirmed": true,
  "isTargetAdmin": true,
  "isAdminOrGlobalModerator": true,
  "emailClass": "emailClass",
  "loggedIn": true,
  "downvote:disabled": true,
  "topiccount": 2,
  "relative_path": "relative_path",
  "isSelf": true,
  "status": "status",
  "birthday": "birthday",
  "showHidden": true,
  "yourid": 1,
  "lastposttime": 7,
  "isModerator": true,
  "signature": "signature",
  "icon:bgColor": true,
  "canEdit": true,
  "flags": "flags",
  "groupTitle": "groupTitle",
  "isBlocked": true,
  "title": "title",
  "followingCount": 2,
  "lastonlineISO": "lastonlineISO",
  "email:disableEdit": true,
  "uid": "uid",
  "canChangePassword": true,
  "profileviews": 1,
  "bodyClass": "bodyClass",
  "cover:url": "cover:url",
  "banned": true,
  "banned_until": 4,
  "userslug": "userslug",
  "followerCount": 3,
  "email": "email",
  "website": "website",
  "isFollowing": true,
  "uploadedpicture": "uploadedpicture",
  "canBan": true,
  "lastonline": 6,
  "disableSignatures": true,
  "banned:expire": 9,
  "username:disableEdit": true,
  "joindateISO": "joindateISO",
  "url": "url",
  "isSelfOrAdminOrGlobalModerator": true,
  "websiteName": "websiteName",
  "hasPrivateChat": 1,
  "isAdminOrGlobalModeratorOrModerator": true,
  "cover:position": "cover:position",
  "postcount": 5,
  "location": "location",
  "fullname": "fullname",
  "aboutmeParsed": "aboutmeParsed",
  "age": 7,
  "theirid": 1,
  "username": "username",
  "latestPosts": [
    null,
    null
  ],
  "bestPosts": [
    null,
    null
  ],
  "groupTitleArray": [
    "groupTitleArray",
    "groupTitleArray"
  ],
  "_header": {},
  "ips": {},
  "template": {},
  "widgets": {},
  "sso": [
    {},
    {}
  ],
  "profile_links": [
    {},
    {}
  ],
  "breadcrumbs": [
    {},
    {}
  ],
  "selectedGroup": [
    {},
    {}
  ],
  "groups": [
    {},
    {}
  ],
  "posts": [
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "votes": 9,
      "timestamp": 4,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "tid": 9,
        "slug": "slug",
        "cid": 6,
        "teaserPid": {}
      },
      "category": {
        "parentCid": 6,
        "bgColor": "bgColor",
        "color": "color",
        "name": "name",
        "icon": "icon",
        "slug": "slug",
        "cid": 2,
        "imageClass": "imageClass",
        "backgroundImage": {}
      },
      "user": {
        "uid": 6,
        "icon:bgColor": "icon:bgColor",
        "icon:text": "icon:text",
        "userslug": "userslug",
        "username": "username",
        "status": "status",
        "picture": {}
      }
    },
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "votes": 9,
      "timestamp": 4,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "tid": 9,
        "slug": "slug",
        "cid": 6,
        "teaserPid": {}
      },
      "category": {
        "parentCid": 6,
        "bgColor": "bgColor",
        "color": "color",
        "name": "name",
        "icon": "icon",
        "slug": "slug",
        "cid": 2,
        "imageClass": "imageClass",
        "backgroundImage": {}
      },
      "user": {
        "uid": 6,
        "icon:bgColor": "icon:bgColor",
        "icon:text": "icon:text",
        "userslug": "userslug",
        "username": "username",
        "status": "status",
        "picture": {}
      }
    }
  ]
}

Fetch user downvoted posts list

This api is used for fetching the user down vote details from nodebb.

get

/discussion/user/{userslug}/downvoted

Path parameters
userslugstringrequired
Header parameters
Authorizationstringrequired
Responses
curl -L \
  --url 'https://staging.sunbirded.org/api/discussion/user/{userslug}/downvoted' \
  --header 'Authorization: text'
{
  "websiteLink": "websiteLink",
  "reputation": 5,
  "blocksCount": true,
  "icon:text": "icon:text",
  "isGlobalModerator": true,
  "joindate": 0,
  "reputation:disabled": true,
  "banned_until_readable": "banned_until_readable",
  "allowCoverPicture": true,
  "isAdmin": true,
  "moderationNote": "moderationNote",
  "aboutme": "aboutme",
  "email:confirmed": true,
  "isTargetAdmin": true,
  "isAdminOrGlobalModerator": true,
  "emailClass": "emailClass",
  "loggedIn": true,
  "downvote:disabled": true,
  "topiccount": 2,
  "relative_path": "relative_path",
  "isSelf": true,
  "status": "status",
  "birthday": "birthday",
  "showHidden": true,
  "yourid": 1,
  "lastposttime": 7,
  "isModerator": true,
  "signature": "signature",
  "icon:bgColor": true,
  "canEdit": true,
  "flags": "flags",
  "groupTitle": "groupTitle",
  "isBlocked": true,
  "title": "title",
  "followingCount": 2,
  "lastonlineISO": "lastonlineISO",
  "email:disableEdit": true,
  "uid": "uid",
  "canChangePassword": true,
  "profileviews": 1,
  "bodyClass": "bodyClass",
  "cover:url": "cover:url",
  "banned": true,
  "banned_until": 4,
  "userslug": "userslug",
  "followerCount": 3,
  "email": "email",
  "website": "website",
  "isFollowing": true,
  "uploadedpicture": "uploadedpicture",
  "canBan": true,
  "lastonline": 6,
  "disableSignatures": true,
  "banned:expire": 9,
  "username:disableEdit": true,
  "joindateISO": "joindateISO",
  "url": "url",
  "isSelfOrAdminOrGlobalModerator": true,
  "websiteName": "websiteName",
  "hasPrivateChat": 1,
  "isAdminOrGlobalModeratorOrModerator": true,
  "cover:position": "cover:position",
  "postcount": 5,
  "location": "location",
  "fullname": "fullname",
  "aboutmeParsed": "aboutmeParsed",
  "age": 7,
  "theirid": 1,
  "username": "username",
  "latestPosts": [
    null,
    null
  ],
  "bestPosts": [
    null,
    null
  ],
  "groupTitleArray": [
    "groupTitleArray",
    "groupTitleArray"
  ],
  "_header": {},
  "ips": {},
  "template": {},
  "widgets": {},
  "sso": [
    {},
    {}
  ],
  "profile_links": [
    {},
    {}
  ],
  "breadcrumbs": [
    {},
    {}
  ],
  "selectedGroup": [
    {},
    {}
  ],
  "groups": [
    {},
    {}
  ],
  "posts": [
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "votes": 9,
      "timestamp": 4,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "tid": 9,
        "slug": "slug",
        "cid": 6,
        "teaserPid": {}
      },
      "category": {
        "parentCid": 6,
        "bgColor": "bgColor",
        "color": "color",
        "name": "name",
        "icon": "icon",
        "slug": "slug",
        "cid": 2,
        "imageClass": "imageClass",
        "backgroundImage": {}
      },
      "user": {
        "uid": 6,
        "icon:bgColor": "icon:bgColor",
        "icon:text": "icon:text",
        "userslug": "userslug",
        "username": "username",
        "status": "status",
        "picture": {}
      }
    },
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "votes": 9,
      "timestamp": 4,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "tid": 9,
        "slug": "slug",
        "cid": 6,
        "teaserPid": {}
      },
      "category": {
        "parentCid": 6,
        "bgColor": "bgColor",
        "color": "color",
        "name": "name",
        "icon": "icon",
        "slug": "slug",
        "cid": 2,
        "imageClass": "imageClass",
        "backgroundImage": {}
      },
      "user": {
        "uid": 6,
        "icon:bgColor": "icon:bgColor",
        "icon:text": "icon:text",
        "userslug": "userslug",
        "username": "username",
        "status": "status",
        "picture": {}
      }
    }
  ]
}

Fetch user bookmarked posts

This api is used for fetching the user bookmark post details from nodebb.

get

/discussion/user/{userslug}/bookmarks

Path parameters
userslugstringrequired
Header parameters
Authorizationstringrequired
Responses
curl -L \
  --url 'https://staging.sunbirded.org/api/discussion/user/{userslug}/bookmarks' \
  --header 'Authorization: text'
{
  "websiteLink": "websiteLink",
  "reputation": 5,
  "blocksCount": true,
  "icon:text": "icon:text",
  "isGlobalModerator": true,
  "joindate": 0,
  "reputation:disabled": true,
  "banned_until_readable": "banned_until_readable",
  "allowCoverPicture": true,
  "isAdmin": true,
  "moderationNote": "moderationNote",
  "aboutme": "aboutme",
  "email:confirmed": true,
  "isTargetAdmin": true,
  "isAdminOrGlobalModerator": true,
  "emailClass": "emailClass",
  "loggedIn": true,
  "downvote:disabled": true,
  "topiccount": 2,
  "relative_path": "relative_path",
  "isSelf": true,
  "status": "status",
  "birthday": "birthday",
  "showHidden": true,
  "yourid": 1,
  "lastposttime": 7,
  "isModerator": true,
  "signature": "signature",
  "icon:bgColor": true,
  "canEdit": true,
  "flags": "flags",
  "groupTitle": "groupTitle",
  "isBlocked": true,
  "title": "title",
  "followingCount": 2,
  "lastonlineISO": "lastonlineISO",
  "email:disableEdit": true,
  "uid": "uid",
  "canChangePassword": true,
  "profileviews": 1,
  "bodyClass": "bodyClass",
  "cover:url": "cover:url",
  "banned": true,
  "banned_until": 4,
  "userslug": "userslug",
  "followerCount": 3,
  "email": "email",
  "website": "website",
  "isFollowing": true,
  "uploadedpicture": "uploadedpicture",
  "canBan": true,
  "lastonline": 6,
  "disableSignatures": true,
  "banned:expire": 9,
  "username:disableEdit": true,
  "joindateISO": "joindateISO",
  "url": "url",
  "isSelfOrAdminOrGlobalModerator": true,
  "websiteName": "websiteName",
  "hasPrivateChat": 1,
  "isAdminOrGlobalModeratorOrModerator": true,
  "cover:position": "cover:position",
  "postcount": 5,
  "location": "location",
  "fullname": "fullname",
  "aboutmeParsed": "aboutmeParsed",
  "age": 7,
  "theirid": 1,
  "username": "username",
  "latestPosts": [
    null,
    null
  ],
  "bestPosts": [
    null,
    null
  ],
  "groupTitleArray": [
    "groupTitleArray",
    "groupTitleArray"
  ],
  "_header": {},
  "ips": {},
  "template": {},
  "widgets": {},
  "sso": [
    {},
    {}
  ],
  "profile_links": [
    {},
    {}
  ],
  "breadcrumbs": [
    {},
    {}
  ],
  "selectedGroup": [
    {},
    {}
  ],
  "groups": [
    {},
    {}
  ],
  "posts": [
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "votes": 9,
      "timestamp": 4,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "tid": 9,
        "slug": "slug",
        "cid": 6,
        "teaserPid": {}
      },
      "category": {
        "parentCid": 6,
        "bgColor": "bgColor",
        "color": "color",
        "name": "name",
        "icon": "icon",
        "slug": "slug",
        "cid": 2,
        "imageClass": "imageClass",
        "backgroundImage": {}
      },
      "user": {
        "uid": 6,
        "icon:bgColor": "icon:bgColor",
        "icon:text": "icon:text",
        "userslug": "userslug",
        "username": "username",
        "status": "status",
        "picture": {}
      }
    },
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "votes": 9,
      "timestamp": 4,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "tid": 9,
        "slug": "slug",
        "cid": 6,
        "teaserPid": {}
      },
      "category": {
        "parentCid": 6,
        "bgColor": "bgColor",
        "color": "color",
        "name": "name",
        "icon": "icon",
        "slug": "slug",
        "cid": 2,
        "imageClass": "imageClass",
        "backgroundImage": {}
      },
      "user": {
        "uid": 6,
        "icon:bgColor": "icon:bgColor",
        "icon:text": "icon:text",
        "userslug": "userslug",
        "username": "username",
        "status": "status",
        "picture": {}
      }
    }
  ]
}

Fetch user recent posts

This api is used for fetching the user recent post details from nodebb.

get

/discussion/user/{userslug}/posts

Path parameters
userslugstringrequired
Header parameters
Authorizationstringrequired
Responses
curl -L \
  --url 'https://staging.sunbirded.org/api/discussion/user/{userslug}/posts' \
  --header 'Authorization: text'
{
  "websiteLink": "websiteLink",
  "reputation": 5,
  "blocksCount": true,
  "icon:text": "icon:text",
  "isGlobalModerator": true,
  "joindate": 0,
  "reputation:disabled": true,
  "banned_until_readable": "banned_until_readable",
  "allowCoverPicture": true,
  "isAdmin": true,
  "moderationNote": "moderationNote",
  "aboutme": "aboutme",
  "email:confirmed": true,
  "isTargetAdmin": true,
  "isAdminOrGlobalModerator": true,
  "emailClass": "emailClass",
  "loggedIn": true,
  "downvote:disabled": true,
  "topiccount": 2,
  "relative_path": "relative_path",
  "isSelf": true,
  "status": "status",
  "birthday": "birthday",
  "showHidden": true,
  "yourid": 1,
  "lastposttime": 7,
  "isModerator": true,
  "signature": "signature",
  "icon:bgColor": true,
  "canEdit": true,
  "flags": "flags",
  "groupTitle": "groupTitle",
  "isBlocked": true,
  "title": "title",
  "followingCount": 2,
  "lastonlineISO": "lastonlineISO",
  "email:disableEdit": true,
  "uid": "uid",
  "canChangePassword": true,
  "profileviews": 1,
  "bodyClass": "bodyClass",
  "cover:url": "cover:url",
  "banned": true,
  "banned_until": 4,
  "userslug": "userslug",
  "followerCount": 3,
  "email": "email",
  "website": "website",
  "isFollowing": true,
  "uploadedpicture": "uploadedpicture",
  "canBan": true,
  "lastonline": 6,
  "disableSignatures": true,
  "banned:expire": 9,
  "username:disableEdit": true,
  "joindateISO": "joindateISO",
  "url": "url",
  "isSelfOrAdminOrGlobalModerator": true,
  "websiteName": "websiteName",
  "hasPrivateChat": 1,
  "isAdminOrGlobalModeratorOrModerator": true,
  "cover:position": "cover:position",
  "postcount": 5,
  "location": "location",
  "fullname": "fullname",
  "aboutmeParsed": "aboutmeParsed",
  "age": 7,
  "theirid": 1,
  "username": "username",
  "latestPosts": [
    null,
    null
  ],
  "bestPosts": [
    null,
    null
  ],
  "groupTitleArray": [
    "groupTitleArray",
    "groupTitleArray"
  ],
  "_header": {},
  "ips": {},
  "template": {},
  "widgets": {},
  "sso": [
    {},
    {}
  ],
  "profile_links": [
    {},
    {}
  ],
  "breadcrumbs": [
    {},
    {}
  ],
  "selectedGroup": [
    {},
    {}
  ],
  "groups": [
    {},
    {}
  ],
  "posts": [
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "votes": 9,
      "timestamp": 4,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "tid": 9,
        "slug": "slug",
        "cid": 6,
        "teaserPid": {}
      },
      "category": {
        "parentCid": 6,
        "bgColor": "bgColor",
        "color": "color",
        "name": "name",
        "icon": "icon",
        "slug": "slug",
        "cid": 2,
        "imageClass": "imageClass",
        "backgroundImage": {}
      },
      "user": {
        "uid": 6,
        "icon:bgColor": "icon:bgColor",
        "icon:text": "icon:text",
        "userslug": "userslug",
        "username": "username",
        "status": "status",
        "picture": {}
      }
    },
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "votes": 9,
      "timestamp": 4,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "tid": 9,
        "slug": "slug",
        "cid": 6,
        "teaserPid": {}
      },
      "category": {
        "parentCid": 6,
        "bgColor": "bgColor",
        "color": "color",
        "name": "name",
        "icon": "icon",
        "slug": "slug",
        "cid": 2,
        "imageClass": "imageClass",
        "backgroundImage": {}
      },
      "user": {
        "uid": 6,
        "icon:bgColor": "icon:bgColor",
        "icon:text": "icon:text",
        "userslug": "userslug",
        "username": "username",
        "status": "status",
        "picture": {}
      }
    }
  ]
}

Create new user in nodebb using write api plugin

This api is used for creating the user in nodebb using write api plugin.

post

/discussion/v2/users

Header parameters
Authorizationstring
Body
usernamestring
emailstring
passwordstring
Responses
curl -L \
  --request POST \
  --url 'https://staging.sunbirded.org/api/discussion/v2/users' \
  --header 'Content-Type: application/json' \
  --data '{"username":"Vinu Kumar","email":"example@gmail.com","password":"Test@123"}'
{
  "code": "code",
  "payload": {
    "uid": 0
  }
}

Create new user in nodebb Sunbird OIDC

This api is used for creating the user in nodebb usig Sunbird OIDC plugin.

post

/discussion/user/v1/create

Header parameters
Authorizationstring
Body
requestobject
Responses
curl -L \
  --request POST \
  --url 'https://staging.sunbirded.org/api/discussion/user/v1/create' \
  --header 'Content-Type: application/json' \
  --data '{"request":{"example":{"id":"api.discussions.user.create","ver":1,"responseCode":400,"params":{"resmsgid":null,"msgid":null,"status":"unsuccessful","msg":"User already Exists"},"result":{"userSlug":"content_creator_tn3941","userName":"content_creator_tn3941","userId":{"uid":1}}}}}'
{
  "id": "text",
  "ver": "text",
  "responseCode": "text",
  "params": {
    "resmsgid": "text",
    "msgid": "text",
    "status": "text",
    "msg": "text"
  },
  "result": {
    "userSlug": "text",
    "userName": "text",
    "userId": {
      "uid": 1
    }
  }
}

Updates a user's profile information

This api is used to update user's profile information in nodebb.

put

/discussion/v2/users/{uid}

Path parameters
uidintegerrequired
Header parameters
Authorizationstring
Body
usernamestring
emailstring
fullnamestring
websitestring
locationstring
birthdaystring
signaturestring
Responses
curl -L \
  --request PUT \
  --url 'https://staging.sunbirded.org/api/discussion/v2/users/{uid}' \
  --header 'Content-Type: application/json' \
  --data '{"username":"Venkat","email":"example@gmail.com","fullname":"venkat kadiveti","website":"https://example.org/","location":"Bangalore","birthday":"02/04/1995","signature":"venkat"}'
{
  "code": "code",
  "payload": {}
}

Deletes a user from nodebb

This api is used for deleting user in nodebb.

delete

/discussion/v2/users/{uid}

Path parameters
uidintegerrequired
Header parameters
Authorizationstring
Responses
curl -L \
  --request DELETE \
  --url 'https://staging.sunbirded.org/api/discussion/v2/users/{uid}'
{
  "code": "code",
  "payload": {}
}

Last updated

Was this helpful?