User APIs

Fetch nodebb user details

get

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

Path parameters
userslugstringRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
get
GET /api/discussion/user/{userslug} HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "websiteLink": "websiteLink",
  "_header": {},
  "reputation": 5,
  "blocksCount": true,
  "posts": [
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "teaserPid": {},
        "tid": 9,
        "slug": "slug",
        "cid": 6
      },
      "votes": 9,
      "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"
      },
      "timestamp": 4
    },
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "teaserPid": {},
        "tid": 9,
        "slug": "slug",
        "cid": 6
      },
      "votes": 9,
      "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"
      },
      "timestamp": 4
    }
  ],
  "sso": [
    {},
    {}
  ],
  "icon:text": "icon:text",
  "isGlobalModerator": true,
  "joindate": 0,
  "profile_links": [
    {},
    {}
  ],
  "reputation:disabled": true,
  "banned_until_readable": "banned_until_readable",
  "allowCoverPicture": true,
  "isAdmin": true,
  "moderationNote": "moderationNote",
  "ips": {},
  "latestPosts": [
    null,
    null
  ],
  "aboutme": "aboutme",
  "email:confirmed": true,
  "isTargetAdmin": true,
  "isAdminOrGlobalModerator": true,
  "emailClass": "emailClass",
  "loggedIn": true,
  "downvote:disabled": true,
  "topiccount": 2,
  "relative_path": "relative_path",
  "isSelf": true,
  "breadcrumbs": [
    {},
    {}
  ],
  "status": "status",
  "birthday": "birthday",
  "template": {},
  "showHidden": true,
  "yourid": 1,
  "lastposttime": 7,
  "isModerator": true,
  "signature": "signature",
  "icon:bgColor": true,
  "canEdit": true,
  "flags": "flags",
  "groupTitle": "groupTitle",
  "isBlocked": true,
  "bestPosts": [
    null,
    null
  ],
  "title": "title",
  "widgets": {},
  "followingCount": 2,
  "lastonlineISO": "lastonlineISO",
  "email:disableEdit": true,
  "uid": "uid",
  "groupTitleArray": [
    "groupTitleArray",
    "groupTitleArray"
  ],
  "canChangePassword": true,
  "profileviews": 1,
  "bodyClass": "bodyClass",
  "cover:url": "cover:url",
  "selectedGroup": [
    {},
    {}
  ],
  "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,
  "groups": [
    {},
    {}
  ],
  "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"
}

Fetch nodebb user details by using uid

get

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

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

get

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

Path parameters
userslugstringRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
get
GET /api/discussion/user/{userslug}/upvoted HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "websiteLink": "websiteLink",
  "_header": {},
  "reputation": 5,
  "blocksCount": true,
  "posts": [
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "teaserPid": {},
        "tid": 9,
        "slug": "slug",
        "cid": 6
      },
      "votes": 9,
      "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"
      },
      "timestamp": 4
    },
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "teaserPid": {},
        "tid": 9,
        "slug": "slug",
        "cid": 6
      },
      "votes": 9,
      "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"
      },
      "timestamp": 4
    }
  ],
  "sso": [
    {},
    {}
  ],
  "icon:text": "icon:text",
  "isGlobalModerator": true,
  "joindate": 0,
  "profile_links": [
    {},
    {}
  ],
  "reputation:disabled": true,
  "banned_until_readable": "banned_until_readable",
  "allowCoverPicture": true,
  "isAdmin": true,
  "moderationNote": "moderationNote",
  "ips": {},
  "latestPosts": [
    null,
    null
  ],
  "aboutme": "aboutme",
  "email:confirmed": true,
  "isTargetAdmin": true,
  "isAdminOrGlobalModerator": true,
  "emailClass": "emailClass",
  "loggedIn": true,
  "downvote:disabled": true,
  "topiccount": 2,
  "relative_path": "relative_path",
  "isSelf": true,
  "breadcrumbs": [
    {},
    {}
  ],
  "status": "status",
  "birthday": "birthday",
  "template": {},
  "showHidden": true,
  "yourid": 1,
  "lastposttime": 7,
  "isModerator": true,
  "signature": "signature",
  "icon:bgColor": true,
  "canEdit": true,
  "flags": "flags",
  "groupTitle": "groupTitle",
  "isBlocked": true,
  "bestPosts": [
    null,
    null
  ],
  "title": "title",
  "widgets": {},
  "followingCount": 2,
  "lastonlineISO": "lastonlineISO",
  "email:disableEdit": true,
  "uid": "uid",
  "groupTitleArray": [
    "groupTitleArray",
    "groupTitleArray"
  ],
  "canChangePassword": true,
  "profileviews": 1,
  "bodyClass": "bodyClass",
  "cover:url": "cover:url",
  "selectedGroup": [
    {},
    {}
  ],
  "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,
  "groups": [
    {},
    {}
  ],
  "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"
}

Fetch user downvoted posts list

get

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

Path parameters
userslugstringRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
get
GET /api/discussion/user/{userslug}/downvoted HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "websiteLink": "websiteLink",
  "_header": {},
  "reputation": 5,
  "blocksCount": true,
  "posts": [
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "teaserPid": {},
        "tid": 9,
        "slug": "slug",
        "cid": 6
      },
      "votes": 9,
      "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"
      },
      "timestamp": 4
    },
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "teaserPid": {},
        "tid": 9,
        "slug": "slug",
        "cid": 6
      },
      "votes": 9,
      "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"
      },
      "timestamp": 4
    }
  ],
  "sso": [
    {},
    {}
  ],
  "icon:text": "icon:text",
  "isGlobalModerator": true,
  "joindate": 0,
  "profile_links": [
    {},
    {}
  ],
  "reputation:disabled": true,
  "banned_until_readable": "banned_until_readable",
  "allowCoverPicture": true,
  "isAdmin": true,
  "moderationNote": "moderationNote",
  "ips": {},
  "latestPosts": [
    null,
    null
  ],
  "aboutme": "aboutme",
  "email:confirmed": true,
  "isTargetAdmin": true,
  "isAdminOrGlobalModerator": true,
  "emailClass": "emailClass",
  "loggedIn": true,
  "downvote:disabled": true,
  "topiccount": 2,
  "relative_path": "relative_path",
  "isSelf": true,
  "breadcrumbs": [
    {},
    {}
  ],
  "status": "status",
  "birthday": "birthday",
  "template": {},
  "showHidden": true,
  "yourid": 1,
  "lastposttime": 7,
  "isModerator": true,
  "signature": "signature",
  "icon:bgColor": true,
  "canEdit": true,
  "flags": "flags",
  "groupTitle": "groupTitle",
  "isBlocked": true,
  "bestPosts": [
    null,
    null
  ],
  "title": "title",
  "widgets": {},
  "followingCount": 2,
  "lastonlineISO": "lastonlineISO",
  "email:disableEdit": true,
  "uid": "uid",
  "groupTitleArray": [
    "groupTitleArray",
    "groupTitleArray"
  ],
  "canChangePassword": true,
  "profileviews": 1,
  "bodyClass": "bodyClass",
  "cover:url": "cover:url",
  "selectedGroup": [
    {},
    {}
  ],
  "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,
  "groups": [
    {},
    {}
  ],
  "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"
}

Fetch user bookmarked posts

get

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

Path parameters
userslugstringRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
get
GET /api/discussion/user/{userslug}/bookmarks HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "websiteLink": "websiteLink",
  "_header": {},
  "reputation": 5,
  "blocksCount": true,
  "posts": [
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "teaserPid": {},
        "tid": 9,
        "slug": "slug",
        "cid": 6
      },
      "votes": 9,
      "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"
      },
      "timestamp": 4
    },
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "teaserPid": {},
        "tid": 9,
        "slug": "slug",
        "cid": 6
      },
      "votes": 9,
      "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"
      },
      "timestamp": 4
    }
  ],
  "sso": [
    {},
    {}
  ],
  "icon:text": "icon:text",
  "isGlobalModerator": true,
  "joindate": 0,
  "profile_links": [
    {},
    {}
  ],
  "reputation:disabled": true,
  "banned_until_readable": "banned_until_readable",
  "allowCoverPicture": true,
  "isAdmin": true,
  "moderationNote": "moderationNote",
  "ips": {},
  "latestPosts": [
    null,
    null
  ],
  "aboutme": "aboutme",
  "email:confirmed": true,
  "isTargetAdmin": true,
  "isAdminOrGlobalModerator": true,
  "emailClass": "emailClass",
  "loggedIn": true,
  "downvote:disabled": true,
  "topiccount": 2,
  "relative_path": "relative_path",
  "isSelf": true,
  "breadcrumbs": [
    {},
    {}
  ],
  "status": "status",
  "birthday": "birthday",
  "template": {},
  "showHidden": true,
  "yourid": 1,
  "lastposttime": 7,
  "isModerator": true,
  "signature": "signature",
  "icon:bgColor": true,
  "canEdit": true,
  "flags": "flags",
  "groupTitle": "groupTitle",
  "isBlocked": true,
  "bestPosts": [
    null,
    null
  ],
  "title": "title",
  "widgets": {},
  "followingCount": 2,
  "lastonlineISO": "lastonlineISO",
  "email:disableEdit": true,
  "uid": "uid",
  "groupTitleArray": [
    "groupTitleArray",
    "groupTitleArray"
  ],
  "canChangePassword": true,
  "profileviews": 1,
  "bodyClass": "bodyClass",
  "cover:url": "cover:url",
  "selectedGroup": [
    {},
    {}
  ],
  "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,
  "groups": [
    {},
    {}
  ],
  "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"
}

Fetch user recent posts

get

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

Path parameters
userslugstringRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
get
GET /api/discussion/user/{userslug}/posts HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Accept: */*
{
  "websiteLink": "websiteLink",
  "_header": {},
  "reputation": 5,
  "blocksCount": true,
  "posts": [
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "teaserPid": {},
        "tid": 9,
        "slug": "slug",
        "cid": 6
      },
      "votes": 9,
      "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"
      },
      "timestamp": 4
    },
    {
      "upvotes": 5,
      "pid": 6,
      "timestampISO": "timestampISO",
      "downvotes": 9,
      "tid": 7,
      "content": "content",
      "uid": 1,
      "deleted": true,
      "isMainPost": true,
      "topic": {
        "uid": 8,
        "deleted": 3,
        "postcount": 6,
        "titleRaw": "titleRaw",
        "mainPid": 1,
        "title": "title",
        "teaserPid": {},
        "tid": 9,
        "slug": "slug",
        "cid": 6
      },
      "votes": 9,
      "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"
      },
      "timestamp": 4
    }
  ],
  "sso": [
    {},
    {}
  ],
  "icon:text": "icon:text",
  "isGlobalModerator": true,
  "joindate": 0,
  "profile_links": [
    {},
    {}
  ],
  "reputation:disabled": true,
  "banned_until_readable": "banned_until_readable",
  "allowCoverPicture": true,
  "isAdmin": true,
  "moderationNote": "moderationNote",
  "ips": {},
  "latestPosts": [
    null,
    null
  ],
  "aboutme": "aboutme",
  "email:confirmed": true,
  "isTargetAdmin": true,
  "isAdminOrGlobalModerator": true,
  "emailClass": "emailClass",
  "loggedIn": true,
  "downvote:disabled": true,
  "topiccount": 2,
  "relative_path": "relative_path",
  "isSelf": true,
  "breadcrumbs": [
    {},
    {}
  ],
  "status": "status",
  "birthday": "birthday",
  "template": {},
  "showHidden": true,
  "yourid": 1,
  "lastposttime": 7,
  "isModerator": true,
  "signature": "signature",
  "icon:bgColor": true,
  "canEdit": true,
  "flags": "flags",
  "groupTitle": "groupTitle",
  "isBlocked": true,
  "bestPosts": [
    null,
    null
  ],
  "title": "title",
  "widgets": {},
  "followingCount": 2,
  "lastonlineISO": "lastonlineISO",
  "email:disableEdit": true,
  "uid": "uid",
  "groupTitleArray": [
    "groupTitleArray",
    "groupTitleArray"
  ],
  "canChangePassword": true,
  "profileviews": 1,
  "bodyClass": "bodyClass",
  "cover:url": "cover:url",
  "selectedGroup": [
    {},
    {}
  ],
  "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,
  "groups": [
    {},
    {}
  ],
  "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"
}

Create new user in nodebb using write api plugin

post

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

Header parameters
AuthorizationstringOptional
Body
usernamestringOptional
emailstringOptional
passwordstringOptional
Responses
200
successful operation
application/json
post
POST /api/discussion/v2/users HTTP/1.1
Host: staging.sunbirded.org
Content-Type: application/json
Accept: */*
Content-Length: 75

{
  "username": "Vinu Kumar",
  "email": "[email protected]",
  "password": "Test@123"
}
{
  "code": "code",
  "payload": {
    "uid": 0
  }
}

Create new user in nodebb Sunbird OIDC

post

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

Header parameters
AuthorizationstringOptional
Body
Responses
200
successful operation
application/json
post
POST /api/discussion/user/v1/create HTTP/1.1
Host: staging.sunbirded.org
Content-Type: application/json
Accept: */*
Content-Length: 281

{
  "request": {
    "example": {
      "id": "api.discussions.user.create",
      "ver": 1,
      "params": {
        "resmsgid": null,
        "msgid": null,
        "status": "unsuccessful",
        "msg": "User already Exists"
      },
      "responseCode": 400,
      "result": {
        "userId": {
          "uid": 1
        },
        "userSlug": "content_creator_tn3941",
        "userName": "content_creator_tn3941"
      }
    }
  }
}
{
  "id": "text",
  "ver": "text",
  "params": {
    "resmsgid": "text",
    "msgid": "text",
    "status": "text",
    "msg": "text"
  },
  "responseCode": "text",
  "result": {
    "userId": {
      "uid": 1
    },
    "userSlug": "text",
    "userName": "text"
  }
}

Updates a user's profile information

put

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

Path parameters
uidintegerRequired
Header parameters
AuthorizationstringOptional
Body
usernamestringOptional
emailstringOptional
fullnamestringOptional
websitestringOptional
locationstringOptional
birthdaystringOptional
signaturestringOptional
Responses
200
successful operation
application/json
put
PUT /api/discussion/v2/users/{uid} HTTP/1.1
Host: staging.sunbirded.org
Content-Type: application/json
Accept: */*
Content-Length: 179

{
  "username": "Venkat",
  "email": "[email protected]",
  "fullname": "venkat kadiveti",
  "website": "https://example.org/",
  "location": "Bangalore",
  "birthday": "02/04/1995",
  "signature": "venkat"
}
{
  "code": "code",
  "payload": {}
}

Deletes a user from nodebb

delete

This api is used for deleting user in nodebb.

Path parameters
uidintegerRequired
Header parameters
AuthorizationstringOptional
Responses
200
successful operation
application/json
delete
DELETE /api/discussion/v2/users/{uid} HTTP/1.1
Host: staging.sunbirded.org
Accept: */*
{
  "code": "code",
  "payload": {}
}

Last updated

Was this helpful?