User APIs
This api is used for fetching the user details based on user slug from nodebb.
- The endpoint for User is
/user/{userslug}
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
- Backend Route: http://nodebb-service:4567/discussions/api/user/{userslug}
Path parameters
userslugstringRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
400
Bad request
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"
}
This api is used for fetching the user details based on nodebb uid.
- The endpoint for User is
/user/uid/{uid}
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
- Backend Route: http://nodebb-service:4567/discussions/api/user/uid/{uid}
Path parameters
uidstringRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
400
Bad request
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"
}
This api is used for fetching the user upvote details from nodebb.
- The endpoint for User is
/user/{userslug}/upvoted
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
- Backend Route: http://nodebb-service:4567/discussions/api/user/{userslug}/upvoted
Path parameters
userslugstringRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
400
Bad request
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"
}
This api is used for fetching the user down vote details from nodebb.
- The endpoint for User is
/user/{userslug}/downvoted
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
- Backend Route: http://nodebb-service:4567/discussions/api/user/{userslug}/downvoted
Path parameters
userslugstringRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
400
Bad request
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"
}
This api is used for fetching the user bookmark post details from nodebb.
- The endpoint for User is
/user/{userslug}/bookmarks
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
- Backend Route: http://nodebb-service:4567/discussions/api/user/{userslug}/bookmarks
Path parameters
userslugstringRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
400
Bad request
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"
}
This api is used for fetching the user recent post details from nodebb.
- The endpoint for User is
/user/{userslug}/posts
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
- Backend Route: http://nodebb-service:4567/discussions/api/user/{userslug}/posts
Path parameters
userslugstringRequired
Header parameters
AuthorizationstringRequired
Responses
200
successful operation
application/json
400
Bad request
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"
}
This api is used for creating the user in nodebb using write api plugin.
- The endpoint for User is
/v2/users
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
- Backend Route: http://nodebb-service:4567/discussions/api/v2/users
Header parameters
AuthorizationstringOptional
Body
usernamestringOptional
emailstringOptional
passwordstringOptional
Responses
200
successful operation
application/json
400
Bad request
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
}
}
This api is used for creating the user in nodebb usig Sunbird OIDC plugin.
- The endpoint for User is
/user/v1/create
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
- Backend Route: http://nodebb-service:4567/discussions/api/user/v1/create
Header parameters
AuthorizationstringOptional
Body
Responses
200
successful operation
application/json
400
Bad request
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"
}
}
This api is used to update user's profile information in nodebb.
- The endpoint for User is
/v2/users/{uid}
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
- Backend Route: http://nodebb-service:4567/discussions/api/v2/users/{uid}
Path parameters
uidintegerRequired
Header parameters
AuthorizationstringOptional
Body
usernamestringOptional
emailstringOptional
fullnamestringOptional
websitestringOptional
locationstringOptional
birthdaystringOptional
signaturestringOptional
Responses
200
successful operation
application/json
400
Bad request
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": {}
}
This api is used for deleting user in nodebb.
- The endpoint for User is
/v2/users/{uid}
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
- Backend Route: http://nodebb-service:4567/discussions/api/v2/users/{uid}
Path parameters
uidintegerRequired
Header parameters
AuthorizationstringOptional
Responses
200
successful operation
application/json
400
Bad request
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?