SocialEngine REST API
What is REST API? Simply, REST API is the set of functions to which the developers can perform requests and receive responses. The interaction is performed via the HTTP/HTTPS protocol. An advantage of such an approach is the wide usage of HTTP/HTTPS that’s why REST API can be used practically for any programming language.
Below are the characteristics of the SocialEngineAddOns REST API:
-
When a request is sent to the REST API server, the server will return a response that contains either the data you requested, or the status code, or both.
-
oauth_consumer_key / oauth_consumer_secret? The
Consumer Key
andConsumer Secret Key
are used to make a connection between API client and server. These keys are also used for creatingOAuth Tokens
for site members to access server resources without sharing their credentials.
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
- oauth_token / oauth_secret? The
OAuth Token
andOAuth Secret
are used for identifying site members.
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Base URL
All requests to this REST API should have the base URL: [https://example.com/api/rest/]
HTTP Verbs
In REST API, there are four verbs that are used to manage resources: GET, POST, PUT, and DELETE. You can get the contents of a data using GET, delete the data using DELETE, and create or update the data using POST/PUT.
Supported Features
Official SocialEngine Plugins
-
Blogs Plugin
-
Photo Albums Plugin
-
Classifieds Plugin
-
Groups Plugin
-
Events Plugin
-
Forums Plugin
-
Polls Plugin
-
Video Sharing Plugin
-
Music Sharing Plugin
Core SocialEngine Features
-
Search
-
Member Links
-
Member Log-in
-
Member Sign-up With Profile Fields
-
Edit Member Profile Fields
-
Activity Feeds
-
Notifications
-
Friend Requests
-
Messages
-
Member Settings
-
Likes and Comments
-
Easy Implementation of Photo Lightbox.
-
Footer Menus
SocialEngineAddOns Plugins:
-
Advanced Activity Feeds / Wall Plugin
-
Geo-Location, Geo-Tagging, Check-Ins & Proximity Search Plugin [only for Advanced Activity Feed’s location features]
Member Login ¶
These are APIs for login
, logout
and forgot password
.
Login ¶
Get Login FormGET/login
Returns the member login form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "email",
"label": "Email Address",
"hasValidator": true
},
{
"type": "Password",
"name": "password",
"label": "Password",
"hasValidator": true
},
{
"type": "Submit",
"name": "submit",
"label": "Sign In"
}
]
Post Login FormPOST/login
Provides oauth_token
and oauth_secret
in the 200 response, so that API client can save their values and send them with every request.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
email |
yes | string | robert.dsouza@seaddons.com | member email address |
password |
yes | string | @&#hjdh28d@hd92 | member password |
ip |
yes | string | 127.0.0.1 | ip address |
Login via Facebook
In case of login via Facebook, the following information will need to be sent with the request. If the Facebook user is not a member of the website, then the API will return the signup form.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
facebook_uid |
yes | string | 1122872077726440 | facebook user id |
access_token |
yes | string | CAAWkWAuNawYBAJ3uhTwNsqxC5T1ZArICqfsYDnniTvGrl3ZCH… | facebook access token |
code |
yes | string | AQDN-hjg5gzdzBqjYEr7SC23T65ah2XPVgzG9gzC-aPHNaoWUy1WdIiScLjImlzHrkT8yXicGp… | facebook code |
ip |
yes | string | 127.0.0.1 | ip address |
Login via Twitter
In case of login via Twitter, the following information will need to be sent with the request. If the Twitter user is not a member of the website, then the API will return the signup form.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
twitter_uid |
yes | string | 278526643412 | twitter user id |
twitter_token |
yes | string | 2785266434-Ll7cmPtr7DeQHVC8IdxLZo5yFwzNSrRpHuM0pBs | twitter token |
twitter_secret |
yes | string | jQ2GlrHSr7fxWKjlz18oHopLkYaHkY0zNz0P1PRewI2t5 | twitter secret key |
ip |
yes | string | 127.0.0.1 | ip address |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"email": "robert.dsouza@seaddons.com",
"password": "@&#hjdh28d@hd92"
}
200
Headers
Content-Type: application/json
Body
{
"token": "4a68af0f41e115140f05bd60f6f53151",
"user": {
"user_id": 3,
"username": "michal",
"displayname": "M Michal",
"photo_id": 0,
"status": null,
"status_date": null,
"locale": "English",
"language": "English",
"timezone": "US/Pacific",
"search": 1,
"show_profileviewers": 1,
"level_id": 4,
"invites_used": 0,
"extra_invites": 0,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-12-30 06:15:12",
"modified_date": "2015-05-19 05:56:21",
"lastlogin_date": "2015-05-19 05:30:20",
"update_date": null,
"member_count": 0,
"view_count": 6,
"location": "",
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal",
"cover": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png"
}
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"email": "Please enter a valid email address.",
"password": "Please enter a valid password."
}
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found."
}
Single Sign On ¶
Single Sign OnGET/{?token}
Open the requested page as it would appear to the logged-in user with the token.
Example URI
- token
string
(required) Example: token=276ed9327d0478c2606adea438f4fd15oauth_token value
- language
string
(optional) Example: language=enget the request page in the requested language
- disableHeaderAndFooter
integer
(optional) Example: disableHeaderAndFooter=1send (disableHeaderAndFooter=1) to hide the webpage header and footer from the response view. Default value is 0.
Logout ¶
LogoutPOST/logout
With 204 response of this API call, X-Auth-Token
value should be deleted from API client.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "already_logged_out",
"message": "You are already logged out."
}
Forgot Password ¶
Forgot PasswordPOST/forgot-password
Sends forgot password email to the entered email address.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
email |
yes | string | michal@seaddons.com | password reset instructions will be sent to the entered email address |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"email": "michal@seaddons.com"
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "email_not_found",
"message": "Email does not exist."
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "email_not_verified",
"message": "This account still requires email verification."
}
Member Sign Up ¶
Creates a new user.
The 200 response of Sign Up Form [GET]
call returns the signup form fields.
To validate signup form fields after each signup step, use the subsequent Validate Sign Up Form
API. Finally, send the POST call to Sign Up Form [POST]
API.
Sign Up Form ¶
Get Sign Up FormGET/signup
Get the sign up form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"account": [
{
"type": "Text",
"name": "email",
"label": "Email Address",
"description": "You will use your email address to login.",
"hasValidator": true
},
{
"type": "Password",
"name": "password",
"label": "Password",
"description": "Passwords must be at least 6 characters in length.",
"hasValidator": true
},
{
"type": "Password",
"name": "passconf",
"label": "Password Again",
"description": "Enter your password again for confirmation.",
"hasValidator": true
},
{
"type": "Text",
"name": "username",
"label": "Profile Address",
"description": "This will be the last part of your profile link.",
"hasValidator": true
},
{
"type": "Select",
"name": "timezone",
"label": "Timezone",
"multiOptions": {
"US/Pacific": "(UTC-8) Pacific Time (US & Canada)",
"US/Mountain": "(UTC-7) Mountain Time (US & Canada)",
"US/Central": "(UTC-6) Central Time (US & Canada)",
"US/Eastern": "(UTC-5) Eastern Time (US & Canada)",
"America/Halifax": "(UTC-4) Atlantic Time (Canada)",
"America/Anchorage": "(UTC-9) Alaska (US & Canada)",
"Pacific/Honolulu": "(UTC-10) Hawaii (US)",
"Pacific/Samoa": "(UTC-11) Midway Island, Samoa",
"Etc/GMT-12": "(UTC-12) Eniwetok, Kwajalein",
"Canada/Newfoundland": "(UTC-3:30) Canada/Newfoundland",
"America/Buenos_Aires": "(UTC-3) Brasilia, Buenos Aires, Georgetown",
"Atlantic/South_Georgia": "(UTC-2) Mid-Atlantic",
"Atlantic/Azores": "(UTC-1) Azores, Cape Verde Is.",
"Europe/London": "Greenwich Mean Time (Lisbon, London)",
"Europe/Berlin": "(UTC+1) Amsterdam, Berlin, Paris, Rome, Madrid",
"Europe/Athens": "(UTC+2) Athens, Helsinki, Istanbul, Cairo, E. Europe",
"Europe/Moscow": "(UTC+3) Baghdad, Kuwait, Nairobi, Moscow",
"Iran": "(UTC+3:30) Tehran",
"Asia/Dubai": "(UTC+4) Abu Dhabi, Kazan, Muscat",
"Asia/Kabul": "(UTC+4:30) Kabul",
"Asia/Yekaterinburg": "(UTC+5) Islamabad, Karachi, Tashkent",
"Asia/Calcutta": "(UTC+5:30) Bombay, Calcutta, New Delhi",
"Asia/Katmandu": "(UTC+5:45) Nepal",
"Asia/Omsk": "(UTC+6) Almaty, Dhaka",
"Indian/Cocos": "(UTC+6:30) Cocos Islands, Yangon",
"Asia/Krasnoyarsk": "(UTC+7) Bangkok, Jakarta, Hanoi",
"Asia/Hong_Kong": "(UTC+8) Beijing, Hong Kong, Singapore, Taipei",
"Asia/Tokyo": "(UTC+9) Tokyo, Osaka, Sapporto, Seoul, Yakutsk",
"Australia/Adelaide": "(UTC+9:30) Adelaide, Darwin",
"Australia/Sydney": "(UTC+10) Brisbane, Melbourne, Sydney, Guam",
"Asia/Magadan": "(UTC+11) Magadan, Solomon Is., New Caledonia",
"Pacific/Auckland": "(UTC+12) Fiji, Kamchatka, Marshall Is., Wellington"
},
"hasValidator": true
},
{
"type": "Select",
"name": "language",
"label": "Language",
"multiOptions": {
"fil_PH": "Pilipinas Filipino",
"ky": "Кыргыз",
"en": "English"
},
"hasValidator": true
},
{
"type": "Checkbox",
"name": "terms",
"label": "Terms of Service",
"description": "I have read and agree to the terms of service.",
"hasValidator": true
}
],
"fields": {
"Personal Details": [
{
"type": "Text",
"name": "1_1_3_alias_first_name",
"label": "First Name",
"description": "",
"hasValidator": true
},
{
"type": "Text",
"name": "1_1_4_alias_last_name",
"label": "Last Name",
"description": "",
"hasValidator": true
},
{
"type": "Select",
"name": "1_1_5_alias_gender",
"label": "Gender",
"description": "",
"multiOptions": [
"Male",
"Female"
]
},
{
"type": "Date",
"name": "1_1_6_alias_birthdate",
"label": "Birthday",
"description": ""
}
],
"Contact Information": [
{
"type": "Text",
"name": "1_1_8_alias_",
"label": "Website",
"description": ""
},
{
"type": "Text",
"name": "1_1_9_alias_",
"label": "Twitter",
"description": ""
},
{
"type": "Text",
"name": "1_1_10_alias_",
"label": "Facebook",
"description": ""
},
{
"type": "Text",
"name": "1_1_11_alias_",
"label": "AIM",
"description": ""
}
],
"Personal Information": [
{
"type": "Textarea",
"name": "1_1_13_alias_about_me",
"label": "About Me",
"description": "",
"hasValidator": true
},
{
"type": "Text",
"name": "1_1_27_alias_website",
"label": "Website",
"description": "Enter Your Website:",
"hasValidator": true
}
]
},
"photo": [
{
"type": "File",
"name": "photo",
"label": "Add Your Photo"
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Post Sign Up FormPOST/signup
Create a new user.
To upload the profile photo, send the file in multipart / form-data
format with the photo
API request parameters.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
email |
yes | string | michal@seaddons.com | email address |
password |
yes | string | @#dskjfhd5$#das | password |
passconf |
yes | string | @#dskjfhd5$#das | password |
username |
yes | string | michal | username |
timezone |
yes | string | US/Mountain | timezone |
language |
yes | string | en | language |
terms |
yes | boolean | 1 | agree with terms and conditions |
1_1_3_alias_first_name |
yes | string | M | profile fields |
1_1_4_alias_last_name |
yes | string | Michal | profile fields |
In case of signup through Facebook, client will need to send facebook details also with post form values.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
facebook_uid |
yes | string | 1122872077726440 | facebook user id |
access_token |
yes | string | CAAWkWAuNawYBAJ3uhTwNsqxC5T1ZArICqfsYDnniTvGrl3ZCH… | facebook access token |
code |
yes | string | AQDN-hjg5gzdzBqjYEr7SC23T65ah2XPVgzG9gzC-aPHNaoWUy1WdIiScLjImlzHrkT8yXicGp… | facebook code |
email |
yes | string | michal@seaddons.com | email address |
username |
yes | string | michal | username |
timezone |
yes | string | US/Mountain | timezone |
language |
yes | string | en | language |
terms |
yes | boolean | 1 | agree with terms and conditions |
1_1_3_alias_first_name |
yes | string | M | profile fields |
1_1_4_alias_last_name |
yes | string | Michal | profile fields |
In case of signup through Twitter, client will need to send twitter details also with post form values.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
twitter_uid |
yes | string | 278526643412 | twitter user id |
twitter_token |
yes | string | 2785266434-Ll7cmPtr7DeQHVC8IdxLZo5yFwzNSrRpHuM0pBs | twitter token |
twitter_secret |
yes | string | jQ2GlrHSr7fxWKjlz18oHopLkYaHkY0zNz0P1PRewI2t5 | twitter secret key |
email |
yes | string | michal@seaddons.com | email address |
username |
yes | string | michal | username |
timezone |
yes | string | US/Mountain | timezone |
language |
yes | string | en | language |
terms |
yes | boolean | 1 | agree with terms and conditions |
1_1_3_alias_first_name |
yes | string | M | profile fields |
1_1_4_alias_last_name |
yes | string | Michal | profile fields |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"email": "michal@seaddons.com",
"password": "@#dskjfhd5$#das",
"passconf": "@#dskjfhd5$#das",
"username": "michal",
"timezone": "US/Mountain",
"language": "en",
"terms": 1,
"1_1_3_alias_first_name": M,
"1_1_4_alias_last_name": Michal,
}
200
Headers
Content-Type: application/json
Body
{
"token": "4a68af0f41e115140f05bd60f6f53151",
"user": {
"user_id": 3,
"username": "michal",
"displayname": "M Michal",
"photo_id": 0,
"status": null,
"status_date": null,
"locale": "English",
"language": "English",
"timezone": "US/Pacific",
"search": 1,
"show_profileviewers": 1,
"level_id": 4,
"invites_used": 0,
"extra_invites": 0,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-12-30 06:15:12",
"modified_date": "2015-05-19 05:56:21",
"lastlogin_date": "2015-05-19 05:30:20",
"update_date": null,
"member_count": 0,
"view_count": 6,
"location": "",
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal",
"cover": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png"
}
}
400
Headers
Content-Type: application/json
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"email": "Please complete this field - it is required.",
"password": "Please complete this field - it is required."
}
}
Validate Sign Up Form ¶
Validate Sign Up FormPOST/signup/validations
Validates the sign-up steps. You can break sign up into three steps:
-
Create Account: With the fields: email, password, timezone, language and profile type.
-
Profile Information: With the remaining profile fields.
-
Add Your Photo: With the profile photo field.
Validation can be done separately for the “Create Account” and “Profile Information” steps by passing their respective parameter in this API call.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
email |
yes | string | michal@seaddons.com | email address |
password |
yes | string | @#dskjfhd5$#das | password |
passconf |
yes | string | @#dskjfhd5$#das | password |
username |
yes | string | michal | username |
timezone |
yes | string | US/Mountain | timezone |
language |
yes | string | en | language |
terms |
yes | boolean | 1 | agree with terms and conditions |
1_1_3_alias_first_name |
yes | string | M | profile fields |
1_1_4_alias_last_name |
yes | string | Michal | profile fields |
Example URI
- account_validation (optional, boolean, `account_validation
string
(required) Default: 1`)validate “Create Account” fields of the sign up form. Default value is 1.
- fields_validation (optional, boolean, `fields_validation
string
(required) Default: 0`)validate “Profile Information” fields of the sign up form. Default value is 1.
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"email": "michal@seaddons.com",
"password": "@#dskjfhd5$#das",
"passconf": "@#dskjfhd5$#das",
"username": "michal",
"timezone": "US/Mountain",
"language": "en",
"terms": 1,
"1_1_3_alias_first_name": M,
"1_1_4_alias_last_name": Michal,
}
204
400
Headers
Content-Type: application/json
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"email": "Please complete this field - it is required.",
"password": "Please complete this field - it is required."
}
}
Members ¶
These are APIs for various things related to member listings and profiles such as: Browse Members, Members Search, Profile Fields, Friends, etc.
Browse Members ¶
Browse MembersGET/members
Get the members listing. Members can also be browsed and searched based on profile field values.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of users in response and use page
for the page number. [i.e: If you have 100 users and the first request has limit=20
and page=1
, then in that case the recent 20 users will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent users will be returned.]
Example URI
- profile_type (optional, integer, `profile_type
string
(required) Default: 1`)get members of this profile type.
- displayname
string
(optional) Example: displayname=michalget members with matching name.
- has_photo (optional, boolean, `has_photo
string
(required) Default: 1`)get members with / without profile photo.
- is_online (optional, boolean, `is_online
string
(required) Default: 1`)get members who are online / offline.
- 1_1_3_alias_first_name (optional, string, `1_1_3_alias_first_name
string
(required) Default: michal`)get members with matching value for this profile field. You can get the key name for profile field from the response of member search form.
- 1_1_4_alias_last_name (optional, string, `1_1_4_alias_last_name
string
(required) Default: x`)get members with matching value for this profile field. You can get the key name for profile field from the response of member search form.
- page
integer
(optional) Example: page=2return the ‘limit’ number of users of that page of member listings.
- limit
integer
(optional) Example: limit=20number of users. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"page": 1,
"response": [
{
"user_id": 217,
"username": "michal",
"displayname": "Linus Michal",
"photo_id": 25,
"status": "",
"status_date": "0000-00-00 00:00:00",
"locale": "English",
"language": "English",
"timezone": "US/Pacific",
"search": 1,
"show_profileviewers": 1,
"level_id": 4,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-11-20 05:57:44",
"modified_date": "2015-03-30 10:11:06",
"lastlogin_date": "2015-03-30 10:08:47",
"update_date": null,
"member_count": 0,
"view_count": 148,
"location": "",
"image": "http://example.com/public/user/19/0019_3c26.png",
"image_icon": "http://example.com/public/user/1c/001c_b8a4.png",
"image_profile": "http://example.com/public/user/1a/001a_0453.png",
"image_normal": "http://example.com/public/user/1b/001b_283c.png",
"content_url": "http://example.com/profile/michal",
"menus": ""
},
{
"user_id": 4,
"username": "test10",
"displayname": "Ronald Desuza",
"photo_id": 151,
"status": null,
"status_date": null,
"locale": "English",
"language": "English",
"timezone": "US/Pacific",
"search": 1,
"show_profileviewers": 1,
"level_id": 4,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2015-03-30 06:38:13",
"modified_date": "2015-03-30 10:07:59",
"lastlogin_date": "2015-03-30 06:38:14",
"update_date": null,
"member_count": 1,
"view_count": 2,
"location": "",
"image": "http://example.com/public/user/97/0097_d975.jpg",
"image_icon": "http://example.com/public/user/9a/009a_0f09.jpg",
"image_profile": "http://example.com/public/user/98/0098_d975.jpg",
"image_normal": "http://example.com/public/user/99/0099_0f09.jpg",
"content_url": "http://example.com/profile/michal",
"menus": {
"label": "Add Friend",
"name": "add_friend",
"url": "user/add",
"urlParams": {
"user_id": 4
}
}
}
],
"totalItemCount": 44
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Members Search Form ¶
Members Search FormGET/members/search-form
Get the search / filter members form. The search / filter parameters from this form will be used by ‘Browse Members’ API call to return results.
Example URI
200
Headers
Accept: application/json
Body
{
"form": [
{
"type": "Select",
"name": "profile_type",
"label": "Member Type",
"multiOptions": {
"1": "Regular Member",
"": " "
}
},
{
"type": "Text",
"name": "displayname",
"label": "Name"
},
{
"type": "Checkbox",
"name": "has_photo",
"label": "Only Members With Photos"
},
{
"type": "Checkbox",
"name": "is_online",
"label": "Only Online Members"
},
{
"type": "Submit",
"name": "submit",
"label": "Search"
}
],
"profile_fields": {
"Personal Details": [
{
"type": "Text",
"name": "1_1_3_alias_first_name",
"label": "First Name",
"description": "",
"hasValidator": true
},
{
"type": "Text",
"name": "1_1_4_alias_last_name",
"label": "Last Name",
"description": "",
"hasValidator": true
},
{
"type": "Select",
"name": "1_1_5_alias_gender",
"label": "Gender",
"description": "",
"multiOptions": [
"Male",
"Female"
]
},
{
"type": "Date",
"name": "1_1_6_alias_birthdate",
"label": "Birthday",
"description": ""
}
],
"Personal Information": [
{
"type": "Textarea",
"name": "1_1_13_alias_about_me",
"label": "About Me",
"description": "",
"hasValidator": true
}
]
}
}
User Profile ¶
User ProfileGET/user/profile
Get the user profile information and various components of user profile (like tabs info, gutter menu, etc.).
Example URI
- user_id (optional, integer, `user_id
string
(required) Default: 125`)user id of profile owner. Default value is logged-in user’s ID.
- gutter_menu (optional, boolean, `gutter_menu
string
(required) Default: 1`)get gutter menu’s array. Default value is 1.
- profile_tabs (optional, boolean, `profile_tabs
string
(required) Default: 1`)get profile tabs array. Default value is 1.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"gutterMenu": [
{
"label": "Edit My Profile",
"name": "user_home_edit",
"url": "members/edit/profile",
"urlParams": []
},
{
"label": "Block Member",
"name": "user_profile_block",
"url": "block/add",
"urlParams": {
"user_id": 14
}
},
{
"label": "Report",
"name": "user_profile_report",
"url": "report/create/subject/user_14",
"urlParams": {
"type": "user",
"id": 14
}
}
],
"profile_tabs": [
{
"label": "Updates",
"name": "update"
},
{
"label": "Info",
"name": "info"
},
{
"label": "Friends",
"name": "friends",
"totalItemCount": 34
},
{
"label": "Blogs",
"name": "blog",
"totalItemCount": 14
},
{
"label": "Groups",
"name": "group",
"totalItemCount": 23
},
{
"label": "Events",
"name": "event",
"totalItemCount": 75
},
{
"label": "Albums",
"name": "album",
"totalItemCount": 24
},
{
"label": "Classifieds",
"name": "classified",
"totalItemCount": 12
},
{
"label": "Forum Posts",
"name": "forum_topics",
"totalItemCount": 2
},
{
"label": "Music",
"name": "music",
"totalItemCount": 18
},
{
"label": "Polls",
"name": "poll",
"totalItemCount": 5
},
{
"label": "Videos",
"name": "video",
"totalItemCount": 45
}
],
"response": {
"user_id": 14,
"username": "michal",
"displayname": "M Michal",
"photo_id": 206,
"status": null,
"status_date": null,
"locale": "en",
"language": "en",
"timezone": "US/Pacific",
"search": 1,
"show_profileviewers": 1,
"level_id": 4,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2015-06-04 10:58:48",
"modified_date": "2015-06-04 10:58:49",
"lastlogin_date": "2015-06-04 10:58:49",
"update_date": null,
"member_count": 0,
"view_count": 1,
"location": "",
"url": "http://example.com/profile/test51",
"is_like": 0,
"like_count": 0,
"image": "http://example.com/public/user/ce/00ce_c36f.png?c=6e14",
"image_normal": "http://example.com/public/user/d0/00d0_779e.png?c=9148",
"image_profile": "http://example.com/public/user/cf/00cf_9c34.png?c=813e",
"image_icon": "http://example.com/public/user/d1/00d1_01e3.png?c=23ab",
"content_url": "http://example.com/profile/michal",
"member_type": "Regular Member",
"network_list": "",
"friend_count": 0
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Edit Profile Fields ¶
Get Profile Fields FormGET/members/edit/profile
Get the form for editing profile fields.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"form": {
"Personal Details": [
{
"type": "Text",
"name": "1_1_3_alias_first_name",
"label": "First Name",
"description": "",
"hasValidator": true
},
{
"type": "Text",
"name": "1_1_4_alias_last_name",
"label": "Last Name",
"description": "",
"hasValidator": true
},
{
"type": "Select",
"name": "1_1_5_alias_gender",
"label": "Gender",
"description": "",
"multiOptions": [
"Male",
"Female"
]
},
{
"type": "Date",
"name": "1_1_6_alias_birthdate",
"label": "Birthday",
"description": ""
}
],
"Contact Information": [
{
"type": "Text",
"name": "1_1_8_alias_",
"label": "Website",
"description": ""
},
{
"type": "Text",
"name": "1_1_9_alias_",
"label": "Twitter",
"description": ""
},
{
"type": "Text",
"name": "1_1_10_alias_",
"label": "Facebook",
"description": ""
},
{
"type": "Text",
"name": "1_1_11_alias_",
"label": "AIM",
"description": ""
}
],
"Personal Information": [
{
"type": "Textarea",
"name": "1_1_13_alias_about_me",
"label": "About Me",
"description": "",
"hasValidator": true
},
{
"type": "Text",
"name": "1_1_27_alias_website",
"label": "Website",
"description": "Enter Your Website:",
"hasValidator": true
}
]
},
"formValues": {
"1_1_3_alias_first_name": {
"value": "Alen",
"privacy": "everyone"
},
"1_1_4_alias_last_name": {
"value": "X",
"privacy": "everyone"
},
"1_1_5_alias_gender": {
"value": "",
"privacy": "everyone"
},
"1_1_6_alias_birthdate": {
"value": "",
"privacy": "everyone"
},
"1_1_8_alias_": {
"value": "",
"privacy": "everyone"
},
"1_1_9_alias_": {
"value": "",
"privacy": "everyone"
},
"1_1_10_alias_": {
"value": "",
"privacy": "everyone"
},
"1_1_11_alias_": {
"value": "",
"privacy": "everyone"
},
"1_1_13_alias_about_me": {
"value": "",
"privacy": "everyone"
},
"1_1_27_alias_website": {
"value": "http://example.com",
"privacy": "everyone"
}
}
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "profile_type_missing",
"message": "A Profile Type has not been configured for this user."
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit Profile FieldsPUT/members/edit/profile
Edit the profile fields values.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
1_1_3_alias_first_name |
yes | string | Alen | First name |
1_1_4_alias_last_name |
yes | string | J | Last name |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"1_1_3_alias_first_name": "Alen",
"1_1_4_alias_last_name": "J"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit Profile Photo ¶
Get Profile Photo FormGET/members/edit/photo
Get the edit profile photo form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"user_id":1,
"username":"admin",
"displayname":"Alen X",
"photo_id":0,
"status":"ewrewrwerwrr",
"status_date":"2015-06-12 05:02:34",
"locale":"fil_PH",
"language":"en_US",
"timezone":"Asia/Dubai",
"search":0,
"show_profileviewers":1,
"level_id":1,
"enabled":1,
"verified":1,
"approved":1,
"creation_date":"2014-11-11 06:00:28",
"modified_date":"2015-07-01 11:29:57",
"lastlogin_date":"2015-07-03 14:14:02",
"update_date":null,
"member_count":1,
"view_count":16,
"location":"",
"image":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url":"http://example.com/profile/michal",
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Change Profile PhotoPOST/members/edit/photo
Change the profile photo.
To upload the profile photo, send the file in multipart / form-data
format with the photo
API request parameters.
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Remove Profile Photo ¶
Remove Profile PhotoDELETE/members/edit/remove-photo
Remove the profile photo.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Get User Info ¶
Get User InfoGET/members/profile/get-member-info
Get the profile field values of the user.
Example URI
- user_id (optional, integer, `user_id
string
(required) Default: 125`)user id of profile owner. Default value is logged-in user’s ID.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"Personal Details": {
"First Name": "Alen",
"Last Name": "X"
},
"Personal Information": {
"About Me": "It's all about me.",
"Website": "http://example.com"
}
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Get Friends ¶
Get FriendsGET/user/get-friend-list
Get the user’s friends.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of users in response and use page
for the page number. [i.e: If you have 100 users and the first request has limit=20
and page=1
, then in that case the recent 20 users will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent users will be returned.]
Example URI
- user_id (optional, integer, `user_id
string
(required) Default: 125`)user id of profile owner. Default value is logged-in user’s ID.
- page
integer
(optional) Example: page=2use page to get next limit of friends.
- limit
integer
(optional) Example: limit=10number of friends. Default limit is 10.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"totalItemCount": 1,
"friends": [
{
"user_id": 3,
"username": "michal",
"displayname": "M Michal",
"photo_id": 0,
"status": null,
"status_date": null,
"locale": "English",
"language": "English",
"timezone": "US/Pacific",
"search": 1,
"show_profileviewers": 1,
"level_id": 4,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-12-30 06:15:12",
"modified_date": "2015-06-20 11:14:51",
"lastlogin_date": "2015-06-20 10:03:48",
"update_date": null,
"member_count": 1,
"view_count": 10,
"location": "",
"url": "http://example.com/profile/test2",
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal",
"menus": {
"label": "Remove Friend",
"name": "remove_friend",
"url": "user/remove",
"urlParams": {
"user_id": 3
}
}
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create New List ¶
Create New ListPOST/user/list-create
Create a new list for friends.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Family | list title |
friend_id |
no | integer | 178 | friend id |
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"title": "Family",
"friend_id": 178
}
200
Headers
Content-Type: application/json
Body
167
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Add Friend To List ¶
Add Friend To ListPOST/user/list-add
Add a friend to the created list.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
list_id |
yes | integer | 69 | list id |
friend_id |
no | integer | 178 | friend id |
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"list_id": 69,
"friend_id": 178
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Remove Friend From List ¶
Remove Friend From ListDELETE/user/list-remove
Remove a friend from a list.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
list_id |
yes | integer | 69 | list id |
friend_id |
no | integer | 178 | friend id |
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"list_id": 69,
"friend_id": 178
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete List ¶
Delete ListDELETE/user/list-delete
Delete a friend list.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
list_id |
yes | integer | 45 | list id |
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"list_id": 69
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Suggest Friends ¶
Suggest FriendsGET/user/suggest{?search}
Get the list of friend to be suggested to the user. This API call is useful for auto-suggest fields.
Example URI
- search
string
(optional) Example: search=alenstring to be matched with friends’ names.
- user_id (optional, integer, `user_id
string
(required) Default: 87`)user id of profile owner. Default value is logged-in user’s ID.
- guid
string
(optional) Example: guid=siteevent_event_3useful only for SocialEngineAddOns “Groups / Communities Plugin” and “Advanced Events Plugin”. Return list of friends, who have joined the guid resource id.
- limit
integer
(optional) Example: limit=10number of friends. Default limit is 10.
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
[
{
"type": "user",
"id": 2,
"guid": "user_2",
"label": "James Robert",
"photo": "http://example.com/public/user/41/02/023f_eabf.jpg"
},
{
"type": "user",
"id": 1,
"guid": "user_1",
"label": "Jennifer Aniston",
"photo": "http://example.com/public/user/41/02/023f_eabf.jpg"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Member Actions ¶
These APIs are for various actions related to members like add friend, remove friend, cancel friend request, accept friend request, block member, unblock member, etc.
Add Friend ¶
Add FriendPOST/user/add
Send friend request to a user.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 67 | user id to whom sent the friend request by logged-in user. |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"user_id": "67"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Cancel Friend Request ¶
Cancel Friend RequestPOST/user/cancel
Cancel the friend request sent to a user.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 67 | user id to whom cancel the sent friend request by logged-in user. |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"user_id": "67"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Accept Friend Request ¶
Accept Friend RequestPOST/user/confirm
Accept a friend request.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 67 | user id to whom accept the friend request by logged-in user. |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"user_id": "67"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Reject Friend Request ¶
Reject Friend RequestPOST/user/reject
Reject a friend request.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 67 | user id to whom reject the sent friend request by logged-in user. |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"user_id": "67"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Remove Friend ¶
Remove FriendPOST/user/remove
Remove friendship with a user.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 67 | user id of the friend to remove as friend by logged-in user. |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"user_id": "67"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Block Member ¶
Block MemberPOST/block/add
Block a user.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 67 | user id to whom make it block by logged-in user. |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"user_id": "67"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Unblock Member ¶
Unblock MemberPOST/block/remove
Unblock a user.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 67 | user id to whom unblock by logged-in user. |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"user_id": "67"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Make Profile Photo ¶
Make Profile PhotoPOST/members/edit/external-photo
Make an existing photo of the community as the profile photo.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
id |
no | integer | 67 | user id of profile owner. Default value is logged-in user’s ID. |
photo |
yes | string | group_photo_116 | photo guide |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"id": "67",
"photo": "group_photo_116"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Member Settings ¶
These APIs are for managing various member settings like:
-
General Settings: email address, profile address, timezone, locale, etc.
-
Privacy Settings
-
Network Settings: To join networks, leave networks, etc.
-
Notification Settings
-
Change Password
-
Delete Account
General Settings ¶
Get General Settings FormGET/members/settings/general
Get the member’s general settings form.
Returns the form
and formValues
as response. In form
we get the complete general settings form and in formValues
we get the form’s values.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"form": [
{
"type": "Text",
"name": "email",
"label": "Email Address",
"hasValidator": true
},
{
"type": "Text",
"name": "username",
"label": "Profile Address",
"hasValidator": true
},
{
"type": "Select",
"name": "timezone",
"label": "Timezone",
"description": "Select the city closest to you that shares your same timezone.",
"multiOptions": {
"US/Pacific": "(UTC-8) Pacific Time (US & Canada)",
"US/Mountain": "(UTC-7) Mountain Time (US & Canada)",
"US/Central": "(UTC-6) Central Time (US & Canada)",
"US/Eastern": "(UTC-5) Eastern Time (US & Canada)",
"America/Halifax": "(UTC-4) Atlantic Time (Canada)",
"America/Anchorage": "(UTC-9) Alaska (US & Canada)",
"Pacific/Honolulu": "(UTC-10) Hawaii (US)",
"Pacific/Samoa": "(UTC-11) Midway Island, Samoa",
"Etc/GMT-12": "(UTC-12) Eniwetok, Kwajalein",
"Canada/Newfoundland": "(UTC-3:30) Canada/Newfoundland",
"America/Buenos_Aires": "(UTC-3) Brasilia, Buenos Aires, Georgetown",
"Atlantic/South_Georgia": "(UTC-2) Mid-Atlantic",
"Atlantic/Azores": "(UTC-1) Azores, Cape Verde Is.",
"Europe/London": "Greenwich Mean Time (Lisbon, London)",
"Europe/Berlin": "(UTC+1) Amsterdam, Berlin, Paris, Rome, Madrid",
"Europe/Athens": "(UTC+2) Athens, Helsinki, Istanbul, Cairo, E. Europe",
"Europe/Moscow": "(UTC+3) Baghdad, Kuwait, Nairobi, Moscow",
"Iran": "(UTC+3:30) Tehran",
"Asia/Dubai": "(UTC+4) Abu Dhabi, Kazan, Muscat",
"Asia/Kabul": "(UTC+4:30) Kabul",
"Asia/Yekaterinburg": "(UTC+5) Islamabad, Karachi, Tashkent",
"Asia/Calcutta": "(UTC+5:30) Bombay, Calcutta, New Delhi",
"Asia/Katmandu": "(UTC+5:45) Nepal",
"Asia/Omsk": "(UTC+6) Almaty, Dhaka",
"India/Cocos": "(UTC+6:30) Cocos Islands, Yangon",
"Asia/Krasnoyarsk": "(UTC+7) Bangkok, Jakarta, Hanoi",
"Asia/Hong_Kong": "(UTC+8) Beijing, Hong Kong, Singapore, Taipei",
"Asia/Tokyo": "(UTC+9) Tokyo, Osaka, Sapporto, Seoul, Yakutsk",
"Australia/Adelaide": "(UTC+9:30) Adelaide, Darwin",
"Australia/Sydney": "(UTC+10) Brisbane, Melbourne, Sydney, Guam",
"Asia/Magadan": "(UTC+11) Magadan, Soloman Is., New Caledonia",
"Pacific/Auckland": "(UTC+12) Fiji, Kamchatka, Marshall Is., Wellington"
}
},
{
"type": "Select",
"name": "locale",
"label": "Locale",
"description": "Dates, times, and other settings will be displayed using this locale setting.",
"multiOptions": {
"auto": "[Automatic]",
"af_NA": "Afrikaans (Namibia)",
"af_ZA": "Afrikaans (Timog Afrika)",
"af": "Afrikaans",
"am_ET": "Amharic (Ethiopia)",
"am": "Amharic",
"ar_AE": "Arabic (United Arab Emirates)",
"ar_BH": "Arabic (Bahrain)",
"ar_DZ": "Arabic (Algeria)",
"ar_EG": "Arabic (Ehipto)",
"ar_IQ": "Arabic (Iraq)",
"ar_JO": "Arabic (Jordan)",
"ar_LB": "Arabic (Lebanon)",
"ar_LY": "Arabic (Libya)",
"ar_MA": "Arabic (Morocco)",
"ar_OM": "Arabic (Oman)",
"ar_SA": "Arabic (Saudi Arabya)",
"ar_SD": "Arabic (Sudan)",
"ar_SY": "Arabic (Syria)",
"ar_TN": "Arabic (Tunisia)",
"ar_YE": "Arabic (Yemen)",
"ar": "Arabic",
"as_IN": "Assamese (India)",
"as": "Assamese",
"az_AZ": "Azerbaijani (Azerbaijan)",
"az": "Azerbaijani",
"be_BY": "Belarusian (Belarus)",
"be": "Belarusian",
"bg_BG": "Bulgarian (Bulgaria)",
"bg": "Bulgarian",
"bn_BD": "Bengali; Bangla (Bangladesh)",
"bn_IN": "Bengali; Bangla (India)",
"bn": "Bengali; Bangla",
"bs_BA": "Bosnian (Bosnia and Herzegovina)",
"bs": "Bosnian",
"ca_ES": "Catalan (Espanya)",
"ca": "Catalan",
"cs_CZ": "Czech (Czech Republic)",
"cs": "Czech",
"cy_GB": "Welsh (United Kingdom)",
"cy": "Welsh",
"da_DK": "Danish (Denmark)",
"da": "Danish",
"de_AT": "Aleman (Austria)",
"de_BE": "Aleman (Belgium)",
"de_CH": "Aleman (Switzerland)",
"de_DE": "Aleman (Alemaya)",
"de_LI": "Aleman (Liechtenstein)",
"de": "Aleman",
"el_CY": "Griyego (Cyprus)",
"el_GR": "Griyego (Griyego)",
"el": "Griyego",
"en_AS": "Ingles (American Samoa)",
"en_AU": "Ingles (Australia)",
"en_BE": "Ingles (Belgium)",
"en_BW": "Ingles (Botswana)",
"en_BZ": "Ingles (Belize)",
"en_CA": "Ingles (Canada)",
"en_GB": "Ingles (UK)",
"en_HK": "Ingles (Hong Kong SAR China)",
"en_IE": "Ingles (Ireland)",
"en_IN": "Ingles (India)",
"en_MH": "Ingles (Marshall Islands)",
"en_MP": "Ingles (Northern Mariana Islands)",
"en_NA": "Ingles (Namibia)",
"en_NZ": "Ingles (New Zealand)",
"en_PH": "Ingles (Pilipinas)",
"en_PK": "Ingles (Pakistan)",
"en_TT": "Ingles (Trinidad and Tobago)",
"en_UM": "Ingles (United States minor outlying islands)",
"en_US": "Ingles (US)",
"en_VI": "Ingles (U.S. Virgin Islands)",
"en_ZA": "Ingles (Timog Afrika)",
"en_ZW": "Ingles (Zimbabwe)",
"en": "Ingles",
"eo": "Esperanto",
"es_AR": "Espanyol (Argentina)",
"es_BO": "Espanyol (Bolivia)",
"es_CL": "Espanyol (Chile)",
"es_CO": "Espanyol (Colombia)",
"es_CR": "Espanyol (Costa Rica)",
"es_DO": "Espanyol (Dominican Republic)",
"es_EC": "Espanyol (Ecuador)",
"es_ES": "Espanyol (Espanya)",
"es_HN": "Espanyol (Honduras)",
"es_MX": "Espanyol (Mehiko)",
"es_NI": "Espanyol (Nicaragua)",
"es_PE": "Espanyol (Peru)",
"es_PY": "Espanyol (Paraguay)",
"es_SV": "Espanyol (El Salvador)",
"es_US": "Espanyol (United States)",
"es_UY": "Espanyol (Uruguay)",
"es_VE": "Espanyol (Venezuela)",
"es": "Espanyol",
"et_EE": "Estonian (Estonia)",
"et": "Estonian",
"eu_ES": "Basque (Espanya)",
"eu": "Basque",
"fa_AF": "Persian (Afghanistan)",
"fa_IR": "Persian (Iran)",
"fa": "Persian",
"fi_FI": "Finnish (Finland)",
"fi": "Finnish",
"fil_PH": "Filipino (Pilipinas)",
"fil": "Filipino",
"fo_FO": "Faroeso (Faroe Islands)",
"fo": "Faroeso",
"fr_BE": "Pranses (Belgium)",
"fr_CA": "Pranses (Canada)",
"fr_CH": "Pranses (Switzerland)",
"fr_FR": "Pranses (Pranses)",
"fr_SN": "Pranses (Senegal)",
"fr": "Pranses",
"ga_IE": "Irish (Ireland)",
"ga": "Irish",
"gl_ES": "Galician (Espanya)",
"gl": "Galician",
"gu_IN": "Gujarati (India)",
"gu": "Gujarati",
"he_IL": "Hebreo (Israel)",
"he": "Hebreo",
"hi_IN": "Hindu (India)",
"hi": "Hindu",
"hr_HR": "Croatian (Croatia)",
"hr": "Croatian",
"hu_HU": "Hungarian (Hungary)",
"hu": "Hungarian",
"hy_AM": "Armenian (Armenia)",
"hy": "Armenian",
"ia": "Interlingua",
"id_ID": "Indonesian (Indonesia)",
"id": "Indonesian",
"is_IS": "Icelandic (Iceland)",
"is": "Icelandic",
"it_CH": "Italyano (Switzerland)",
"it_IT": "Italyano (Italya)",
"it": "Italyano",
"ja_JP": "Japanese (Japan)",
"ja": "Japanese",
"ka_GE": "Georgian (Georgia)",
"ka": "Georgian",
"km_KH": "Khmer (Cambodia)",
"km": "Khmer",
"kn_IN": "Kannada (India)",
"kn": "Kannada",
"ko_KR": "Korean (Timog Korea)",
"ko": "Korean",
"ku_IQ": "Kurdish (Iraq)",
"ku_IR": "Kurdish (Iran)",
"ku_SY": "Kurdish (Syria)",
"ku_TR": "Kurdish (Turkey)",
"ku": "Kurdish",
"ky_KG": "Kirghiz (Kyrgyzstan)",
"ky": "Kirghiz",
"ln_CD": "Lingala (Congo - Kinshasa)",
"ln_CG": "Lingala (Congo)",
"ln": "Lingala",
"lo_LA": "Lao (Laos)",
"lo": "Lao",
"lt_LT": "Lithuanian (Lithuania)",
"lt": "Lithuanian",
"lv_LV": "Latvian (Latvia)",
"lv": "Latvian",
"mk_MK": "Macedonian (Macedonia)",
"mk": "Macedonian",
"ml_IN": "Malayalam (India)",
"ml": "Malayalam",
"mn_CN": "Mongolian (Tsina)",
"mn_MN": "Mongolian (Mongolia)",
"mn": "Mongolian",
"mr_IN": "Marathi (India)",
"mr": "Marathi",
"ms_BN": "Malay (Brunei)",
"ms_MY": "Malay (Malaysia)",
"ms": "Malay",
"mt": "Maltese",
"ne_IN": "Nepali (India)",
"ne_NP": "Nepali (Nepal)",
"ne": "Nepali",
"nl_BE": "Olandes (Belgium)",
"nl_NL": "Olandes (Netherlands)",
"nl": "Olandes",
"nn_NO": "Norwegian Nynorsk (Norway)",
"nn": "Norwegian Nynorsk",
"no": "Norwegian",
"oc_FR": "Occitan (Pranses)",
"oc": "Occitan",
"or_IN": "Oriya (India)",
"or": "Oriya",
"pa_IN": "Punjabi (India)",
"pa_PK": "Punjabi (Pakistan)",
"pa": "Punjabi",
"pl_PL": "Polish (Poland)",
"pl": "Polish",
"ps_AF": "Pashto (Afghanistan)",
"ps": "Pashto",
"pt_BR": "Portuges (Brasil)",
"pt_PT": "Portuges (Portugal)",
"pt": "Portuges",
"ro_MD": "Romanian (Moldova)",
"ro_RO": "Romanian (Romania)",
"ro": "Romanian",
"ru_RU": "Ruso (Russia)",
"ru_UA": "Ruso (Ukraine)",
"ru": "Ruso",
"sa_IN": "Sanskrit (India)",
"sa": "Sanskrit",
"sh_BA": "Serbo-Croatian (Bosnia and Herzegovina)",
"sh_CS": "Serbo-Croatian (Serbia at Montenegro)",
"sh": "Serbo-Croatian",
"si_LK": "Sinhalese (Sri Lanka)",
"si": "Sinhalese",
"sk_SK": "Eslobak (Slovakia)",
"sk": "Eslobak",
"sl_SI": "Eslobenyan (Slovenia)",
"sl": "Eslobenyan",
"so_DJ": "Somali (Djibouti)",
"so_ET": "Somali (Ethiopia)",
"so_KE": "Somali (Kenya)",
"so_SO": "Somali (Somalia)",
"so": "Somali",
"sq_AL": "Albanian (Albania)",
"sq": "Albanian",
"sr_BA": "Serbiran (Bosnia and Herzegovina)",
"sr_CS": "Serbiran (Serbia at Montenegro)",
"sr_ME": "Serbiran (Montenegro)",
"sr_RS": "Serbiran (Serbia)",
"sr": "Serbiran",
"st_LS": "Sesoto (Lesotho)",
"st_ZA": "Sesoto (Timog Afrika)",
"st": "Sesoto",
"sv_FI": "Suwiso (Finland)",
"sv_SE": "Suwiso (Sweden)",
"sv": "Suwiso",
"sw_KE": "Swahili (Kenya)",
"sw_TZ": "Swahili (Tanzania)",
"sw": "Swahili",
"ta_IN": "Tamil (India)",
"ta": "Tamil",
"te_IN": "Telugu (India)",
"te": "Telugu",
"th_TH": "Thai (Thailand)",
"th": "Thai",
"ti_ER": "Tigrinya (Eritrea)",
"ti_ET": "Tigrinya (Ethiopia)",
"ti": "Tigrinya",
"tl": "Tagalog",
"tr_TR": "Turko (Turkey)",
"tr": "Turko",
"ug_CN": "Uighur (Tsina)",
"ug": "Uighur",
"uk_UA": "Ukranian (Ukraine)",
"uk": "Ukranian",
"ur_IN": "Urdu (India)",
"ur_PK": "Urdu (Pakistan)",
"ur": "Urdu",
"uz_AF": "Uzbeko (Afghanistan)",
"uz_UZ": "Uzbeko (Uzbekistan)",
"uz": "Uzbeko",
"vi_VN": "Vietnamese (Vietnam)",
"vi": "Vietnamese",
"wo_SN": "Wolof (Senegal)",
"wo": "Wolof",
"xh_ZA": "Xhosa (Timog Afrika)",
"xh": "Xhosa",
"zh_CN": "zh (Tsina)",
"zh_HK": "zh (Hong Kong SAR China)",
"zh_MO": "zh (Macao)",
"zh_TW": "zh (Taiwan)",
"zh": "zh",
"zu_ZA": "Zulu (Timog Afrika)",
"zu": "Zulu"
}
},
{
"type": "Submit",
"name": "submit",
"label": "Save Changes"
}
],
"formValues": {
"user_id": 134,
"email": "michal@example.com",
"username": "michal",
"displayname": "M Michal",
"photo_id": 0,
"status": "ewrewrwerwrr",
"status_date": "2015-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-11-11 06:00:28",
"modified_date": "2015-06-19 11:13:10",
"lastlogin_date": "2015-06-20 05:04:01",
"update_date": null,
"member_count": 23,
"view_count": 136,
"location": ""
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit General SettingsPUT/members/settings/general
Edit the member’s general settings.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
email |
yes | string | michal@example.com | member’s email |
username |
yes | string | michal | member’s username |
timezone |
yes | string | US/Central | member’s timezone |
locale |
yes | string | en_US | member’s locale |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"email": "michal@example.com",
"username": "michal",
"timezone": "US/Central",
"locale": "en_US"
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"email": "Please enter a valid email address.",
"username": "Please enter a valid profile address."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Privacy Settings ¶
Get Privacy Settings FormGET/members/settings/privacy
Get the member’s privacy settings form.
Returns the form
and formValues
as response. In form
we get the complete privacy settings form and in formValues
we get the form’s values.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"form": [
{
"type": "Checkbox",
"name": "search",
"label": "Do not display me in searches, browsing members, or the \"Online Members\" list."
},
{
"type": "Radio",
"name": "privacy",
"label": "Profile Privacy",
"description": "Who can view your profile?",
"multiOptions": {
"owner": "Only Me",
"member": "Only My Friends",
"network": "Friends & Networks",
"registered": "All Registered Members",
"everyone": "Everyone"
}
},
{
"type": "Radio",
"name": "comment",
"label": "Profile Posting Privacy",
"description": "Who can post on your profile?",
"multiOptions": {
"owner": "Only Me",
"member": "Only My Friends",
"network": "Friends & Networks",
"registered": "All Registered Members"
}
},
{
"type": "MultiCheckbox",
"name": "publishTypes",
"label": "Recent Activity Privacy",
"description": "Which of the following things do you want to have published about you in the recent activity feed? Note that changing this setting will only affect future news feed items.",
"multiOptions": {
"album_photo_new": "New photo albums",
"blog_new": "New blog entries",
"classified_new": "New classified listings",
"comment_album": "Comments on your photo albums",
"comment_album_photo": "Comments on your photos",
"comment_blog": "Comments on your blogs",
"comment_classified": "Comments on your classified listings",
"comment_playlist": "Comments on your playlists",
"comment_poll": "Comments on your polls",
"comment_video": "Comments on your videos",
"event_create": "New events",
"event_join": "Joining an event",
"event_photo_upload": "Uploading a photo to an event",
"event_topic_create": "Creating an event discussion topic",
"event_topic_reply": "Replying to an event discussion topic",
"forum_promote": "Forum promotions",
"forum_topic_create": "Creating a forum topic",
"forum_topic_reply": "Replying to a forum topic",
"friends": "When I become friends with someone",
"group_create": "New groups",
"group_join": "Joining a group",
"group_photo_upload": "Uploading a group photo",
"group_promote": "Group promotions",
"group_topic_create": "Creating a group discussion topic",
"group_topic_reply": "Replying to a group discussion topic",
"music_playlist_new": "New playlists",
"network_join": "Joining a network",
"poll_new": "New polls",
"post_self": "Posting a status update to your own profile",
"post_self_link": "Posting a status update with link on your own profile",
"post_self_music": "Posting a status update with music on your own profile",
"post_self_photo": "Posting a status update with photo on your own profile",
"post_self_video": "Posting a status update with video on your own profile",
"profile_photo_update": "Changing your photo",
"share": "Activity Feed Item Shared",
"sitetagcheckin_add_to_map": "When someone adds current date while checking into any content posted by me.",
"sitetagcheckin_album_photo_new": "When I add location to my photo albums (object).",
"sitetagcheckin_checkin": "When I post only my location.",
"sitetagcheckin_content": "When someone checks into any content posted by me.",
"sitetagcheckin_lct_add_to_map": "When someone adds previous date while checking into any content posted by me.",
"sitetagcheckin_location": "When I add location to my photos (object).",
"sitetagcheckin_post": "When I add location while posting in a content.",
"sitetagcheckin_post_self": "When I add location to my posts.",
"sitetagcheckin_profile_photo": "When I add location to my profile photos (object).",
"sitetagcheckin_status": "When I add location to my posts.",
"sitetagcheckin_tagged_new": "When I add location to a photo in which my friends are already tagged.",
"tagged": "Tagged",
"video_new": "New videos"
}
},
{
"type": "Submit",
"name": "submit",
"label": "Save Changes"
}
],
"formValues": {
"user_id": 134,
"email": "michal@example.com",
"username": "michal",
"displayname": "M Michal",
"photo_id": 0,
"status": "ewrewrwerwrr",
"status_date": "2015-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-11-11 06:00:28",
"modified_date": "2015-06-19 11:13:10",
"lastlogin_date": "2015-06-20 05:04:01",
"update_date": null,
"member_count": 23,
"view_count": 136,
"location": ""
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit Privacy SettingsPUT/members/settings/privacy
Edit the member’s privacy settings.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
search |
no | boolean | 1 | do not display me in searches, browsing members, or the “Online Members” list. |
privacy |
yes | string | everyone | who all can view profile? |
comment |
yes | string | registered | who all can post on the profile? |
publishTypes |
no | array | [“post_self_video”,“tagged”] | activities about user that can be published in activity feeds. |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"search": 1,
"privacy": "everyone",
"comment": "registered",
"publishTypes": '["post_self_photo","post_self_video","share","tagged"]'
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Network Settings ¶
Get Networks ListGET/members/settings/network
Get the list of member’s “Available Networks” and “Joined Networks”.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"availableNetworks": [
{
"network_id": 5,
"title": "Africa",
"description": "",
"field_id": 0,
"pattern": null,
"member_count": 0,
"hide": 0,
"assignment": 0
},
{
"network_id": 4,
"title": "Asia",
"description": "",
"field_id": 0,
"pattern": null,
"member_count": 0,
"hide": 0,
"assignment": 0
},
{
"network_id": 6,
"title": "Australia",
"description": "",
"field_id": 0,
"pattern": null,
"member_count": 0,
"hide": 0,
"assignment": 0
},
{
"network_id": 3,
"title": "Europe",
"description": "",
"field_id": 0,
"pattern": null,
"member_count": 0,
"hide": 0,
"assignment": 0
},
{
"network_id": 1,
"title": "North America",
"description": "",
"field_id": 0,
"pattern": null,
"member_count": 0,
"hide": 0,
"assignment": 0
},
{
"network_id": 2,
"title": "South America",
"description": "",
"field_id": 0,
"pattern": null,
"member_count": 0,
"hide": 0,
"assignment": 0
}
],
"joinedNetworks": [
{
"network_id": 7,
"title": "Antarctica",
"description": "",
"field_id": 0,
"pattern": null,
"member_count": 1,
"hide": 0,
"assignment": 0
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Join / Leave NetworkPOST/members/settings/network
Join or leave a network. The parameter passed must be join_id
if user is joining a network, or it must be leave_id if user is leaving a network.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
join_id / leave_id |
yes | integer | 2 | network id |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"join_id": 2,
"leave_id": 5
}
201
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Notification Settings ¶
Get Notification Settings FormGET/members/settings/notifications
Get the member’s notification settings form.
Returns the form
and formValues
as response. In form
we get the complete notification settings form and in formValues
we get the form’s values.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"form": [
{
"category": "General",
"types": [
{
"type": "Checkbox",
"name": "commented",
"label": "When people comment on things I post."
},
{
"type": "Checkbox",
"name": "commented_commented",
"label": "When people comment on the same thing as me."
},
{
"type": "Checkbox",
"name": "friend_accepted",
"label": "When someone accepts my friend request."
},
{
"type": "Checkbox",
"name": "friend_request",
"label": "When I receive a friend request."
},
{
"type": "Checkbox",
"name": "liked",
"label": "When people like things I post."
},
{
"type": "Checkbox",
"name": "liked_commented",
"label": "When people comment on things I've liked."
},
{
"type": "Checkbox",
"name": "message_new",
"label": "When I receive a message."
},
{
"type": "Checkbox",
"name": "post_user",
"label": "When people post on my profile."
},
{
"type": "Checkbox",
"name": "shared",
"label": "When activity feed item is shared."
},
{
"type": "Checkbox",
"name": "tagged",
"label": "When I'm tagged in photos and other places."
}
]
},
{
"category": "Advanced Activity Feeds / Wall Plugin",
"types": [
{
"type": "Checkbox",
"name": "aaf_tagged",
"label": "When my content is tagged."
}
]
},
{
"category": "Blogs",
"types": [
{
"type": "Checkbox",
"name": "blog_subscribed_new",
"label": "When a new blog entry is posted by a member you have subscribed to."
}
]
},
{
"category": "Events",
"types": [
{
"type": "Checkbox",
"name": "event_accepted",
"label": "When my request to attend an event is approved."
},
{
"type": "Checkbox",
"name": "event_approve",
"label": "When someone request to join my event."
},
{
"type": "Checkbox",
"name": "event_discussion_reply",
"label": "When people reply to discussion topics that I've replied to."
},
{
"type": "Checkbox",
"name": "event_discussion_response",
"label": "When people reply to discussion topics that I create."
},
{
"type": "Checkbox",
"name": "event_invite",
"label": "When I'm invited to attend an event."
}
]
},
{
"category": "Forum",
"types": [
{
"type": "Checkbox",
"name": "forum_promote",
"label": "When I'm given moderator status in a forum."
},
{
"type": "Checkbox",
"name": "forum_topic_reply",
"label": "When people reply to forum topics that I've replied to."
},
{
"type": "Checkbox",
"name": "forum_topic_response",
"label": "When people reply to forum topics that I create."
}
]
},
{
"category": "Groups",
"types": [
{
"type": "Checkbox",
"name": "group_accepted",
"label": "When my request to join a group is approved."
},
{
"type": "Checkbox",
"name": "group_approve",
"label": "When someone requests to join a group I created."
},
{
"type": "Checkbox",
"name": "group_discussion_reply",
"label": "When people reply to discussion topics that I've replied to."
},
{
"type": "Checkbox",
"name": "group_discussion_response",
"label": "When people reply to discussion topics that I create."
},
{
"type": "Checkbox",
"name": "group_invite",
"label": "When I'm invited to join a group."
},
{
"type": "Checkbox",
"name": "group_promote",
"label": "When I'm given officer status in a group."
}
]
},
{
"category": "Geo-Location, Geo-Tagging, Check-Ins & Proximity Search Plugin",
"types": [
{
"type": "Checkbox",
"name": "sitetagcheckin_business_tagged",
"label": "When someone adds my business as location."
},
{
"type": "Checkbox",
"name": "sitetagcheckin_page_tagged",
"label": "When someone adds my page as location."
},
{
"type": "Checkbox",
"name": "sitetagcheckin_tagged",
"label": "When I am tagged-in a post."
},
{
"type": "Checkbox",
"name": "sitetagcheckin_tagged_location",
"label": "When location is added to the photo (object) I'm tagged-in."
}
]
},
{
"category": "Videos",
"types": [
{
"type": "Checkbox",
"name": "video_processed",
"label": "When a video has been processed."
},
{
"type": "Checkbox",
"name": "video_processed_failed",
"label": "When a video has failed to be processed."
}
]
}
],
"formValues": [
"aaf_tagged",
"blog_subscribed_new",
"event_accepted",
"event_approve",
"event_discussion_reply",
"event_discussion_response",
"event_invite",
"forum_topic_response",
"friend_accepted",
"friend_request",
"group_accepted",
"group_approve",
"group_discussion_reply",
"group_discussion_response",
"group_invite",
"group_promote",
"liked",
"liked_commented",
"message_new",
"post_user",
"shared",
"sitetagcheckin_business_tagged",
"sitetagcheckin_page_tagged",
"sitetagcheckin_tagged",
"sitetagcheckin_tagged_location",
"tagged",
"video_processed",
"video_processed_failed"
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit Notification SettingsPUT/members/settings/notifications
Edit the member’s notification settings.
If any notification type’s parameter is not sent in request, then its notifications will get disabled.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
event_accepted |
no | boolean | 1 | enable notification |
forum_topic_response |
no | boolean | 1 | enable notification |
group_accepted |
no | boolean | 1 | enable notification |
liked |
no | boolean | 1 | enable notification |
liked_commented |
no | boolean | 1 | enable notification |
message_new |
no | boolean | 1 | enable notification |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"event_accepted": 1,
"forum_topic_response": 1,
"group_accepted": 1,
"liked": 1,
"liked_commented": 1,
"message_new": 1
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Change Password ¶
Get Change Password FormGET/members/settings/password
Get the member’s change password form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Password",
"name": "oldPassword",
"label": "Old Password",
"hasValidator": true
},
{
"type": "Password",
"name": "password",
"label": "New Password",
"description": "Passwords must be at least 6 characters in length.",
"hasValidator": true
},
{
"type": "Password",
"name": "passwordConfirm",
"label": "New Password (again)",
"description": "Enter your password again for confirmation.",
"hasValidator": true
},
{
"type": "Submit",
"name": "submit",
"label": "Change Password"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit PasswordPOST/members/settings/password
Edit the member’s password.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
oldPassword |
yes | string | @*&adad%$34F#$ | old password |
password |
yes | string | @*&ada534gsgd%$34F#$ | new password |
passwordConfirm |
yes | string | @*&ada534gsgd%$34F#$ | new password |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"oldPassword": "@*&adad%$34F#$",
"password": "@*&ada534gsgd%$34F#$",
"passwordConfirm": "@*&ada534gsgd%$34F#$"
}
204
400
Headers
Content-Type: application/json
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"oldPassword": "Please complete this field - it is required.",
"password": "Please complete this field - it is required.",
"passwordConfirm": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Account ¶
Delete AccountDELETE/members/settings/delete
Delete the member’s account.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Notifications ¶
These APIs are for various things related to notifications like fetching all notifications, friend requests, new notifications count, messages count, marking notifications as read, etc.
Get Notifications ¶
Get NotificationsGET/notifications{?myRequests}
Get the member’s notifications of various types.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of notifications in response and use page
for the page number. [i.e: If you have 100 notifications and the first request has limit=20
and page=1
, then in that case the recent 20 notifications will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent notifications will be returned.]
Example URI
- myRequests
boolean
(optional) Example: myRequests=0get notifications of “My Requests” section. Default value is 1.
- recentUpdates
boolean
(optional) Example: recentUpdates=0get notifications of “Recent Updates” section. Default value is 1
- subject
boolean
(optional) Example: subject=0get array of notification’s subject with each notification.
- object
boolean
(optional) Example: object=0get array of notification’s object with each notification.
- page
integer
(optional) Example: page=2return the ‘limit’ number of notifications of that page of notification listings.
- limit
integer
(optional) Example: limit=10number of notifications. Default limit is 10.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"requestTotalItemCount": 1,
"myRequests": [
{
"notification_id": 124,
"user_id": 3,
"subject_type": "user",
"subject_id": 1,
"object_type": "user",
"object_id": 3,
"type": "friend_request",
"params": null,
"read": 0,
"mitigated": 0,
"date": "2015-06-20 10:14:15",
"show": 0,
"action_type_body": "{item:$subject} has requested to be your friend.",
"feed_title": "M Michal has requested to be your friend.",
"action_type_body_params": [
{
"search": "{item:$subject}",
"label": "M Michal",
"type": "user",
"id": 1
}
],
"request_action": {
"label": "Accept Request",
"name": "accept_request",
"url": "user/confirm",
"urlParams": {
"user_id": 1
}
},
"subject": {
"user_id": 123,
"username": "michal",
"displayname": "M Michal",
"photo_id": 0,
"status": "ewrewrwerwrr",
"status_date": "2015-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-11-11 06:00:28",
"modified_date": "2015-06-19 11:13:10",
"lastlogin_date": "2015-06-20 10:13:46",
"update_date": null,
"member_count": 0,
"view_count": 16,
"location": "",
"image": "",
"image_icon": "",
"image_profile": "",
"image_normal": ""
},
"object": {
"user_id": 233,
"username": "john",
"displayname": "K John",
"photo_id": 0,
"status": null,
"status_date": null,
"locale": "English",
"language": "English",
"timezone": "US/Pacific",
"search": 1,
"show_profileviewers": 1,
"level_id": 4,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-12-30 06:15:12",
"modified_date": "2015-05-19 05:56:21",
"lastlogin_date": "2015-06-20 10:03:48",
"update_date": null,
"member_count": 0,
"view_count": 9,
"location": "",
"image": "",
"image_icon": "",
"image_profile": "",
"image_normal": ""
}
}
],
"recentUpdateTotalItemCount": 15,
"recentUpdates": [
{
"notification_id": 117,
"user_id": 3,
"subject_type": "user",
"subject_id": 1,
"object_type": "activity_action",
"object_id": 170,
"type": "tagged",
"params": {
"object_type_name": "post",
"label": "post"
},
"read": 0,
"mitigated": 0,
"date": "2015-05-28 10:30:36",
"show": 1,
"action_type_body": "{item:$subject} tagged you in a {item:$object:$label}.",
"feed_title": "M Michal tagged you in a post.",
"action_type_body_params": [
{
"search": "{item:$subject}",
"label": "M Michal",
"type": "user",
"id": 123
},
{
"search": "{item:$object:$label}",
"label": "post",
"type": "",
"id": ""
}
],
"subject": {
"user_id": 1,
"username": "michal",
"displayname": "M Michal",
"photo_id": 0,
"status": "ewrewrwerwrr",
"status_date": "2015-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-11-11 06:00:28",
"modified_date": "2015-06-19 11:13:10",
"lastlogin_date": "2015-06-20 10:13:46",
"update_date": null,
"member_count": 0,
"view_count": 16,
"location": "",
"image": "",
"image_icon": "",
"image_profile": "",
"image_normal": ""
},
"object": {
"action_id": 170,
"type": "post_self",
"subject_type": "user",
"subject_id": 1,
"object_type": "user",
"object_id": 1,
"body": "Good News!",
"params": "[]",
"date": "2015-05-28 09:28:10",
"attachment_count": 1,
"comment_count": 2,
"like_count": 1,
"privacy": null,
"commentable": 1,
"shareable": 1,
"user_agent": null,
"image": "",
"image_icon": "",
"image_profile": "",
"image_normal": ""
}
},
{
"notification_id": 103,
"user_id": 3,
"subject_type": "user",
"subject_id": 1,
"object_type": "blog",
"object_id": 18,
"type": "blog_subscribed_new",
"params": null,
"read": 0,
"mitigated": 0,
"date": "2015-05-06 06:05:16",
"show": 1,
"action_type_body": "{item:$subject} has posted a new blog entry: {item:$object}.",
"feed_title": "M Michal has posted a new blog entry: .",
"action_type_body_params": [
{
"search": "{item:$subject}",
"label": "M Michal",
"type": "user",
"id": 1
},
{
"search": "{item:$object}",
"label": "",
"type": "blog",
"id": 18
}
],
"subject": {
"user_id": 1,
"username": "michal",
"displayname": "M Michal",
"photo_id": 0,
"status": "ewrewrwerwrr",
"status_date": "2015-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-11-11 06:00:28",
"modified_date": "2015-06-19 11:13:10",
"lastlogin_date": "2015-06-20 10:13:46",
"update_date": null,
"member_count": 0,
"view_count": 16,
"location": "",
"image": "",
"image_icon": "",
"image_profile": "",
"image_normal": ""
},
"object": {
"blog_id": 18,
"title": "",
"body": "",
"owner_type": "user",
"owner_id": 1,
"category_id": 1,
"creation_date": "2015-05-06 06:05:16",
"modified_date": "2015-05-06 06:05:16",
"view_count": 0,
"comment_count": 0,
"search": 1,
"draft": 0,
"image": "",
"image_icon": "",
"image_profile": "",
"image_normal": ""
}
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Get Friend Requests ¶
Get Friend RequestsGET/notifications/friend-request{?subject}
Get the member’s friend requests.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of friend requests in response and use page
for the page number. [i.e: If you have 100 friend requests and the first request has limit=20
and page=1
, then in that case the recent 20 friend requests will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent friend requests will be returned.]
Example URI
- subject
boolean
(optional) Example: subject=0get array of friend request’s subject with each friend request.
- object
boolean
(optional) Example: object=0get array of friend request’s object with each notification
- page
integer
(optional) Example: page=2return the ‘limit’ number of friend requests of that page of friend requests listing.
- limit
integer
(optional) Example: limit=10number of friends request. Default limit is 10.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"totalItemCount": 1,
"response": [
{
"notification_id": 124,
"user_id": 3,
"subject_type": "user",
"subject_id": 1,
"object_type": "user",
"object_id": 3,
"type": "friend_request",
"params": null,
"read": 0,
"mitigated": 0,
"date": "2015-06-20 10:14:15",
"show": 1,
"action_type_body": "{item:$subject} has requested to be your friend.",
"feed_title": "M Michal has requested to be your friend.",
"action_type_body_params": [
{
"search": "{item:$subject}",
"label": "M Michal",
"type": "user",
"id": 1
}
],
"request_action": [
{
"label": "Accept Request",
"name": "accept_request",
"url": "user/confirm",
"urlParams": {
"user_id": 1
}
},
{
"label": "ignore request",
"name": "ignore_request",
"url": "user/reject",
"urlParams": {
"user_id": 1
}
}
],
"subject": {
"user_id": 123,
"username": "michal",
"displayname": "M Michal",
"photo_id": 0,
"status": "ewrewrwerwrr",
"status_date": "2015-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-11-11 06:00:28",
"modified_date": "2015-06-19 11:13:10",
"lastlogin_date": "2015-06-20 10:13:46",
"update_date": null,
"member_count": 0,
"view_count": 16,
"location": "",
"image": "",
"image_icon": "",
"image_profile": "",
"image_normal": ""
},
"object": {
"user_id": 323,
"username": "john",
"displayname": "K John",
"photo_id": 0,
"status": null,
"status_date": null,
"locale": "English",
"language": "English",
"timezone": "US/Pacific",
"search": 1,
"show_profileviewers": 1,
"level_id": 4,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-12-30 06:15:12",
"modified_date": "2015-05-19 05:56:21",
"lastlogin_date": "2015-06-20 10:03:48",
"update_date": null,
"member_count": 0,
"view_count": 9,
"location": "",
"image": "",
"image_icon": "",
"image_profile": "",
"image_normal": ""
}
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Get New Updates Count ¶
Get New Updates CountGET/notifications/new-updates
Get the count of new notifications, messages and friend requests.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"notifications": 5,
"friend_requests": 2,
"messages": 7
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Mark all Notifications as Read ¶
Mark all Notifications as ReadPOST/notifications/markallread
Mark all notifications as read.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Mark a Notification as Read ¶
Mark a Notification as ReadPOST/notifications/markread
Mark a particular notification as read.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
action_id |
yes | integer | 564 | notification id |
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"action_id": 564
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Messages ¶
These APIs are for various things related to messages like fetching unread messages, fetching all inbox messages, marking messages as read, creating a new message, viewing a message, etc.
Get Inbox Messages ¶
Get Inbox MessagesGET/messages/inbox{?page}
Get the inbox messages of a member.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of messages in response and use page
for the page number. [i.e: If you have 100 messages and the first request has limit=20
and page=1
, then in that case the recent 20 messages will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent messages will be returned.]
Example URI
- page
integer
(optional) Example: page=2return the ‘limit’ number of messages of that page of message listings.
- limit
integer
(optional) Example: limit=10number of messages. Default limit is 10.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"getTotalItemCount": 1,
"getUnreadMessageCount": 1,
"response": [
{
"message": {
"message_id": 13,
"conversation_id": 4,
"user_id": 1,
"title": "Hello Michael",
"body": "How are you?",
"date": "2015-06-20 11:15:15",
"attachment_type": "",
"attachment_id": 0,
"recipients_count": 1
},
"recipient": {
"user_id": 3,
"conversation_id": 4,
"inbox_message_id": 13,
"inbox_updated": "2015-06-20 11:15:15",
"inbox_read": 0,
"inbox_deleted": 0,
"outbox_message_id": 0,
"outbox_updated": null,
"outbox_deleted": 1,
"inbox_view": 1
},
"sender": {
"user_id": 134,
"username": "john",
"displayname": "K John",
"photo_id": 0,
"status": "ewrewrwerwrr",
"status_date": "2015-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-11-11 06:00:28",
"modified_date": "2015-06-20 11:14:51",
"lastlogin_date": "2015-06-20 10:13:46",
"update_date": null,
"member_count": 1,
"view_count": 16,
"location": "",
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal"
}
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Get Outbox Messages ¶
Get Outbox MessagesGET/messages/outbox{?page}
Get the outbox messages of a member.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of messages in response and use page
for the page number. [i.e: If you have 100 messages and the first request has limit=20
and page=1
, then in that case the recent 20 messages will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent messages will be returned.]
Example URI
- page
integer
(optional) Example: page=2return the ‘limit’ number of messages of that page of message listings.
- limit
integer
(optional) Example: limit=10number of messages. Default limit is 10.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"getTotalItemCount": 1,
"getUnreadMessageCount": 1,
"response": [
{
"message": {
"message_id": 14,
"conversation_id": 5,
"user_id": 3,
"title": "Hiii",
"body": "How are you ?",
"date": "2015-06-20 11:35:53",
"attachment_type": "",
"attachment_id": 0,
"recipients_count": 1
},
"recipient": {
"user_id": 3,
"conversation_id": 5,
"inbox_message_id": null,
"inbox_updated": null,
"inbox_read": 1,
"inbox_deleted": 1,
"outbox_message_id": 14,
"outbox_updated": "2015-06-20 11:35:53",
"outbox_deleted": 0,
"inbox_view": 0
},
"sender": {
"user_id": 1,
"username": "john",
"displayname": "K John",
"photo_id": 0,
"status": "ewrewrwerwrr",
"status_date": "2015-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-11-11 06:00:28",
"modified_date": "2015-06-20 11:14:51",
"lastlogin_date": "2015-06-20 10:13:46",
"update_date": null,
"member_count": 1,
"view_count": 16,
"location": "",
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal"
}
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Mark Message as Read ¶
Mark Message as ReadPOST/messages/mark-message-read-unread
Mark a message as read.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
message_id |
yes | integer | 564 | message id |
is_read |
no | integer | 1 | mark message a read (1) or unread (0). Default value is 0. |
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"message_id": 564
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
View Message ¶
View MessageGET/messages/view/id/{conversation_id}
Get the information of a message conversation.
Example URI
- conversation_id
integer
(required) Example: id=20message conversation id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"conversation": {
"conversation_id": 4,
"title": "Hello Michael",
"user_id": 1,
"recipients": 1,
"modified": "2015-06-20 11:15:15",
"locked": 0,
"resource_type": null,
"resource_id": 0
},
"messages": [
{
"message": {
"message_id": 13,
"conversation_id": 4,
"user_id": 1,
"title": "Hello Michael",
"body": "How are you?",
"date": "2015-06-20 11:15:15",
"attachment_type": "",
"attachment_id": 0
},
"recipient": {
"user_id": 3,
"conversation_id": 4,
"inbox_message_id": 13,
"inbox_updated": "2015-06-20 11:15:15",
"inbox_read": 1,
"inbox_deleted": 0,
"outbox_message_id": 0,
"outbox_updated": null,
"outbox_deleted": 1,
"inbox_view": 1
},
"sender": {
"user_id": 123,
"username": "john",
"displayname": "K John",
"photo_id": 0,
"status": "ewrewrwerwrr",
"status_date": "2015-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-11-11 06:00:28",
"modified_date": "2015-06-20 11:14:51",
"lastlogin_date": "2015-06-20 10:13:46",
"update_date": null,
"member_count": 1,
"view_count": 16,
"location": "",
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal"
}
}
],
"reply_form": [
{
"type": "Textarea",
"name": "body"
},
{
"type": "Submit",
"name": "submit",
"label": "Send Reply"
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Send ReplyPOST/messages/view/id
Post a reply in a message conversation.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
body |
yes | string | I am fine, what about you. | reply message |
Example URI
- id
integer
(required) Example: id=20message conversation id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"body": "I am fine, what about you."
}
200
Headers
Content-Type: application/json
Body
{
"conversation": {
"conversation_id": 4,
"title": "Hello Michael",
"user_id": 1,
"recipients": 1,
"modified": "2015-06-20 11:15:15",
"locked": 0,
"resource_type": null,
"resource_id": 0
},
"messages": [
{
"message": {
"message_id": 13,
"conversation_id": 4,
"user_id": 1,
"title": "Hello Michael",
"body": "How are you?",
"date": "2015-06-20 11:15:15",
"attachment_type": "",
"attachment_id": 0
},
"recipient": {
"user_id": 3,
"conversation_id": 4,
"inbox_message_id": 13,
"inbox_updated": "2015-06-20 11:15:15",
"inbox_read": 1,
"inbox_deleted": 0,
"outbox_message_id": 0,
"outbox_updated": null,
"outbox_deleted": 1,
"inbox_view": 1
},
"sender": {
"user_id": 123,
"username": "john",
"displayname": "K John",
"photo_id": 0,
"status": "ewrewrwerwrr",
"status_date": "2015-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-11-11 06:00:28",
"modified_date": "2015-06-20 11:14:51",
"lastlogin_date": "2015-06-20 10:13:46",
"update_date": null,
"member_count": 1,
"view_count": 16,
"location": "",
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal"
}
}
],
"reply_form": [
{
"type": "Textarea",
"name": "body"
},
{
"type": "Submit",
"name": "submit",
"label": "Send Reply"
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Compose New Message ¶
Get Message FormGET/messages/compose
Get the compose message form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"label": "Send To",
"name": "toValues"
},
{
"type": "Text",
"label": "Subject",
"name": "title"
},
{
"type": "Textarea",
"label": "Message",
"name": "body"
},
{
"type": "Submit",
"name": "submit",
"label": "Send Message"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Post New MessagePOST/messages/compose
Create a new message.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
toValues |
yes | string | 12, 45, 65 | comma separated friend ids |
title |
yes | string | Hello | message title |
body |
yes | string | How are you? | message body |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"toValues": "12, 45, 65",
"title": "Hello",
"body": "How are you?"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Message Conversations ¶
Delete Message ConversationsPOST/messages/delete
Delete message conversations.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
conversation_ids |
yes | string | 123, 64, 234 | comma separated message conversation ids |
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"conversation_ids": "123, 64, 234"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Likes and Comments ¶
These APIs are for features related to likes and comments on various content like blogs, classifieds, photos, etc, as well as on user profiles.
Get Likes and Comments ¶
Get Likes and CommentsGET/likes-comments
Get likes and comments for any content, user or comment.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of likes and / or comments in response and use page
for the page number. [i.e: If you have 100 likes / comments and the first request has limit=20
and page=1
, then in that case the recent 20 likes / comments will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent likes / comments will be returned.]
Example URI
- subject_type (required, string, `subject_type
string
(required) Default: blog`)content item type
- subject_id (required, integer, `subject_id
string
(required) Default: 123`)content item id
- comment_id (optional, integer, `comment_id
string
(required) Default: 120`)comment id (if likes need to be fetched for a comment)
- viewAllLikes
boolean
(optional) Example: viewAllLikes=0get users who like this content. Default value is 1.
- viewAllComments
boolean
(optional) Example: viewAllComments=0get comments on this content. Default value is 1.
- order
string
(optional) Example: order=DESCreturn comments in order. Default order is ASC.
- page
integer
(optional) Example: page=2use page to get next limit of likes / comments.
- limit
integer
(optional) Example: limit=20number of likes / comments. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"viewAllLikesBy": [
{
"user_id": 143,
"username": "john",
"displayname": "H John",
"photo_id": 0,
"status": null,
"status_date": null,
"locale": "English",
"language": "English",
"timezone": "US/Pacific",
"search": 1,
"show_profileviewers": 1,
"level_id": 4,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-12-30 06:15:12",
"modified_date": "2015-06-20 11:14:51",
"lastlogin_date": "2015-06-20 10:03:48",
"update_date": null,
"member_count": 1,
"view_count": 10,
"location": "",
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal"
},
{
"user_id": 231,
"username": "amichal",
"displayname": "A Michael",
"photo_id": 0,
"status": "ewrewrwerwrr",
"status_date": "2015-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-11-11 06:00:28",
"modified_date": "2015-06-20 11:14:51",
"lastlogin_date": "2015-06-20 10:13:46",
"update_date": null,
"member_count": 1,
"view_count": 16,
"location": "",
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal"
}
],
"viewAllComments": [
{
"comment_id": 5,
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal",
"author_title": "A Michael",
"comment_body": "How are you friends?",
"comment_date": "2015-01-13 09:46:38",
"like_count": 2,
"delete": {
"name": "delete",
"label": "Delete",
"url": "comment-delete",
"urlParams": {
"subject_type": "blog",
"subject_id": 10,
"comment_id": 5
}
},
"like": {
"name": "unlike",
"label": "Unlike",
"url": "unlike",
"urlParams": {
"subject_type": "blog",
"subject_id": 10,
"comment_id": 5
},
"isLike": 1
}
},
{
"comment_id": 6,
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal",
"author_title": "M John",
"comment_body": "Just Exploring...",
"comment_date": "2015-01-15 10:39:10",
"like_count": 1,
"delete": {
"name": "delete",
"label": "Delete",
"url": "comment-delete",
"urlParams": {
"subject_type": "blog",
"subject_id": 10,
"comment_id": 6
}
},
"like": {
"name": "unlike",
"label": "Unlike",
"url": "unlike",
"urlParams": {
"subject_type": "blog",
"subject_id": 10,
"comment_id": 6
},
"isLike": 1
}
}
],
"isLike": 1,
"canComment": 1,
"canDelete": 1,
"getTotalComments": 2,
"getTotalLikes": 2
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Like ¶
LikePOST/like
Like a content, user or a comment.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
subject_type |
yes | string | blog | content item type |
subject_id |
yes | integer | 125 | content item id |
comment_id |
no | integer | 564 | comment id (if liking a comment) |
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"subject_type": "blog",
"subject_id": 125
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "already_liked",
"message": "Item already liked."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Unlike ¶
UnlikePOST/unlike
Unlike a content, user or a comment.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
subject_type |
yes | string | blog | content item type |
subject_id |
yes | integer | 125 | content item id |
comment_id |
no | integer | 564 | comment id (if unliking a comment) |
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"subject_type": "blog",
"subject_id": 125
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "already_unliked",
"message": "Item already unliked."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Post Comment ¶
Post CommentPOST/comment-create
Post a comment on a content.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
subject_type |
yes | string | blog | content item type |
subject_id |
yes | integer | 252 | content item id |
body |
yes | string | this is a good content | comment body |
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"subject_type": "blog",
"subject_id": 252,
"body": "this is a good content"
}
200
Headers
Content-Type: application/json
Body
{
"comment_id": 18,
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal",
"author_title": "A Michael",
"comment_body": "good content !!",
"comment_date": "2015-06-20 12:59:12",
"delete": {
"name": "delete",
"label": "Delete",
"url": "comment-delete",
"urlParams": {
"subject_type": "blog",
"subject_id": 10,
"comment_id": 18
}
},
"like": {
"name": "like",
"label": "Like",
"url": "like",
"urlParams": {
"subject_type": "blog",
"subject_id": 10,
"comment_id": 18
}
}
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Delete a Comment ¶
Delete a CommentDELETE/comment-delete
Delete a comment.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
subject_type |
yes | string | blog | content item type |
subject_id |
yes | integer | 252 | content item id |
comment_id |
yes | integer | 536 | comment id |
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"subject_type": "blog",
"subject_id": 252,
"comment_id": 536
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Activity Feeds ¶
APIs allow to SocialEngine members to manage there feed and get paginated list of feeds, post new feed, share on feed and manage feed etc.
Get Activity Feeds ¶
Get Activity FeedsGET/activity{?limit}
Get the paginated list of feeds
In case of New Feeds Count
call this API after some time interval[i.e: in every 30 second] with minid
and feed_count_only
then available newly feeds count will be return in response.
In case of pagination, we need to use 2 parameters limit
and maxid
. Use limit
to set the number of feeds in response and use maxid
for the page number. [i.e: If you have 100 feeds and the first request has limit=20
and maxid=0
, then in that case the recent 20 feeds will be returned in response, and if limit=20
and maxid=286
is sent in request, then the next 20 recent feeds will be returned.]
Example URI
- maxid
integer
(optional) Example: maxid=128last feed id. Required in pagination
- subject_type (optional, string, `subject_type
string
(required) Default: blog`)subject type. Required for content profile activity feeds
- subject_id (optional, integer, `subject_id
string
(required) Default: 128`)subject id. Required for content profile activity feeds
- minid
integer
(optional) Example: minid=75first feed id. Required to get new feeds count
- action_id (optional, integer, `action_id
string
(required) Default: 167`)get single activity feed information
- viewAllLikes
boolean
(optional) Example: viewAllLikes=1get feed all likes information. Default value is 0
- viewAllComments
boolean
(optional) Example: viewAllComments=1get feed all comments information . Default value is 0
- feed_count_only
boolean
(optional) Example: feed_count_only=1get only feed count in response. Required to get new feeds count
- getUpdate
boolean
(optional) Example: getUpdates=1get newly updates information. Default value is 0
- checkUpdate
boolean
(optional) Example: checkUpdate=1Check is any update exist. Default value is 0
- post_menu (optional, boolean, `post_menu
string
(required) Default: 1`)get feed menus in response. Default value is 1
- limit
integer
(optional) Example: limit=20number of feeds. Default limit is 15.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"data":[
{
"feed":{
"action_id":217,
"type":"group_create",
"subject_type":"user",
"subject_id":1,
"object_type":"group",
"object_id":13,
"body":"",
"params":"[]",
"date":"2015-07-01 11:29:57",
"attachment_count":1,
"comment_count":0,
"like_count":0,
"privacy":null,
"commentable":1,
"shareable":1,
"user_agent":null,
"main_content":"Alen X created a new group:",
"time_value":1435750197,
"subject":{
"user_id":254,
"username":"alenx",
"displayname":"Alen X",
"photo_id":0,
"status":"",
"status_date":"2015-06-12 05:02:34",
"locale":"fil_PH",
"language":"en_US",
"timezone":"Asia/Dubai",
"search":0,
"show_profileviewers":1,
"level_id":1,
"enabled":1,
"verified":1,
"approved":1,
"creation_date":"2014-11-11 06:00:28",
"modified_date":"2015-07-06 12:09:45",
"lastlogin_date":"2015-07-06 10:12:12",
"update_date":null,
"member_count":1,
"view_count":16,
"location":"",
"url":"http://example.com/profile/admin",
"image":"",
"image_icon":"",
"image_profile":"",
"image_normal":"",
"owner_title":"Alen X"
}
}
},
{
"feed":{
"action_id":216,
"type":"group_create",
"subject_type":"user",
"subject_id":1,
"object_type":"group",
"object_id":12,
"body":"",
"params":"[]",
"date":"2015-07-01 11:29:03",
"attachment_count":1,
"comment_count":0,
"like_count":0,
"privacy":null,
"commentable":1,
"shareable":1,
"user_agent":null,
"main_content":"Alen X created a new group:",
"time_value":1435750143,
"subject":{
"user_id":154,
"username":"jhonx",
"displayname":"Jhon X",
"photo_id":0,
"status":"",
"status_date":"2015-06-12 05:02:34",
"locale":"fil_PH",
"language":"en_US",
"timezone":"Asia/Dubai",
"search":0,
"show_profileviewers":1,
"level_id":1,
"enabled":1,
"verified":1,
"approved":1,
"creation_date":"2014-11-11 06:00:28",
"modified_date":"2015-07-06 12:09:45",
"lastlogin_date":"2015-07-06 10:12:12",
"update_date":null,
"member_count":1,
"view_count":16,
"location":"",
"url":"http://example.com/profile/admin",
"image":"",
"image_icon":"",
"image_profile":"",
"image_normal":"",
"owner_title":"Alen X"
}
}
},
{
"feed":{
"action_id":211,
"type":"group_create",
"subject_type":"user",
"subject_id":1,
"object_type":"group",
"object_id":8,
"body":"",
"params":"[]",
"date":"2015-06-19 11:13:10",
"attachment_count":1,
"comment_count":1,
"like_count":0,
"privacy":null,
"commentable":1,
"shareable":1,
"user_agent":null,
"main_content":"Alen X created a new group:",
"time_value":1434712390,
"subject":{
"user_id":165,
"username":"yued",
"displayname":"Yuv D",
"photo_id":0,
"status":"",
"status_date":"2015-06-12 05:02:34",
"locale":"fil_PH",
"language":"en_US",
"timezone":"Asia/Dubai",
"search":0,
"show_profileviewers":1,
"level_id":1,
"enabled":1,
"verified":1,
"approved":1,
"creation_date":"2014-11-11 06:00:28",
"modified_date":"2015-07-06 12:09:45",
"lastlogin_date":"2015-07-06 10:12:12",
"update_date":null,
"member_count":1,
"view_count":16,
"location":"",
"url":"http://example.com/profile/admin",
"image":"",
"image_icon":"",
"image_profile":"",
"image_normal":"",
"owner_title":"Alen X"
}
}
},
{
"feed":{
"action_id":210,
"type":"share",
"subject_type":"user",
"subject_id":1,
"object_type":"user",
"object_id":1,
"body":"",
"params":{
"type":"
<a href="example.com/group/7">group</a>"
},
"date":"2015-06-19 10:07:10",
"attachment_count":1,
"comment_count":0,
"like_count":0,
"privacy":null,
"commentable":1,
"shareable":1,
"user_agent":null,
"main_content":"Alen X shared Alen X's group.\r\n",
"time_value":1434708430,
"subject":{
"user_id":123,
"username":"alenx",
"displayname":"Alen X",
"photo_id":0,
"status":"",
"status_date":"2015-06-12 05:02:34",
"locale":"fil_PH",
"language":"en_US",
"timezone":"Asia/Dubai",
"search":0,
"show_profileviewers":1,
"level_id":1,
"enabled":1,
"verified":1,
"approved":1,
"creation_date":"2014-11-11 06:00:28",
"modified_date":"2015-07-06 12:09:45",
"lastlogin_date":"2015-07-06 10:12:12",
"update_date":null,
"member_count":1,
"view_count":16,
"location":"",
"url":"http://example.com/profile/admin",
"image":"",
"image_icon":"",
"image_profile":"",
"image_normal":"",
"owner_title":"Alen X"
}
}
},
{
"feed":{
"action_id":209,
"type":"music_playlist_new",
"subject_type":"user",
"subject_id":1,
"object_type":"music_playlist",
"object_id":6,
"body":"",
"params":"[]",
"date":"2015-06-19 06:52:42",
"attachment_count":1,
"comment_count":0,
"like_count":0,
"privacy":null,
"commentable":1,
"shareable":1,
"user_agent":null,
"main_content":"Alen X created a new playlist: gggggggggggg[New Playlist]",
"time_value":1434696762,
"subject":{
"user_id":123,
"username":"alenx",
"displayname":"Alen X",
"photo_id":0,
"status":"",
"status_date":"2015-06-12 05:02:34",
"locale":"fil_PH",
"language":"en_US",
"timezone":"Asia/Dubai",
"search":0,
"show_profileviewers":1,
"level_id":1,
"enabled":1,
"verified":1,
"approved":1,
"creation_date":"2014-11-11 06:00:28",
"modified_date":"2015-07-06 12:09:45",
"lastlogin_date":"2015-07-06 10:12:12",
"update_date":null,
"member_count":1,
"view_count":16,
"location":"",
"url":"http://example.com/profile/admin",
"image":"",
"image_icon":"",
"image_profile":"",
"image_normal":"",
"owner_title":"Alen X"
},
"attachment":[
{
"playlist_id":6,
"title":"My Playlist",
"description":"",
"photo_id":0,
"owner_type":"user",
"owner_id":1,
"search":1,
"profile":0,
"special":null,
"creation_date":"2015-06-19 06:52:42",
"modified_date":"2015-06-19 06:52:42",
"view_count":0,
"comment_count":0,
"play_count":0,
"attachment_type":"music",
"likes_count":0,
"is_like":0,
"menu":[
],
"mode":1
}
],
"photo_attachment_count":1
},
"can_comment":true,
"is_like":0,
"can_delete":1,
"can_share":1,
"feed_menus":{
"like":{
"name":"like",
"label":"Like",
"url":"like",
"urlParams":{
"action_id":209
}
},
"delete":{
"name":"delete",
"label":"Delete",
"url":"activity-feed/delete",
"urlParams":{
"action_id":209
}
},
"share":{
"name":"share",
"label":"Share",
"url":"activity/share",
"urlParams":{
"type":"music_playlist",
"id":6
}
}
}
}
],
"maxid":162,
"enable_composer":true,
"enable_composer_photo":true,
"feed_post_menu":{
"status":1,
"emotions":1,
"photo":1
}
}
Post New Feed ¶
Post New FeedPOST/activity/post
Share(Post) the new feed
To post the feed photo, send the file in multipart / form-data
format with the photo
API request parameters.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
body |
yes | string | Save Earth | new feed description |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"body": "Merry Christmas",
}
201
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Feed and Comment ¶
Delete Feed and CommentDELETE/activity/delete
Delete the feed and feed comment
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
action_id |
yes | integer | 562 | activity feed id |
comment_id |
no | integer | 122 | activity comment id |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"action_id": 562,
"comment_id": 122
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Like ¶
LikePOST/activity/like
Like to any feed OR feed comment by log-in user
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
action_id |
yes | integer | 562 | activity feed id |
comment_id |
no | integer | 122 | feed comment id |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"action_id": 562,
"comment_id": 871,
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Unlike ¶
UnlikePOST/activity/unlike
Unlike to any feed OR feed comment by log-in user
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
action_id |
yes | integer | 562 | activity feed id |
comment_id |
no | integer | 122 | feed comment id |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"action_id": 562,
"comment_id": 871,
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Post Feed Comment ¶
Post Feed CommentPOST/activity/comment
Post the comment for the feed by log-in user
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
action_id |
yes | integer | 562 | activity feed id |
body |
yes | string | great job!! | comment body |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"action_id": 562,
"body": "great job!!"
}
200
Headers
Content-Type: application/json
Body
{
"action_id": 195,
"comment_id": 28,
"image": "http://localhost/socialEngineApi/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://localhost/socialEngineApi/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://localhost/socialEngineApi/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://localhost/socialEngineApi/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal",
"author_title": "M Michal",
"comment_body": "great job!!",
"comment_date": "2015-06-22 10:56:54",
"delete": {
"name": "delete",
"label": "Delete",
"url": "comment-delete",
"urlParams": {
"action_id": 195,
"subject_type": "activity_action",
"subject_id": 195,
"comment_id": 28
}
},
"like": {
"name": "like",
"label": "Like",
"url": "like",
"urlParams": {
"action_id": 195,
"subject_type": "activity_action",
"subject_id": 195,
"comment_id": 28
}
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Get Likes and Comments ¶
Get Likes and CommentsGET/activity/likes-comments
Get the paginated list of likes and comments respect of any feed or feed-comment.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
action_id |
yes | integer | 122 | activity feed id |
comment_id |
no | integer | 89 | activity feed comment id |
viewAllLikes |
no | integer | 1 | get list of users, who like to this feed |
viewAllComments |
no | integer | 1 | get list of users, who comment to this feed |
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"viewAllLikesBy": [
{
"user_id": 1,
"username": "admin",
"displayname": "Jennifer Aniston",
"photo_id": 0,
"status": "Bmcjgfigf",
"status_date": "2015-03-10 08:11:45",
"locale": "auto",
"language": "en_US",
"timezone": "US/Pacific",
"search": 1,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2014-11-15 08:27:34",
"modified_date": "2015-03-10 08:11:45",
"lastlogin_date": "2015-03-20 06:12:08",
"update_date": null,
"member_count": 2,
"view_count": 87,
"location": "",
"url": "http://example.com/profile/admin",
"photo_url": "http://dev1.bigsteptech.in"
}
],
"viewAllComments": [
{
"action_id": "670",
"comment_id": 50,
"author_photo": "http://dev1.bigsteptech.in",
"author_title": "Jennifer Aniston",
"comment_body": "my first comment",
"comment_date": "2015-03-20 09:59:31",
"delete": {
"name": "delete",
"label": "Delete",
"url": "comment-delete",
"urlParams": {
"action_id": "670",
"subject_type": "group",
"subject_id": 74,
"comment_id": 50
}
},
"like": {
"name": "like",
"label": "Like",
"url": "like",
"urlParams": {
"action_id": "670",
"subject_type": "group",
"subject_id": 74,
"comment_id": 50
},
"isLike": 0
}
},
{
"action_id": "670",
"comment_id": 51,
"author_photo": "http://dev1.bigsteptech.in",
"author_title": "Jennifer Aniston",
"comment_body": "My second comment",
"comment_date": "2015-03-20 09:59:49",
"delete": {
"name": "delete",
"label": "Delete",
"url": "comment-delete",
"urlParams": {
"action_id": "670",
"subject_type": "group",
"subject_id": 74,
"comment_id": 51
}
},
"like": {
"name": "like",
"label": "Like",
"url": "like",
"urlParams": {
"action_id": "670",
"subject_type": "group",
"subject_id": 74,
"comment_id": 51
},
"isLike": 0
}
}
],
"isLike": 0,
"canComment": 1,
"canDelete": 1,
"getTotalComments": 2,
"getTotalLikes": 1
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Tag Friend in Feed ¶
Tag Friend in FeedPOST/activity/tag-friend
Tag the friend for the respective feed by log-in user
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
action_id |
yes | integer | 276 | feed id |
users |
yes | string | 2,5,6 | tagged friend ids |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"action_id": 276,
"users": "2,5,6"
}
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Photo Albums Plugin ¶
APIs allow to SocialEngine members to manage there SocialEngine - Photo Albums Plugin plugin and allow to get paginated list of albums, create album, edit album and delete album. Find the respective APIs following:
Browse Albums ¶
Browse AlbumsGET/albums{?search}
Get the paginated list of browse albums.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of albums in response and use page
for the page number. [i.e: If you have 100 albums and the first request has limit=20
and page=1
, then in that case the recent 20 albums will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent albums will be returned.]
Example URI
- search
string
(optional) Example: search=californiagetting similar title and description albums.
- sort
string
(optional) Example: sort=recentgetting most recent or most viewed albums.
- category_id (optional, integer, `category_id
string
(required) Default: 13`)getting all albums of the category.
- user_id (optional, integer, `user_id
string
(required) Default: 125`)user id of profile owner. Default value is logged-in user’s ID.
- page
integer
(optional) Example: page=2return the ‘limit’ number of albums of that page of album listings.
- limit
integer
(optional) Example: limit=20number of albums. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canCreate":0,
"totalItemCount":2,
"response":[
{
"album_id":39,
"title":"Most Beautiful Celebs",
"description":"These are the beautiful women we all adore",
"owner_type":"user",
"owner_id":15,
"category_id":7,
"creation_date":"2015-02-17 10:13:40",
"modified_date":"2015-04-09 08:32:06",
"photo_id":620,
"view_count":276,
"comment_count":39,
"search":1,
"type":"wall",
"location":"",
"image":"http://example.com/public/album_photo/9b/009b_0443.jpg",
"image_normal":"http://example.com/public/album_photo/9c/009c_3288.jpg",
"image_profile":"http://example.com/public/album_photo/9b/009b_0443.jpg",
"image_icon":"http://example.com/public/album_photo/9b/009b_0443.jpg",
"content_url":"http://example.com/albums/view/1,
"is_like":0,
"like_count":156,
"allow_to_view":1,
"owner_title":"Emma Wise",
"photo_count":13
},
{
"album_id":47,
"title":"Super Heroes",
"description":"They are out to destroy evil and save the world.",
"owner_type":"user",
"owner_id":165,
"category_id":1,
"creation_date":"2014-11-12 10:40:34",
"modified_date":"2015-04-09 06:37:37",
"photo_id":134,
"view_count":451,
"comment_count":70,
"search":1,
"type":"profile",
"location":"",
"image":"http://example.com/public/album_photo/05/0005_c767.jpg",
"image_normal":"http://example.com/public/album_photo/06/0006_3508.jpg",
"image_profile":"http://example.com/public/album_photo/05/0005_c767.jpg",
"image_icon":"http://example.com/public/album_photo/05/0005_c767.jpg",
"content_url":"http://example.com/albums/view/1",
"is_like":1,
"like_count":122,
"allow_to_view":1,
"owner_title":"Emma Wise",
"photo_count":2
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
My Albums ¶
My AlbumsGET/albums/manage{?search}
Get the paginated list of my albums respect of log-in user
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of albums in response and use page
for the page number. [i.e: If you have 100 albums and the first request has limit=20
and page=1
, then in that case the recent 20 albums will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent albums will be returned.]
Example URI
- search
string
(optional) Example: search=californiagetting similar title and description albums.
- sort
string
(optional) Example: sort=recentgetting most recent or most viewed albums.
- category_id (optional, integer, `category_id
string
(required) Default: 13`)getting all albums of the category.
- page
integer
(optional) Example: page=2return the ‘limit’ number of albums of that page of album listings.
- limit
integer
(optional) Example: limit=20number of albums. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"canCreate": 1,
"totalItemCount": 3,
"response": [
{
"album_id": 34,
"title": "My Birthday Party",
"description": "All of our parties are 45 to 60-minutes in home.",
"owner_type": "user",
"owner_id": 11,
"category_id": 0,
"creation_date": "2015-05-07 12:21:05",
"modified_date": "2015-05-07 12:21:06",
"photo_id": 21,
"view_count": 20,
"comment_count": 10,
"search": 0,
"type": "message",
"location": "",
"image": "http://example.com/public/album_photo/b6/00b6_8dfb.jpeg",
"image_normal": "http://example.com/public/album_photo/b7/00b7_831c.jpeg",
"image_profile": "http://example.com/public/album_photo/b6/00b6_8dfb.jpeg",
"image_icon": "http://example.com/public/album_photo/b6/00b6_8dfb.jpeg",
"content_url": "http://example.com/albums/view/1",
"is_like": 1,
"like_count": 54,
"owner_title": "Alex Uyerr",
"photo_count": 18,
"menu": [
{
"label": "Edit Settings",
"name": "edit",
"url": "albums/album/edit",
"urlParams": {
"album_id": 34
}
},
{
"label": "Delete Album",
"name": "delete",
"url": "albums/album/delete",
"urlParams": {
"album_id": 34
}
}
]
},
{
"album_id": 35,
"title": "Most Beautiful Celebs",
"description": "These are the beautiful women we all adore..",
"owner_type": "user",
"owner_id": 11,
"category_id": 0,
"creation_date": "2015-02-17 10:13:40",
"modified_date": "2015-04-09 08:32:06",
"photo_id": 20,
"view_count": 23,
"comment_count": 92,
"search": 1,
"type": "wall",
"location": "",
"image": "http://example.com/public/album_photo/9b/009b_0443.jpg",
"image_normal": "http://example.com/public/album_photo/9c/009c_3288.jpg",
"image_profile": "http://example.com/public/album_photo/9b/009b_0443.jpg",
"image_icon": "http://example.com/public/album_photo/9b/009b_0443.jpg",
"content_url": "http://example.com/albums/view/1",
"is_like": 0,
"like_count": 12,
"owner_title": "Alex Uyerr",
"photo_count": 13,
"menu": [
{
"label": "Edit Settings",
"name": "edit",
"url": "albums/album/edit",
"urlParams": {
"album_id": 35
}
},
{
"label": "Delete Album",
"name": "delete",
"url": "albums/album/delete",
"urlParams": {
"album_id": 35
}
}
]
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Browse Search Form ¶
Browse Search FormGET/albums/search-form
Get browse search form to filter on Browse Albums
and My Albums
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "search",
"label": "Search Albums"
},
{
"type": "Select",
"name": "sort",
"label": "Browse By",
"multiOptions": {
"recent": "Most Recent",
"popular": "Most Viewed"
}
},
{
"type": "Select",
"name": "category_id",
"label": "Category",
"multiOptions": {
"0": "All Categories",
"1": "Arts & Culture",
"2": "Business",
"3": "Entertainment",
"5": "Family & Home",
"6": "Health",
"7": "Recreation",
"8": "Personal",
"9": "Shopping",
"10": "Society",
"11": "Sports",
"12": "Technology",
"13": "Other"
}
},
{
"type": "Submit",
"name": "submit",
"label": "Search"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create Album ¶
Get Album FormGET/albums/upload
Get the create album form
If user select “Create A New Album” in form then show all the form elements otherwise hide all the elements and show only photo uploading option.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Select",
"name": "album",
"label": "Choose Album",
"multiOptions": {
"0": "Create A New Album",
"1": "My Album",
"3": "Test Album Title",
"4": "Message Photos"
},
"hasValidator": true
},
{
"type": "Text",
"name": "title",
"label": "Album Title",
"hasValidator": true
},
{
"type": "Select",
"name": "category_id",
"label": "Category",
"multiOptions": {
"0": "All Categories",
"1": "Arts & Culture",
"2": "Business",
"3": "Entertainment",
"5": "Family & Home",
"6": "Health",
"7": "Recreation",
"8": "Personal",
"9": "Shopping",
"10": "Society",
"11": "Sports",
"12": "Technology",
"13": "Other"
},
"hasValidator": true
},
{
"type": "Textarea",
"name": "description",
"label": "Album Description",
"hasValidator": true
},
{
"type": "Checkbox",
"name": "search",
"label": "Show this album in search results"
},
{
"type": "Select",
"name": "auth_view",
"label": "Privacy",
"description": "Who may see this album?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"hasValidator": true
},
{
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post comments on this album?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"hasValidator": true
},
{
"type": "Select",
"name": "auth_tag",
"label": "Tagging",
"description": "Who may tag photos in this album?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"hasValidator": true
},
{
"type": "File",
"name": "photo",
"label": "Main Photo"
},
{
"type": "Submit",
"name": "submit",
"label": "Save Photos"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Post Album FormPOST/albums/upload
Post the create album form values
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
album |
yes | integer | 0 | album id [0 to create new album and give album id to upload photos] |
title |
yes | string | Most Beautiful Celebs | album title |
category_id |
yes | integer | 2 | category id |
description |
yes | string | These are the beautiful women we all adore… | album description |
search |
no | boolean | 1 | searchable or not |
auth_view |
yes | string | everyone | authorization permission to view album |
auth_comment |
yes | string | everyone | authorization permission to comment on album |
auth_tag |
yes | string | everyone | authorization permission to tag for album |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"album": 0,
"title": "Most Beautiful Celebs",
"category_id": 3,
"description": "These are the beautiful women we all adore",
"search": 1,
"auth_view": "everyone",
"auth_comment": "everyone",
"auth_tag": "everyone"
}
200
Headers
Content-Type: application/json
Body
{
"canEdit": 1,
"totalPhotoCount": 2,
"album": {
"album_id": 432,
"title": "Most Beautiful Celebs",
"description": "These are the beautiful women we all adore...",
"owner_type": "user",
"owner_id": 132,
"category_id": 2,
"creation_date": "2014-11-12 10:40:34",
"modified_date": "2015-04-09 06:37:37",
"photo_id": 1,
"view_count": 176,
"comment_count": 56,
"search": 1,
"type": "profile",
"location": "",
"image": "http://example.com/public/album_photo/05/0005_c767.jpg",
"image_normal": "http://example.com/public/album_photo/06/0006_3508.jpg",
"image_profile": "http://example.com/public/album_photo/05/0005_c767.jpg",
"image_icon": "http://example.com/public/album_photo/05/0005_c767.jpg",
"content_url": "http://example.com/albums/view/1",
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Emma Wise",
"is_like": 1,
"like_count": 189
},
"albumPhotos": [
{
"photo_id": 176,
"album_id": 432,
"title": "",
"description": "",
"creation_date": "2014-11-12 10:40:34",
"modified_date": "2014-11-12 10:40:34",
"order": 0,
"owner_type": "user",
"owner_id": 1,
"file_id": 5,
"view_count": 0,
"comment_count": 120,
"skip_photo": 0,
"is_like": 1,
"like_count": 45,
"image": "http://example.com/public/album_photo/05/0005_c767.jpg",
"image_normal": "http://example.com/public/album_photo/06/0006_3508.jpg",
"image_profile": "http://example.com/public/album_photo/05/0005_c767.jpg",
"image_icon": "http://example.com/public/album_photo/05/0005_c767.jpg",
"content_url": "http://example.com/albums/photo/view/album_id/1/photo_id/1",
"menu": [
{
"label": "Edit",
"name": "edit",
"url": "albums/photo/edit",
"urlParams": {
"album_id": 432,
"photo_id": 176
}
},
{
"label": "Delete",
"name": "delete",
"url": "albums/photo/delete",
"urlParams": {
"album_id": 432,
"photo_id": 176
}
},
{
"label": "Share",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "album_photo",
"id": 176
}
},
{
"label": "Report",
"name": "report",
"url": "report/create/subject/album_photo_176",
"urlParams": {
"type": "album_photo",
"id": 176
}
},
{
"label": "Make Profile Photo",
"name": "make_profile_photo",
"url": "members/edit/external-photo",
"urlParams": {
"photo": "album_photo_176"
}
}
]
},
{
"photo_id": 187,
"album_id": 432,
"title": "",
"description": "",
"creation_date": "2015-01-30 09:43:25",
"modified_date": "2015-01-30 09:43:25",
"order": 0,
"owner_type": "user",
"owner_id": 1,
"file_id": 49,
"view_count": 70,
"comment_count": 12,
"skip_photo": 0,
"is_like": 0,
"like_count": 0,
"image": "http://example.com/public/album_photo/31/0031_8f27.jpg",
"image_normal": "http://example.com/public/album_photo/32/0032_20ff.jpg",
"image_profile": "http://example.com/public/album_photo/31/0031_8f27.jpg",
"image_icon": "http://example.com/public/album_photo/31/0031_8f27.jpg",
"content_url": "http://example.com/albums/photo/view/album_id/1/photo_id/1",
"menu": [
{
"label": "Edit",
"name": "edit",
"url": "albums/photo/edit",
"urlParams": {
"album_id": 432,
"photo_id": 187
}
},
{
"label": "Delete",
"name": "delete",
"url": "albums/photo/delete",
"urlParams": {
"album_id": 432,
"photo_id": 187
}
},
{
"label": "Share",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "album_photo",
"id": 187
}
},
{
"label": "Report",
"name": "report",
"url": "report/create/subject/album_photo_187",
"urlParams": {
"type": "album_photo",
"id": 187
}
},
{
"label": "Make Profile Photo",
"name": "make_profile_photo",
"url": "members/edit/external-photo",
"urlParams": {
"photo": "album_photo_187"
}
}
]
}
],
"gutterMenu": [
{
"label": "Add More Photos",
"name": "add",
"url": "albums/upload",
"urlParams": {
"album_id": 432
}
},
{
"label": "Edit Settings",
"name": "edit",
"url": "albums/edit/432",
"urlParams": {}
},
{
"label": "Delete Album",
"name": "delete",
"url": "albums/delete/432",
"urlParams": {}
}
]
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"description": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Album Profile ¶
Album ProfileGET/albums/view/{album_id}
Get the album profile page
Get gutterMenu
and response
in case of Response 200. In the gutterMenu
get the array of album profile gutter menus and in response
get the array of requested album.
Example URI
- album_id
integer
(required) Example: 123album id
- gutter_menu (optional, boolean, `gutter_menu
string
(required) Default: 1 OR 0`)return array of gutter menus. Default limit is 1
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canEdit": 1,
"totalPhotoCount": 2,
"album": {
"album_id": 432,
"title": "Most Beautiful Celebs",
"description": "These are the beautiful women we all adore...",
"owner_type": "user",
"owner_id": 132,
"category_id": 2,
"creation_date": "2014-11-12 10:40:34",
"modified_date": "2015-04-09 06:37:37",
"photo_id": 1,
"view_count": 176,
"comment_count": 56,
"search": 1,
"type": "profile",
"location": "",
"image": "http://example.com/public/album_photo/05/0005_c767.jpg",
"image_normal": "http://example.com/public/album_photo/06/0006_3508.jpg",
"image_profile": "http://example.com/public/album_photo/05/0005_c767.jpg",
"image_icon": "http://example.com/public/album_photo/05/0005_c767.jpg",
"content_url": "http://example.com/albums/view/1",
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Emma Wise",
"is_like": 1,
"like_count": 189
},
"albumPhotos": [
{
"photo_id": 176,
"album_id": 432,
"title": "",
"description": "",
"creation_date": "2014-11-12 10:40:34",
"modified_date": "2014-11-12 10:40:34",
"order": 0,
"owner_type": "user",
"owner_id": 1,
"file_id": 5,
"view_count": 0,
"comment_count": 120,
"skip_photo": 0,
"is_like": 1,
"like_count": 45,
"image": "http://example.com/public/album_photo/05/0005_c767.jpg",
"image_normal": "http://example.com/public/album_photo/06/0006_3508.jpg",
"image_profile": "http://example.com/public/album_photo/05/0005_c767.jpg",
"image_icon": "http://example.com/public/album_photo/05/0005_c767.jpg",
"content_url": "http://example.com/albums/photo/view/album_id/2/photo_id/6",
"menu": [
{
"label": "Edit",
"name": "edit",
"url": "albums/photo/edit",
"urlParams": {
"album_id": 432,
"photo_id": 176
}
},
{
"label": "Delete",
"name": "delete",
"url": "albums/photo/delete",
"urlParams": {
"album_id": 432,
"photo_id": 176
}
},
{
"label": "Share",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "album_photo",
"id": 176
}
},
{
"label": "Report",
"name": "report",
"url": "report/create/subject/album_photo_176",
"urlParams": {
"type": "album_photo",
"id": 176
}
},
{
"label": "Make Profile Photo",
"name": "make_profile_photo",
"url": "members/edit/external-photo",
"urlParams": {
"photo": "album_photo_176"
}
}
]
},
{
"photo_id": 187,
"album_id": 432,
"title": "",
"description": "",
"creation_date": "2015-01-30 09:43:25",
"modified_date": "2015-01-30 09:43:25",
"order": 0,
"owner_type": "user",
"owner_id": 1,
"file_id": 49,
"view_count": 70,
"comment_count": 12,
"skip_photo": 0,
"is_like": 0,
"like_count": 0,
"image": "http://example.com/public/album_photo/31/0031_8f27.jpg",
"image_normal": "http://example.com/public/album_photo/32/0032_20ff.jpg",
"image_profile": "http://example.com/public/album_photo/31/0031_8f27.jpg",
"image_icon": "http://example.com/public/album_photo/31/0031_8f27.jpg",
"content_url": "http://example.com/albums/photo/view/album_id/2/photo_id/6",
"menu": [
{
"label": "Edit",
"name": "edit",
"url": "albums/photo/edit",
"urlParams": {
"album_id": 432,
"photo_id": 187
}
},
{
"label": "Delete",
"name": "delete",
"url": "albums/photo/delete",
"urlParams": {
"album_id": 432,
"photo_id": 187
}
},
{
"label": "Share",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "album_photo",
"id": 187
}
},
{
"label": "Report",
"name": "report",
"url": "report/create/subject/album_photo_187",
"urlParams": {
"type": "album_photo",
"id": 187
}
},
{
"label": "Make Profile Photo",
"name": "make_profile_photo",
"url": "members/edit/external-photo",
"urlParams": {
"photo": "album_photo_187"
}
}
]
}
],
"gutterMenu": [
{
"label": "Add More Photos",
"name": "add",
"url": "albums/upload",
"urlParams": {
"album_id": 432
}
},
{
"label": "Edit Settings",
"name": "edit",
"url": "albums/edit/432",
"urlParams": {}
},
{
"label": "Delete Album",
"name": "delete",
"url": "albums/delete/432",
"urlParams": {}
}
]
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: photo_id OR album_id"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit Album ¶
Get Album FormGET/albums/edit/{album_id}
Get the edit album form
Returns the form
and formValues
as response. In form we get the complete edit album form
and in formValues
we get the form’s values.
Example URI
- album_id
integer
(required) Example: 1246album id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"form": [
{
"type": "Text",
"name": "title",
"label": "Album Title",
"hasValidator": true
},
{
"type": "Select",
"name": "category_id",
"label": "Category",
"multiOptions": {
"0": "All Categories",
"1": "Arts & Culture",
"2": "Business",
"3": "Entertainment",
"5": "Family & Home",
"6": "Health",
"7": "Recreation",
"8": "Personal",
"9": "Shopping",
"10": "Society",
"11": "Sports",
"12": "Technology",
"13": "Other"
},
"hasValidator": true
},
{
"type": "Textarea",
"name": "description",
"label": "Album Description",
"hasValidator": true
},
{
"type": "Checkbox",
"name": "search",
"label": "Show this album in search results"
},
{
"type": "Select",
"name": "auth_view",
"label": "Privacy",
"description": "Who may see this album?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"hasValidator": true
},
{
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post comments on this album?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"hasValidator": true
},
{
"type": "Select",
"name": "auth_tag",
"label": "Tagging",
"description": "Who may tag photos in this album?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"hasValidator": true
},
{
"type": "Submit",
"name": "submit",
"label": "Save Album"
}
],
"formValues": {
"album_id": 178,
"title": "My Birthday Party",
"description": "All of our parties are 45 to 60-minutes in leng..",
"owner_type": "user",
"owner_id": 123,
"category_id": 1,
"creation_date": "2014-11-12 10:40:34",
"modified_date": "2015-04-09 06:37:37",
"photo_id": 1,
"view_count": 541,
"comment_count": 54,
"search": 1,
"type": "profile",
"location": "",
"auth_view": "everyone",
"auth_comment": "everyone",
"auth_tag": "owner_member_member"
}
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: photo_id OR album_id"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Put Album FormPUT/albums/edit
Put the edit album form values
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Most Beautiful Celebs | album title |
category_id |
yes | integer | 2 | category id |
description |
yes | string | These are the beautiful women we all adore… | album description |
search |
no | boolean | 1 | searchable or not |
auth_view |
yes | string | everyone | authorization permission to view album |
auth_comment |
yes | string | everyone | authorization permission to comment on album |
auth_tag |
yes | string | everyone | authorization permission to tag for album |
Example URI
- album_id (required, integer, `album_id
string
(required) Default: 1246`)album id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"title": "Most Beautiful Celebs",
"category_id": 3,
"description": "These are the beautiful women we all adore",
"search": 1,
"auth_view": "everyone",
"auth_comment": "everyone",
"auth_tag": "everyone"
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"description": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Album ¶
Delete AlbumDELETE/albums/delete/{album_id}
Delete the album by log-in user
Example URI
- album_id
integer
(required) Example: 148album id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: photo_id OR album_id"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Photo Albums Plugin / Photos ¶
APIs allow to SocialEngine members to manage Photo Albums Plugin / Photos and allow to get paginated list of album photos, delete photo, flip photo and rotate photo. Please find APIs following:
Photos List ¶
Get Photos ListGET/albums/photo/list/{?page}
Get the paginated list of album photos
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of photos in response and use page
for the page number. [i.e: If you have 100 photos and the first request has limit=20
and page=1
, then in that case the recent 20 photos will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent photos will be returned.]
Example URI
- album_id (required, integer, `album_id
string
(required) Default: 58`)get the list of photos
- page
integer
(optional) Example: page=2return the ‘limit’ number of photos of that page of photo listings.
- limit
integer
(optional) Example: limit=20number of photos. Default limit is 10.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canUpload": 0,
"photos": [
{
"photo_id": 20,
"album_id": 3,
"title": "",
"description": "",
"creation_date": "2015-04-09 07:49:21",
"modified_date": "2015-06-22 14:05:46",
"order": 0,
"owner_type": "user",
"owner_id": 1,
"file_id": 306,
"view_count": 0,
"comment_count": 0,
"skip_photo": 0,
"owner_title": "Mike Husstle",
"album_title": "Blog Photos",
"is_like": 0,
"like_count": 0,
"image": "http://example.com/public/album_photo/33/01/0132_9083.jpg",
"image_normal": "http://example.com/public/album_photo/34/01/0133_798f.jpg",
"image_profile": "http://example.com/public/album_photo/33/01/0132_9083.jpg",
"image_icon": "http://example.com/public/album_photo/33/01/0132_9083.jpg",
"content_url": "http://example.com/albums/photo/view/album_id/2/photo_id/6",
"menu": [
{
"label": "Share",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "album_photo",
"id": 20
}
},
{
"label": "Report",
"name": "report",
"url": "report/create/subject/album_photo_20",
"urlParams": {
"type": "album_photo",
"id": 20
}
},
{
"label": "Make Profile Photo",
"name": "make_profile_photo",
"url": "members/edit/external-photo",
"urlParams": {
"photo": "album_photo_20"
}
}
]
},
{
"photo_id": 25,
"album_id": 3,
"title": "",
"description": "",
"creation_date": "2015-04-09 07:49:21",
"modified_date": "2015-06-22 14:05:46",
"order": 0,
"owner_type": "user",
"owner_id": 1,
"file_id": 306,
"view_count": 0,
"comment_count": 0,
"skip_photo": 0,
"owner_title": "Mike Husstle",
"album_title": "Blog Photos",
"is_like": 0,
"like_count": 0,
"image": "http://example.com/public/album_photo/33/01/0132_9083.jpg",
"image_normal": "http://example.com/public/album_photo/34/01/0133_798f.jpg",
"image_profile": "http://example.com/public/album_photo/33/01/0132_9083.jpg",
"image_icon": "http://example.com/public/album_photo/33/01/0132_9083.jpg",
"content_url": "http://example.com/albums/photo/view/album_id/2/photo_id/6",
"menu": [
{
"label": "Share",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "album_photo",
"id": 20
}
},
{
"label": "Report",
"name": "report",
"url": "report/create/subject/album_photo_20",
"urlParams": {
"type": "album_photo",
"id": 20
}
},
{
"label": "Make Profile Photo",
"name": "make_profile_photo",
"url": "members/edit/external-photo",
"urlParams": {
"photo": "album_photo_20"
}
}
]
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Upload PhotosPOST/albums/photo/list/{?page}
Upload the photos into the album
To upload the album photos, send the files as an array of multipart / form-data
elements with the photo
API request parameters.
Example URI
- album_id (required, integer, `album_id
string
(required) Default: 58`)get the list of photos
- page
integer
(optional) Example: page=2use page to get next limit of photos
- limit
integer
(optional) Example: limit=20number of photos. Default limit is 10
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Photo View ¶
Photo ViewGET/albums/photo/view/{?menu}
Get the photo view page information
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 947`)photo id
- menu
integer
(optional) Example: menu=0menu in response. Default value is 1
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"message_view": false,
"response": {
"photo_id": 29,
"album_id": 3,
"title": "",
"description": "",
"creation_date": "2015-06-22 12:42:44",
"modified_date": "2015-06-23 04:54:25",
"order": 6,
"owner_type": "user",
"owner_id": 1,
"file_id": 315,
"view_count": 0,
"comment_count": 0,
"skip_photo": 0
},
"canEdit": 1,
"canDelete": 1,
"canTag": 1,
"canUntagGlobal": true,
"nextPhoto": {
"photo_id": 12,
"album_id": 3,
"title": "",
"description": "",
"creation_date": "2015-02-17 10:13:40",
"modified_date": "2015-04-09 08:32:06",
"order": 7,
"owner_type": "user",
"owner_id": 1,
"file_id": 120,
"view_count": 0,
"comment_count": 0,
"skip_photo": 0
},
"previousPhoto": {
"skipAlbumDeleteHook": null
},
"tags": [],
"menu": [
{
"label": "Edit",
"name": "edit",
"url": "albums/photo/edit",
"urlParams": {
"album_id": 3,
"photo_id": 29
}
},
{
"label": "Delete",
"name": "delete",
"url": "albums/photo/delete",
"urlParams": {
"album_id": 3,
"photo_id": 29
}
},
{
"label": "Share",
"name": "share",
"url": "activity/index/share",
"urlParams": {
"type": "album_photo",
"id": 29
}
},
{
"label": "Report",
"name": "report",
"url": "report/create/subject/album_photo_29"
},
{
"label": "Make Profile Photo",
"name": "make_profile_photo",
"url": "members/edit/external-photo",
"urlParams": {
"photo": "album_photo_29"
}
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit Photo Info ¶
Get Photo Info FormGET/albums/photo/edit
Get edit photo form
Returns the form
and formValues
as response. In form we get the complete edit photo form
and in formValues
we get the form’s values.
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 523`)photo id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Accept: application/json
Body
{
"form": [
{
"type": "Text",
"name": "title",
"label": "Title",
"hasValidator": true
},
{
"type": "Textarea",
"name": "description",
"label": "Caption",
"hasValidator": true
},
{
"type": "Submit",
"name": "submit",
"label": "Submit"
}
],
"formValues": {
"photo_id": 29,
"album_id": 3,
"title": "",
"description": "",
"creation_date": "2015-06-22 12:42:44",
"modified_date": "2015-06-23 04:54:25",
"order": 6,
"owner_type": "user",
"owner_id": 1,
"file_id": 315,
"view_count": 0,
"comment_count": 0,
"skip_photo": 0
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Put Photo Info FormPUT/albums/photo/edit
Put the edit photo form values
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Harry Potter Series-1 Photo | photo title |
description |
yes | string | This photo is from harry potter first… | photo description |
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 523`)photo id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"title": "Harry Potter Series-1 Photo",
"description": "This photo is from harry potter first series."
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"description": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Photo ¶
Delete PhotoDELETE/albums/photo/delete
Delete the album photo by log-in user
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 947`)photo id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"photo_id": 873,
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Rotate Photo ¶
Rotate PhotoPOST/albums/photo/rotate
Rotate the album photo by the log-in user
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
angle |
yes | integer | 90 | photo angle [Only 90 and 270 allow] |
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 947`)photo id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"photo_id": 873,
"angle": 270
}
200
Headers
Accept: application/json
Body
{
"image":"http://example.com/public/album_photo/54/01/0153_23e0.jpg",
"image_normal":"http://example.com/public/album_photo/55/01/0154_fb49.jpg",
"image_profile":"http://example.com/public/album_photo/54/01/0153_23e0.jpg",
"image_icon":"http://example.com/public/album_photo/54/01/0153_23e0.jpg",
"content_url":"http://example.com/albums/photo/view/album_id/2/photo_id/6",
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Flip Photo ¶
Flip PhotoPOST/albums/photo/flip
Flip the album photo by log-in user
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
direction |
yes | string | vertical | photo flip [Only “vertical” and “horizontal” allow] |
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 947`)photo id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"photo_id": 873,
"direction": "horizontal"
}
200
Headers
Accept: application/json
Body
{
"image": "http://example.com/public/album_photo/54/01/0153_23e0.jpg",
"image_normal": "http://example.com/public/album_photo/55/01/0154_fb49.jpg",
"image_profile": "http://example.com/public/album_photo/54/01/0153_23e0.jpg",
"image_icon": "http://example.com/public/album_photo/54/01/0153_23e0.jpg",
"content_url": "http://example.com/albums/photo/view/album_id/2/photo_id/6"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Blogs Plugin ¶
These are the APIs for SocialEngine’s official Blogs Plugin.
Browse Blogs ¶
Browse BlogsGET/blogs{?search}
Get the blogs listing. Blogs can also be browsed and searched based on keywords, categories, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of blogs in response and use page
for the page number. [i.e: If you have 100 blogs and the first request has limit=20
and page=1
, then in that case the recent 20 blogs will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent blogs will be returned.]
Example URI
- search
string
(optional) Example: search=blget blogs that contain this keyword in title or description.
- orderby
string
(optional) Example: orderby=creation_dateget blog listings in the order of descending creation date (
creation_date
) or descending number of views (view_count
).- show
integer
(optional) Example: show=1get blogs of all users (
1
) or only of the member’s friends (2
).- category
integer
(optional) Example: category=13get all blogs of a particular category ID.
- user_id (optional, integer, `user_id
string
(required) Default: 125`)user id of profile owner. Default value is logged-in user’s ID.
- page
integer
(optional) Example: page=2return the ‘limit’ number of blogs of that page of blog listings.
- limit
integer
(optional) Example: limit=20number of blogs. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canCreate": 1,
"totalItemCount": 238,
"response": [
{
"blog_id": 178,
"title": "Head of Banking Operations",
"body": "This is an excellent opportunity for a Senior Operations professional to play a leadership role in the expansion of our Clients' European Wealth Management/ Private Banking operation based in Frankfurt. This person will be responsible for supervising all daily operations for the German onshore business as well as the expansion and on-boarding of key E.U clients.",
"owner_type": "user",
"owner_id": 2,
"category_id": 1,
"creation_date": "2014-03-18 06:54:48",
"modified_date": "2014-03-18 06:54:48",
"view_count": 1748,
"comment_count": 70,
"search": 1,
"draft": 0,
"category_title": "Arts & Culture",
"url": "http://example.com/blogs/2/178/hello-new-blog",
"owner_image": "http://example.com/public/user/41/02/023f_eabf.jpg",
"owner_title": "James Robert",
"allow_to_view": 1
},
{
"blog_id": 177,
"title": "Leiter Personalentwicklung (m/w)",
"body": "Die Cornelsen Schulverlage bündeln Erfolgsmarken wie Cornelsen, Duden Schulbuch, Oldenbourg und Volk und Wissen und gehören seit über 60 Jahren zu den Top-Playern im Markt der deutschsprachigen Bildungsmedien. Wir sind die größte Einheit innerhalb der Franz Cornelsen Bildungsgruppe, die mit über 1.500 Mitarbeitern für innovative Bildungsangebote in Deutschland, Österreich und der Schweiz sorgt. Um den Ausbau interaktiver Lernangebote weiter voran zu treiben, suchen wir Mitarbeiterinnen und Mitarbeiter, die unseren Erfolg mit ihrer Inspiration, ihrer Begeisterung und ihrem Know-How steigern. Wenn Sie Spaß daran haben, die Zukunft der Bildungsbranche aktiv mitzugestalten und einen Arbeitsplatz schätzen, der Ihnen ein hohes Maß an Eigenverantwortung und Freiraum bietet, dann sind Sie bei uns richtig.",
"owner_type": "user",
"owner_id": 2,
"category_id": 1,
"creation_date": "2014-06-22 08:15:16",
"modified_date": "2014-07-12 08:15:16",
"view_count": 1127,
"comment_count": 38,
"search": 1,
"draft": 0,
"category_title": "Arts & Culture",
"url": "http://example.com/blogs/2/177/hello",
"owner_image": "http://example.com/public/user/41/02/023f_eabf.jpg",
"owner_title": "James Robert",
"allow_to_view": 1
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Manage Blogs ¶
Manage BlogsGET/blogs/manage{?search}
Get the blogs of a member. Blogs can also be browsed and searched based on keywords, categories, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of blogs in response and use page
for the page number. [i.e: If you have 100 blogs and the first request has limit=20
and page=1
, then in that case the recent 20 blogs will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent blogs will be returned.]
Example URI
- search
string
(optional) Example: search=blget blogs that contain this keyword in title or description.
- orderby
string
(optional) Example: orderby=creation_dateget blog listings in the order of descending creation date (
creation_date
) or descending number of views (view_count
).- show
integer
(optional) Example: show=1get blogs of all users (
1
) or only of the member’s friends (2
).- category
integer
(optional) Example: category=13get all blogs of a particular category ID.
- page
integer
(optional) Example: page=2return the ‘limit’ number of blogs of that page of blog listings.
- limit
integer
(optional) Example: limit=20number of blogs. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"canCreate": 1,
"totalItemCount": 78,
"response": [
{
"blog_id": 178,
"title": "Head of Banking Operations",
"body": "This is an excellent opportunity for a Senior Operations professional to play a leadership role in the expansion of our Clients' European Wealth Management/ Private Banking operation based in Frankfurt. This person will be responsible for supervising all daily operations for the German onshore business as well as the expansion and on-boarding of key E.U clients.",
"owner_type": "user",
"owner_id": 2,
"category_id": 1,
"creation_date": "2014-03-18 06:54:48",
"modified_date": "2014-03-18 06:54:48",
"view_count": 1748,
"comment_count": 70,
"search": 1,
"draft": 0,
"menu": [
{
"label": "Edit Blog",
"name": "edit",
"url": "blogs/edit/178",
"urlParams": []
},
{
"label": "Delete Blog",
"name": "delete",
"url": "blogs/delete/178",
"urlParams": []
}
],
"category_title": "Arts & Culture",
"url": "http://example.com/blogs/2/178/hello-new-blog",
"owner_image": "http://example.com/public/user/41/02/023f_eabf.jpg",
"owner_title": "James Robert",
"allow_to_view": 1
},
{
"blog_id": 177,
"title": "Leiter Personalentwicklung (m/w)",
"body": "Die Cornelsen Schulverlage bündeln Erfolgsmarken wie Cornelsen, Duden Schulbuch, Oldenbourg und Volk und Wissen und gehören seit über 60 Jahren zu den Top-Playern im Markt der deutschsprachigen Bildungsmedien. Wir sind die größte Einheit innerhalb der Franz Cornelsen Bildungsgruppe, die mit über 1.500 Mitarbeitern für innovative Bildungsangebote in Deutschland, Österreich und der Schweiz sorgt. Um den Ausbau interaktiver Lernangebote weiter voran zu treiben, suchen wir Mitarbeiterinnen und Mitarbeiter, die unseren Erfolg mit ihrer Inspiration, ihrer Begeisterung und ihrem Know-How steigern. Wenn Sie Spaß daran haben, die Zukunft der Bildungsbranche aktiv mitzugestalten und einen Arbeitsplatz schätzen, der Ihnen ein hohes Maß an Eigenverantwortung und Freiraum bietet, dann sind Sie bei uns richtig.",
"owner_type": "user",
"owner_id": 2,
"category_id": 1,
"creation_date": "2014-06-22 08:15:16",
"modified_date": "2014-07-12 08:15:16",
"view_count": 1127,
"comment_count": 38,
"search": 1,
"draft": 0,
"menu": [
{
"label": "Edit Blog",
"name": "edit",
"url": "blogs/edit/177",
"urlParams": []
},
{
"label": "Delete Blog",
"name": "delete",
"url": "blogs/delete/177",
"urlParams": []
}
],
"category_title": "Arts & Culture",
"url": "http://example.com/blogs/2/177/hello",
"owner_image": "http://example.com/public/user/41/02/023f_eabf.jpg",
"owner_title": "James Robert",
"allow_to_view": 1
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Blogs Search Form ¶
Blogs Search FormGET/blogs/search-form
Get the blogs search form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "search",
"label": "Search Blogs"
},
{
"type": "Select",
"name": "orderby",
"label": "Browse By",
"multiOptions": {
"creation_date": "Most Recent",
"view_count": "Most Viewed"
}
},
{
"type": "Select",
"name": "show",
"label": "Show",
"multiOptions": {
"1": "Everyone's Blogs",
"2": "Only My Friends' Blogs"
}
},
{
"type": "Select",
"name": "category",
"label": "Category",
"multiOptions": {
"0": "All Categories",
"1": "Arts & Culture",
"2": "Business",
"3": "Entertainment",
"5": "Family & Home",
"6": "Health",
"7": "Recreation",
"8": "Personal",
"9": "Shopping",
"10": "Society",
"11": "Sports",
"12": "Technology",
"13": "Other"
}
},
{
"type": "Submit",
"name": "submit",
"label": "Search"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create Blog ¶
Get Blog Creation FormGET/blogs/create
Get the blog creation form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "title",
"label": "Title",
"hasValidator": true
},
{
"type": "Text",
"name": "tags",
"label": "Tags (Keywords)",
"hasValidator": true
},
{
"type": "Select",
"name": "category_id",
"label": "Category",
"multiOptions": {
"1": "Arts & Culture",
"2": "Business",
"3": "Entertainment",
"5": "Family & Home",
"6": "Health",
"7": "Recreation",
"8": "Personal",
"9": "Shopping",
"10": "Society",
"11": "Sports",
"12": "Technology",
"13": "Other"
}
},
{
"type": "Select",
"name": "draft",
"label": "Status",
"multiOptions": [
"Published",
"Saved As Draft"
],
"description": "If this entry is published, it cannot be switched back to draft mode."
},
{
"type": "Textarea",
"name": "body",
"label": "body"
},
{
"type": "Checkbox",
"name": "search",
"label": "Show this blog entry in search results"
},
{
"type": "Select",
"name": "auth_view",
"label": "Privacy",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone"
},
{
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post comments on this blog entry?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone"
},
{
"type": "Submit",
"name": "submit",
"label": "Post Entry"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create BlogPOST/blogs/create
Create a new blog by posting the blog creation form.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Head of Banking Operations | blog title |
tags |
no | string | banking, operations | blog tags (comma separated) |
category_id |
yes | integer | 2 | category id |
draft |
yes | integer | 1 | save in draft (1 ), or publish (0 ) |
body |
yes | string | This is an excellent opportunity… | blog content |
search |
no | boolean | 1 | make blog searchable (1 ) or not (0 ) |
auth_view |
yes | string | everyone | view authorization (everyone, owner_network, etc.) |
auth_comment |
yes | string | everyone | comment authorization (everyone, owner_network, etc.) |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"title": "Head of Banking Operations",
"tags": "banking, operations",
"category_id": 3,
"draft": 0,
"body": "This is an excellent opportunity for a Senior Operations professional to play a leadership role in the expansion of our Clients' European Wealth Management/ Private Banking operation based in Frankfurt. This person will be responsible for supervising all daily operations for the German onshore business as well as the expansion and on-boarding of key E.U clients.",
"search": 1,
"auth_view": "everyone",
"auth_comment": "everyone"
}
200
Headers
Content-Type: application/json
Body
{
"gutterMenu": {
"share": {
"label": "Share",
"url": "activity/share",
"urlParams": {
"type": "blog",
"id": 8
}
},
"report": {
"label": "Report",
"url": "report/create/subject/blog_8",
"urlParams": {
"type": "blog",
"id": 8
}
},
"subscribe": {
"label": "Subscribe",
"url": "blogs/subscribe",
"urlParams": {
"user_id": 2
}
}
},
"response": {
"blog_id": 178,
"title": "Head of Banking Operations",
"body": "This is an excellent opportunity for a Senior Operations professional to play a leadership role in the expansion of our Clients' European Wealth Management/ Private Banking operation based in Frankfurt. This person will be responsible for supervising all daily operations for the German onshore business as well as the expansion and on-boarding of key E.U clients.",
"owner_type": "user",
"owner_id": 2,
"category_id": 1,
"creation_date": "2014-03-18 06:54:48",
"modified_date": "2014-03-18 06:54:48",
"view_count": 1748,
"comment_count": 70,
"search": 1,
"draft": 0,
"url": "http://example.com/blogs/2/8/non-not",
"owner_image": "http://example.com/public/user/3f/02/023d_0ab4.jpg",
"owner_title": "James Robert",
"tags": [
"3" => "banking",
"8" => "operations"
],
"category_title": "Arts & Culture"
}
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"body": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Blog Profile ¶
Blog ProfileGET/blogs/view/{blog_id}
Get a blog post and its gutter menu’s (edit, delete, share, report, subscribe) information.
Example URI
- blog_id
integer
(required) Example: 20blog id
- gutter_menu (optional, boolean, `gutter_menu
string
(required) Default: 1 OR 0`)get gutter menu’s array. Default valus is 1.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"gutterMenu": {
"share": {
"label": "Share",
"url": "activity/share",
"urlParams": {
"type": "blog",
"id": 8
}
},
"report": {
"label": "Report",
"url": "report/create/subject/blog_8",
"urlParams": {
"type": "blog",
"id": 8
}
},
"subscribe": {
"label": "Subscribe",
"url": "blogs/subscribe",
"urlParams": {
"user_id": 2
}
}
},
"response": {
"blog_id": 178,
"title": "Head of Banking Operations",
"body": "This is an excellent opportunity for a Senior Operations professional to play a leadership role in the expansion of our Clients' European Wealth Management/ Private Banking operation based in Frankfurt. This person will be responsible for supervising all daily operations for the German onshore business as well as the expansion and on-boarding of key E.U clients.",
"owner_type": "user",
"owner_id": 2,
"category_id": 1,
"creation_date": "2014-03-18 06:54:48",
"modified_date": "2014-03-18 06:54:48",
"view_count": 1748,
"comment_count": 70,
"search": 1,
"draft": 0,
"url": "http://example.com/blogs/2/8/non-not",
"owner_image": "http://example.com/public/user/3f/02/023d_0ab4.jpg",
"owner_title": "James Robert",
"tags": [
"3" => "banking",
"8" => "operations"
],
"category_title": "Arts & Culture"
}
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: blog_id"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Edit Blog ¶
Get Edit Blog FormGET/blogs/edit/{blog_id}
Get the form for editing a blog-post.
Returns the form
and formValues
as response. In form
we get the complete blog form and in formValues
we get the form’s values.
Example URI
- blog_id
integer
(required) Example: 1246blog id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"form": [
{
"type": "Text",
"name": "title",
"label": "Title",
"hasValidator": true
},
{
"type": "Text",
"name": "tags",
"label": "Tags (Keywords)",
"hasValidator": true
},
{
"type": "Select",
"name": "category_id",
"label": "Category",
"multiOptions": {
"1": "Arts & Culture",
"2": "Business",
"3": "Entertainment",
"5": "Family & Home",
"6": "Health",
"7": "Recreation",
"8": "Personal",
"9": "Shopping",
"10": "Society",
"11": "Sports",
"12": "Technology",
"13": "Other"
}
},
{
"type": "Select",
"name": "draft",
"label": "Status",
"multiOptions": [
"Published",
"Saved As Draft"
],
"description": "If this entry is published, it cannot be switched back to draft mode."
},
{
"type": "Textarea",
"name": "body",
"label": "body"
},
{
"type": "Checkbox",
"name": "search",
"label": "Show this blog entry in search results"
},
{
"type": "Select",
"name": "auth_view",
"label": "Privacy",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone"
},
{
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post comments on this blog entry?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone"
},
{
"type": "Submit",
"name": "submit",
"label": "Post Entry"
}
],
"formValues": {
"blog_id": 178,
"title": "Head of Banking Operations",
"body": "This is an excellent opportunity for a Senior Operations professional to play a leadership role in the expansion of our Clients' European Wealth Management/ Private Banking operation based in Frankfurt. This person will be responsible for supervising all daily operations for the German onshore business as well as the expansion and on-boarding of key E.U clients.",
"owner_type": "user",
"owner_id": 2,
"category_id": 1,
"creation_date": "2014-03-18 06:54:48",
"modified_date": "2014-03-18 06:54:48",
"view_count": 1748,
"comment_count": 70,
"search": 1,
"draft": 0,
"auth_view": "everyone",
"auth_comment": "everyone",
"tags": "banking, operations"
}
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: blog_id"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit BlogPUT/blogs/edit
Edit a blog-post.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Head of Banking Operations | blog title |
tags |
no | string | banking, operations | blog tags (comma separated) |
category_id |
yes | integer | 2 | category id |
draft |
yes | integer | 1 | save in draft (1 ), or publish (0 ) |
body |
yes | string | This is an excellent opportunity… | blog content |
search |
no | boolean | 1 | make blog searchable (1 ) or not (0 ) |
auth_view |
yes | string | everyone | view authorization (everyone, owner_network, etc.) |
auth_comment |
yes | string | everyone | comment authorization (everyone, owner_network, etc.) |
Example URI
- blog_id (required, integer, `blog_id
string
(required) Default: 1246`)blog id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"blog_id": 278,
"title": "Head of Banking Operations"
"tags": "banking, operations"
"category_id": 2,
"draft": 0,
"body": "This is an excellent opportunity for a Senior Operations professional to play a leadership role in the expansion of our Clients' European Wealth Management/ Private Banking operation based in Frankfurt. This person will be responsible for supervising all daily operations for the German onshore business as well as the expansion and on-boarding of key E.U clients.",
"search": 1,
"auth_view": "everyone",
"auth_comment": "everyone"
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"body": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Get User's Blog Categories ¶
Get User's Blog CategoriesGET/blogs/category
Get the categories of all the blog posts created by a user.
Example URI
- owner_id (required, integer, `owner_id
string
(required) Default: 923`)owner id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"1": "Arts & Culture",
"2": "Business",
"3": "Entertainment",
"5": "Family & Home",
"6": "Health",
"7": "Recreation"
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: owner_id"
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Blogs Subscribe ¶
Blogs SubscribePOST/blogs/subscribe
Subscribe to the blog-posts of a user.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
owner_id |
yes | integer | 924 | owner id |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"owner_id": 924
}
204
400
Headers
Content-Type: application/json
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: owner_id"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Blogs Unsubscribe ¶
Blogs UnsubscribePOST/blogs/unsubscribe
Unsubscribe from the blog-posts of a user.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
owner_id |
yes | integer | 924 | owner id |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"owner_id": 924
}
204
400
Headers
Content-Type: application/json
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: owner_id"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Blog ¶
Delete BlogDELETE/blogs/delete/{blog_id}
Delete a blog-post.
Example URI
- blog_id
integer
(required) Example: 148blog id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
400
Headers
Content-Type: application/json
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: blog_id"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Classifieds Plugin ¶
These are the APIs for SocialEngine’s official Classifieds Plugin.
Browse Classifieds ¶
Browse ClassifiedsGET/classifieds{?search}{?page}
Get the classified listings. Classifieds can also be browsed and searched based on keywords, categories, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of classifieds in response and use page
for the page number. [i.e: If you have 100 classifieds and the first request has limit=20
and page=1
, then in that case the recent 20 classifieds will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent classifieds will be returned.]
Example URI
- search
string
(optional) Example: search=blget classifieds that contain this keyword in title or description.
- orderby
string
(optional) Example: orderby=creation_dateget classified listings in the order of descending creation date (
creation_date
) or descending number of views (view_count
).- show
integer
(optional) Example: show=1get classified of all users (
1
) or only of the member’s friends (2
).- closed
integer
(optional) Example: closed=1get open (closed=0) or closed (closed=1) classified listings.
- category
integer
(optional) Example: category=13get all classifieds of a particular category ID.
- user_id (optional, integer, `user_id
string
(required) Default: 125`)user id of profile owner. Default value is logged-in user’s ID.
- page
integer
(optional) Example: page=2return the ‘limit’ number of classifieds of that page of classified listings.
- limit
integer
(optional) Example: limit=20number of classifieds. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canCreate": 1,
"response": [
{
"classified_id": 242,
"title": "Oxford Dictionary of Biology 6th Edition",
"body": "<p>Students of biology at A level and undergraduate level.</p><p>Students of related subjects. Professionals, teachers, and anyone coming into contact with terms and concepts in biology.</p>",
"owner_id": 1,
"category_id": 1,
"photo_id": 836,
"creation_date": "2014-08-17 06:48:44",
"modified_date": "2014-08-17 06:48:44",
"view_count": 430,
"comment_count": 120,
"search": 1,
"closed": 0,
"category_title": "Arts & Culture",
"profile_fields":{
"Price":"200",
"Locations":"California"
},
"url": "http://example.com/classifieds/1/2/classified-title-2",
"image": "http://example.com/public/classified/49/03/0346_64ec.png",
"image_icon": "http://example.com/public/classified/49/03/0346_65ec.png",
"image_profile": "http://example.com/public/classified/49/03/0346_66ec.png",
"image_normal": "http://example.com/public/classified/49/03/0346_67ec.png",
"owner_title": "Jennifer Aniston"
"allow_to_view":1,
"is_edit":1,
"is_delete":1
},
{
"classified_id": 244,
"title": "Neuromancer",
"body": "<p>Spine tight and slightly bent with stress lines noticeable. Slight creases or bends in the cover. Pages mostly white. Light wear and minor rubbing noticeable on extremities. Winner of the Nebula, Philip K. Dick, SF Chronicle, Ditmar (International), and the Hugo Awards for Best SF Novel. 51st printing.</p>",
"owner_id": 1,
"category_id": 1,
"photo_id": 832,
"creation_date": "2014-08-25 06:47:40",
"modified_date": "2014-08-25 06:47:40",
"view_count": 650,
"comment_count": 67,
"search": 1,
"closed": 0,
"category_title": "Arts & Culture",
"profile_fields":{
"Price":"200",
"Locations":"California"
},
"url": "http://example.com/classifieds/1/1/classified-title",
"image": "http://example.com/public/classified/49/03/0346_64ec.png",
"image_icon": "http://example.com/public/classified/49/03/0346_65ec.png",
"image_profile": "http://example.com/public/classified/49/03/0346_66ec.png",
"image_normal": "http://example.com/public/classified/49/03/0346_67ec.png",
"owner_title": "Jennifer Aniston"
"allow_to_view":1,
"is_edit":1,
"is_delete":1
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
My Classifieds ¶
My ClassifiedsGET/classifieds/manage{?search}
Get the classifieds of a member. Classifieds can also be browsed and searched based on keywords, categories, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of classifieds in response and use page
for the page number. [i.e: If you have 100 classifieds and the first request has limit=20
and page=1
, then in that case the recent 20 classifieds will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent classifieds will be returned.]
Example URI
- search
string
(optional) Example: search=blget classifieds that contain this keyword in title or description.
- orderby
string
(optional) Example: orderby=creation_dateget classified listings in the order of descending creation date (
creation_date
) or descending number of views (view_count
).- show
integer
(optional) Example: show=1get classified of all users (
1
) or only of the member’s friends (2
).- closed
integer
(optional) Example: closed=1get open (closed=0) or closed (closed=1) classified listings.
- category
integer
(optional) Example: category=13get all classifieds of a particular category ID.
- page
integer
(optional) Example: page=2return the ‘limit’ number of classifieds of that page of classified listings.
- limit
integer
(optional) Example: limit=20number of classifieds. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"canCreate": 1,
"response": [
{
"classified_id": 242,
"title": "Oxford Dictionary of Biology 6th Edition",
"body": "<p>Students of biology at A level and undergraduate level.</p><p>Students of related subjects. Professionals, teachers, and anyone coming into contact with terms and concepts in biology.</p>",
"owner_id": 1,
"category_id": 1,
"photo_id": 836,
"creation_date": "2014-08-17 06:48:44",
"modified_date": "2014-08-17 06:48:44",
"view_count": 430,
"comment_count": 120,
"search": 1,
"closed": 0,
"menu": [
{
"label": "Edit Listing",
"name": "edit",
"url": "classifieds/edit/242",
"urlParams": []
},
{
"label": "Delete Listing",
"name": "delete",
"url": "classifieds/delete/242",
"urlParams": []
}
],
"category_title": "Arts & Culture",
"profile_fields": {
"Price": "200",
"Locations": "California"
},
"url": "http://example.com/classifieds/1/2/classified-title-2",
"image": "http://example.com/public/classified/49/03/0346_64ec.png",
"image_icon": "http://example.com/public/classified/49/03/0346_65ec.png",
"image_profile": "http://example.com/public/classified/49/03/0346_66ec.png",
"image_normal": "http://example.com/public/classified/49/03/0346_67ec.png",
"owner_title": "Jennifer Aniston"
},
{
"classified_id": 244,
"title": "Neuromancer",
"body": "<p>Spine tight and slightly bent with stress lines noticeable. Slight creases or bends in the cover. Pages mostly white. Light wear and minor rubbing noticeable on extremities. Winner of the Nebula, Philip K. Dick, SF Chronicle, Ditmar (International), and the Hugo Awards for Best SF Novel. 51st printing.</p>",
"owner_id": 1,
"category_id": 1,
"photo_id": 832,
"creation_date": "2014-08-25 06:47:40",
"modified_date": "2014-08-25 06:47:40",
"view_count": 650,
"comment_count": 67,
"search": 1,
"closed": 0,
"menu": [
{
"label": "Edit Listing",
"name": "edit",
"url": "classifieds/edit/244",
"urlParams": []
},
{
"label": "Delete Listing",
"name": "delete",
"url": "classifieds/delete/244",
"urlParams": []
}
],
"category_title": "Arts & Culture",
"profile_fields": {
"Price": "200",
"Locations": "California"
},
"url": "http://example.com/classifieds/1/1/classified-title",
"image": "http://example.com/public/classified/49/03/0346_64ec.png",
"image_icon": "http://example.com/public/classified/49/03/0346_65ec.png",
"image_profile": "http://example.com/public/classified/49/03/0346_66ec.png",
"image_normal": "http://example.com/public/classified/49/03/0346_67ec.png",
"owner_title": "Jennifer Aniston"
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Classifieds Search Form ¶
Classifieds Search FormGET/classifieds/search-form
Get the classifieds search form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
[
"search": {
"type": "Text",
"name": "search",
"label": "Search Classifieds"
},
"orderby": {
"type": "Select",
"name": "orderby",
"label": "Browse By",
"multiOptions": {
"creation_date": "Most Recent",
"view_count": "Most Viewed"
}
},
"show": {
"type": "Select",
"name": "show",
"label": "Show",
"multiOptions": {
"1": "Everyone's Posts",
"2": "Only My Friends' Posts"
}
},
"closed": {
"type": "Select",
"name": "closed",
"label": "Status",
"multiOptions": {
"": "All Listings",
"0": "Only Open Listings",
"1": "Only Closed Listings"
}
},
"category": {
"type": "Select",
"name": "category",
"label": "Category",
"multiOptions": [
"All Categories",
"Arts & Culture",
"Business",
"Entertainment",
"Family & Home",
"Health",
"Other",
"Personal",
"Recreation",
"Shopping",
"Society",
"Sports",
"Technology"
]
},
"has_photo": {
"type": "Checkbox",
"name": "has_photo",
"label": "Only Classifieds With Photos"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create Classified ¶
Get Classified Creation FormGET/classifieds/create
Get the classified creation form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"title": {
"type": "Text",
"name": "title",
"label": "Listing Title",
"hasValidator": true
},
"tags": {
"type": "Text",
"name": "tags",
"label": "Tags (Keywords)"
},
"category_id": {
"type": "Select",
"name": "category_id",
"label": "Category",
"multiOptions": {
"1": "Arts & Culture",
"2": "Business",
"3": "Entertainment",
"5": "Family & Home",
"6": "Health",
"7": "Recreation",
"8": "Personal",
"9": "Shopping",
"10": "Society",
"11": "Sports",
"12": "Technology",
"13": "Other"
}
},
"body": {
"type": "Textarea",
"name": "body",
"label": "Description",
"hasValidator": true
},
"photo": {
"type": "File",
"name": "photo",
"label": "Main Photo"
},
"auth_view": {
"type": "Select",
"name": "auth_view",
"label": "Privacy",
"description": "Who may see this classified listing?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone"
},
"auth_comment": {
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post comments on this classified listing?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone"
},
"submit": {
"type": "Submit",
"name": "submit",
"label": "Post Listing"
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create ClassifiedPOST/classifieds/create
Create a new classified by posting the classified creation form.
To upload the listing photo, send the file in multipart / form-data
format with the photo
API request parameters.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Oxford Dictionary of Biology 6th Edition | classified title |
tags |
no | string | dictionary, biology | classified tags (comma separated) |
category_id |
yes | integer | 2 | category id |
body |
yes | string | Students of biology at A level and undergraduate level… | classified content |
auth_view |
yes | string | everyone | view authorization (everyone, owner_network, etc.) |
auth_comment |
yes | string | everyone | comment authorization (everyone, owner_network, etc.) |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"title": "Oxford Dictionary of Biology 6th Edition",
"tags": "dictionary, biology",
"category_id": 3,
"body": "Students of biology at A level and undergraduate level. Students of related subjects. Professionals, teachers, and anyone coming into contact with terms and concepts in biology.",
"auth_view": "everyone",
"auth_comment": "everyone"
}
200
Headers
Content-Type: application/json
Body
{
"classified_id": 244,
"title": "Oxford Dictionary of Biology 6th Edition",
"body": "Students of biology at A level and undergraduate level...</p>",
"owner_id": 1,
"category_id": 1,
"photo_id": 832,
"creation_date": "2014-08-24 06:47:40",
"modified_date": "2014-08-24 06:47:40",
"view_count": 650,
"comment_count": 67,
"search": 1,
"closed": 0,
"category_title": "Arts & Culture",
"url": "http://example.com/classifieds/1/1/classified-title",
"images": [
{
"main": "http://example.com/public/classified/43/03/0340_3c26.png",
"profile": "http://example.com/public/classified/44/03/0341_0453.png",
"normal": "http://example.com/public/classified/45/03/0342_64ec.png",
"icon": "http://example.com/public/classified/46/03/0343_b8a4.png"
}
],
"owner_image": "http://dev1.bigsteptech.in/public/classified/46/03/0343_b8a4.png",
"owner_title": "Jennifer Aniston",
"gutterMenu": {
"edit": {
"label": "Edit",
"url": "classifieds/edit/244",
"urlParams": {}
},
"delete": {
"label": "Delete",
"url": "classifieds/delete/244",
"urlParams": {}
},
"close": {
"label": "Close",
"url": "classifieds/close/244",
"urlParams": {
"closed": 1
}
},
"share": {
"label": "Share",
"url": "activity/share",
"urlParams": {
"type": "classified",
"id": 1
}
}
}
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"body": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Classified Profile ¶
Classified ProfileGET/classifieds/view
Get a classified post and its gutter menu’s (edit, delete, share, report) information.
Example URI
- classified_id (required, integer, `classified_id
string
(required) Default: 20`)classified id
- gutter_menu (optional, boolean, `gutter_menu
string
(required) Default: 1 OR 0`)get gutter menu’s array. Default valus is 1.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"classified_id": 244,
"title": "Neuromancer",
"body": "<p>Spine tight and slightly bent with stress lines noticeable. Slight creases or bends in the cover. Pages mostly white. Light wear and minor rubbing noticeable on extremities. Winner of the Nebula, Philip K. Dick, SF Chronicle, Ditmar (International), and the Hugo Awards for Best SF Novel. 51st printing.</p>",
"owner_id": 1,
"category_id": 1,
"photo_id": 832,
"creation_date": "2014-08-24 06:47:40",
"modified_date": "2014-08-24 06:47:40",
"view_count": 650,
"comment_count": 67,
"search": 1,
"closed": 0,
"category_title": "Arts & Culture",
"url": "http://example.com/classifieds/1/1/classified-title",
"images": [
{
"main": "http://example.com/public/classified/43/03/0340_3c26.png",
"profile": "http://example.com/public/classified/44/03/0341_0453.png",
"normal": "http://example.com/public/classified/45/03/0342_64ec.png",
"icon": "http://example.com/public/classified/46/03/0343_b8a4.png"
}
],
"owner_image": "http://dev1.bigsteptech.in/public/classified/46/03/0343_b8a4.png",
"owner_title": "Jennifer Aniston",
"gutterMenu": {
"edit": {
"label": "Edit",
"url": "classifieds/edit/244",
"urlParams": {}
},
"delete": {
"label": "Delete",
"url": "classifieds/delete/244",
"urlParams": {}
},
"close": {
"label": "Close",
"url": "classifieds/close/244",
"urlParams": {
"closed": 1
}
},
"share": {
"label": "Share",
"url": "activity/share",
"urlParams": {
"type": "classified",
"id": 1
}
}
}
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: classified_id"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Edit Classified ¶
Get Edit Classified FormGET/classifieds/edit/{classified_id}
Get the form for editing a classified-post.
Returns the form
and formValues
as response. In form
we get the complete classified form and in formValues
we get the form’s values.
Example URI
- classified_id
integer
(required) Example: 8classified id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Accept: application/json
Body
{
"form": {
"title": {
"type": "Text",
"name": "title",
"label": "Listing Title",
"hasValidator": true
},
"tags": {
"type": "Text",
"name": "tags",
"label": "Tags (Keywords)"
},
"category_id": {
"type": "Select",
"name": "category_id",
"label": "Category",
"multiOptions": {
"1": "Arts & Culture",
"2": "Business",
"3": "Entertainment",
"5": "Family & Home",
"6": "Health",
"7": "Recreation",
"8": "Personal",
"9": "Shopping",
"10": "Society",
"11": "Sports",
"12": "Technology",
"13": "Other"
}
},
"body": {
"type": "Textarea",
"name": "body",
"label": "Description",
"hasValidator": true
},
"photo": {
"type": "File",
"name": "photo",
"label": "Main Photo"
},
"auth_view": {
"type": "Select",
"name": "auth_view",
"label": "Privacy",
"description": "Who may see this classified listing?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone"
},
"auth_comment": {
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post comments on this classified listing?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone"
},
"submit": {
"type": "Submit",
"name": "submit",
"label": "Post Listing"
}
},
"formValues": {
"classified_id": 243,
"title": "Oxford Dictionary of Biology 6th Edition",
"body": "<p>Students of biology at A level and undergraduate level. Students of related subjects. Professionals, teachers, and anyone coming into contact with terms and concepts in biology.</p>",
"owner_id": 1,
"category_id": 3,
"photo_id": 836,
"creation_date": "2015-03-25 06:48:44",
"modified_date": "2015-03-25 06:48:44",
"view_count": 0,
"comment_count": 0,
"search": 1,
"closed": 0,
"auth_view": "everyone",
"auth_comment": "everyone",
"tags": "dictionary, biology"
}
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: classified_id"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit ClassifiedPUT/classifieds/edit
Edit a classified-post.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Oxford Dictionary of Biology 6th Edition | classified title |
tags |
no | string | dictionary, biology | classified tags (comma separated) |
category_id |
yes | integer | 2 | category id |
body |
yes | string | Students of biology at A level and undergraduate level… | classified content |
auth_view |
yes | string | everyone | view authorization (everyone, owner_network, etc.) |
auth_comment |
yes | string | everyone | comment authorization (everyone, owner_network, etc.) |
Example URI
- classified_id (required, integer, `classified_id
string
(required) Default: 8`)listing id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"classified_id": 243,
"title": "Oxford Dictionary of Biology 6th Edition",
"tags": "dictionary, biology",
"category_id": 3,
"body": "<p>Students of biology at A level and undergraduate level. Students of related subjects. Professionals, teachers, and anyone coming into contact with terms and concepts in biology.</p>",
"auth_view": "everyone",
"auth_comment": "everyone"
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"body": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Open / Close Classified ¶
Open / Close ClassifiedPOST/classifieds/close/{classified_id}
Open / close a classified-post.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
closed |
yes | boolean | 0 | open / close classified post. Default limit is 1 |
Example URI
- classified_id
integer
(required) Example: 244listing id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"closed": 0
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Delete Classified ¶
Delete ClassifiedDELETE/classifieds/delete/{classified_id}
Delete a classified-post.
Example URI
- classified_id
integer
(required) Example: 428classified id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: classified_id"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Classifieds Plugin / Photos ¶
These are the APIs for SocialEngine’s official Classifieds Plugin.
Photos List ¶
Photos ListGET/classifieds/photo/list/{?page}
Get the classified photos listings.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of photos in response and use page
for the page number. [i.e: If you have 100 photos and the first request has limit=20
and page=1
, then in that case the recent 20 photos will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent photos will be returned.]
Example URI
- classified_id (required, integer, `classified_id
string
(required) Default: 58`)classified id
- page
integer
(optional) Example: page=2return the ‘limit’ number of photos of that page of photo listings.
- limit
integer
(optional) Example: limit=20number of photos. Default limit is 10.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canUpload": 0,
"totalItemCount": 2,
"images": [
{
"photo_id": 143,
"album_id": 6,
"classified_id": 58,
"user_id": 1,
"title": "",
"description": "",
"collection_id": 6,
"file_id": 230,
"creation_date": "2015-06-08 08:38:57",
"modified_date": "2015-06-08 08:38:57",
"image": "http://example.com/public/classified/e6/00e6_947e.jpg?c=1208",
"image_normal": "http://example.com/public/classified/e8/00e8_70df.jpg?c=4a88",
"image_profile": "http://example.com/public/classified/e7/00e7_ef57.jpg?c=56f6",
"image_icon": "http://example.com/public/classified/e9/00e9_8aaf.jpg?c=dd6b",
"content_url": "http://example.com/albums/photo/view/album_id/2/photo_id/6",
"user_title": "Bill Jersey",
"likes_count": 89,
"is_like": 1
},
{
"photo_id": 144,
"album_id": 6,
"classified_id": 58,
"user_id": 1,
"title": "",
"description": "",
"collection_id": 6,
"file_id": 234,
"creation_date": "2015-06-08 08:41:37",
"modified_date": "2015-06-08 08:41:37",
"image": "http://example.com/public/classified/ea/00ea_947e.jpg",
"image_normal": "http://example.com/public/classified/ec/00ec_70df.jpg",
"image_profile": "http://example.com/public/classified/eb/00eb_ef57.jpg",
"image_icon": "http://example.com/public/classified/ed/00ed_8aaf.jpg",
"content_url": "http://example.com/albums/photo/view/album_id/2/photo_id/6",
"user_title": "Emma Wise",
"likes_count": 62,
"is_like": 0
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Photo View ¶
Photo ViewGET/classifieds/photo/view
Get a classified photo and its gutter menu’s (delete) information.
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 947`)classified photo id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"photo_id": 947,
"album_id": 62,
"classified_id": 98,
"user_id": 121,
"title": "",
"description": "",
"collection_id": 6,
"file_id": 830,
"creation_date": "2015-06-08 08:38:57",
"modified_date": "2015-06-08 08:38:57",
"image": "http://example.com/public/classified/e6/00e6_947e.jpg",
"image_normal": "http://example.com/public/classified/e8/00e8_70df.jpg",
"image_profile": "http://example.com/public/classified/e7/00e7_ef57.jpg",
"image_icon": "http://example.com/public/classified/e9/00e9_8aaf.jpg",
"content_url": "http://example.com/albums/photo/view/album_id/2/photo_id/6",
"canEdit": 0
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Upload Photos ¶
Upload PhotosPOST/classifieds/photo/upload
Upload the classified photos.
To upload the listing photos, send the files as an array of multipart / form-data
elements with the photo
API request parameters.
Example URI
- classified_id (required, integer, `classified_id
string
(required) Default: 58`)classified id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
201
400
Body
{
"status_code": 400,
"error": true,
"error_code": "invalid_method",
"message": "Incorrect method"
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Delete Photo ¶
Delete PhotoDELETE/classifieds/photo/remove
Delete a classified-photo.
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 947`)classified photo id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"photo_id": 873,
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "invalid_method",
"message": "Incorrect method"
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Make Classified Cover ¶
Make Classified CoverPOST/classifieds/photo/make-photo-cover
Make classified cover a classified-photo.
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 947`)classified photo id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "invalid_method",
"message": "Incorrect method"
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Groups Plugin ¶
These are the APIs for SocialEngine’s official Groups Plugin.
Browse Groups ¶
Browse GroupsGET/groups
Get the groups listing. Groups can also be browsed and searched based on keywords, categories, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of groups in response and use page
for the page number. [i.e: If you have 100 groups and the first request has limit=20
and page=1
, then in that case the recent 20 groups will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent groups will be returned.]
Example URI
- text
string
(optional) Example: text=teacherget groups that contain this keyword in title or description.
- category_id (optional, integer, `category_id
string
(required) Default: 13`)get all groups of a particular category ID.
- order
string
(optional) Example: order=creation_dateget group listings in the order of recently created (
creation_date
) or most popular (member_count
).- user_id (optional, integer, `user_id
string
(required) Default: 125`)user id of profile owner. Default value is logged-in user’s ID.
- page
integer
(optional) Example: page=2return the ‘limit’ number of groups of that page of group listings.
- limit
integer
(optional) Example: limit=20number of groups. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canCreate": 1,
"totalItemCount": 434,
"response": [
{
"group_id": 862,
"user_id": 89,
"title": "Harry Potter Stories",
"description": "This group is for all harry potter stories lovers. All the Harry Potter stories will be found here.",
"category_id": 2,
"search": 1,
"invite": 1,
"approval": 0,
"photo_id": 716,
"creation_date": "2014-01-29 05:03:50",
"modified_date": "2015-02-10 07:46:55",
"member_count": 189,
"view_count": 245,
"location": "",
"image": "http://example.com/public/group/1d/001d_9348.jpg",
"image_normal": "http://example.com/public/group/1f/001f_fa0f.jpg",
"image_profile": "http://example.com/public/group/1e/001e_b286.jpg",
"image_icon": "http://example.com/public/group/20/0020_cc70.jpg",
"content_url": "http://example.com/group/1",
"owner_title": "M Michael",
"allow_to_view": 1
},
{
"group_id": 875,
"user_id": 72,
"title": "Boot Lovers",
"description": "This group for all boot lovers - who love to wear boots in every season.",
"category_id": 8,
"search": 1,
"invite": 1,
"approval": 0,
"photo_id": 0,
"creation_date": "2014-01-23 06:25:09",
"modified_date": "2015-01-25 06:46:24",
"member_count": 1,
"view_count": 780,
"location": "",
"image": "http://example.com/application/modules/Group/externals/images/nophoto_group_thumb_profile.png",
"image_normal": "http://example.com/application/modules/Group/externals/images/nophoto_group_thumb_normal.png",
"image_profile": "http://example.com/application/modules/Group/externals/images/nophoto_group_thumb_profile.png",
"image_icon": "http://example.com/application/modules/Group/externals/images/nophoto_group_thumb_icon.png",
"content_url": "http://example.com/group/1",
"owner_title": "Zahid Khurshid",
"allow_to_view": 1
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Manage Groups ¶
Manage GroupsGET/groups/manage{?search_text}
Get the groups of a member. Groups can also be browsed and searched based on keywords, categories, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of groups in response and use page
for the page number. [i.e: If you have 100 groups and the first request has limit=20
and page=1
, then in that case the recent 20 groups will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent groups will be returned.]
Example URI
- search_text
string
(optional) Example: search=teacherget groups that contain this keyword in title or description.
- category_id (optional, integer, `category_id
string
(required) Default: 13`)get all groups of a particular category ID.
- order
string
(optional) Example: order=creation_dateget group listings in the order of recently created (
creation_date
) or most popular (member_count
).- page
integer
(optional) Example: page=2return the ‘limit’ number of groups of that page of group listings.
- limit
integer
(optional) Example: limit=20number of groups. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"canCreate": 1,
"totalItemCount": 434,
"response": [
{
"group_id": 862,
"user_id": 89,
"title": "Harry Potter Stories",
"description": "This group is for all harry potter stories lovers. All the Harry Potter stories will be found here.",
"category_id": 2,
"search": 1,
"invite": 1,
"approval": 0,
"photo_id": 716,
"creation_date": "2014-01-29 05:03:50",
"modified_date": "2015-02-10 07:46:55",
"member_count": 189,
"view_count": 245,
"location": "",
"menu": [
{
"label": "Edit Group",
"name": "edit",
"url": "groups/edit/862",
"urlParams": {}
},
{
"label": "Delete Group",
"name": "delete",
"url": "groups/delete/862",
"urlParams": {}
}
],
"image": "http://example.com/public/group/1d/001d_9348.jpg",
"image_normal": "http://example.com/public/group/1f/001f_fa0f.jpg",
"image_profile": "http://example.com/public/group/1e/001e_b286.jpg",
"image_icon": "http://example.com/public/group/20/0020_cc70.jpg",
"content_url": "http://example.com/group/1",
"owner_title": "M Michael",
"allow_to_view": 1
},
{
"group_id": 878,
"user_id": 89,
"title": "Sherlock Holmes",
"description": "Including all the Originals by Sir Arthur Conan Doyle and all those other books written in the same spirit by other writers.",
"category_id": 8,
"search": 1,
"invite": 1,
"approval": 0,
"photo_id": 0,
"creation_date": "2014-01-23 06:25:09",
"modified_date": "2015-01-25 06:46:24",
"member_count": 1,
"view_count": 780,
"location": "",
"menu": [
{
"label": "Edit Group",
"name": "edit",
"url": "groups/edit/878",
"urlParams": {}
},
{
"label": "Delete Group",
"name": "delete",
"url": "groups/delete/878",
"urlParams": {}
}
],
"image": "http://example.com/application/modules/Group/externals/images/nophoto_group_thumb_profile.png",
"image_normal": "http://example.com/application/modules/Group/externals/images/nophoto_group_thumb_normal.png",
"image_profile": "http://example.com/application/modules/Group/externals/images/nophoto_group_thumb_profile.png",
"image_icon": "http://example.com/application/modules/Group/externals/images/nophoto_group_thumb_icon.png",
"content_url": "http://example.com/group/1",
"owner_title": "M Michael",
"allow_to_view": 1
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Group Search Form ¶
Group Search FormGET/groups/search-form
Get the groups search form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "search_text",
"label": "Search Groups"
},
{
"type": "Select",
"name": "category_id",
"label": "Category",
"multiOptions": {
"1": "Animals",
"2": "Business & Finance",
"3": "Computers & Internet",
"4": "Cultures & Community",
"5": "Dating & Relationships",
"6": "Entertainment & Arts",
"7": "Family & Home",
"8": "Games",
"9": "Government & Politics",
"10": "Health & Wellness",
"11": "Hobbies & Crafts",
"12": "Music",
"13": "Recreation & Sports",
"14": "Regional",
"15": "Religion & Beliefs",
"16": "Schools & Education",
"17": "Science",
"": "All Categories"
}
},
{
"type": "Select",
"name": "order",
"label": "List By",
"multiOptions": {
"creation_date": "Recently Created",
"member_count": "Most Popular"
}
},
{
"type": "Submit",
"name": "submit",
"label": "Search"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create Group ¶
Get Group Creation FormGET/groups/create
Get the group creation form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "title",
"label": "Group Name",
"hasValidator": true
},
{
"type": "Textarea",
"name": "description",
"label": "Description",
"hasValidator": true
},
{
"type": "File",
"name": "photo",
"label": "Profile Photo"
},
{
"type": "Select",
"name": "category_id",
"label": "Category",
"multiOptions": {
"1": "Animals",
"2": "Business & Finance",
"3": "Computers & Internet",
"4": "Cultures & Community",
"5": "Dating & Relationships",
"6": "Entertainment & Arts",
"7": "Family & Home",
"8": "Games",
"9": "Government & Politics",
"10": "Health & Wellness",
"11": "Hobbies & Crafts",
"12": "Music",
"13": "Recreation & Sports",
"14": "Regional",
"15": "Religion & Beliefs",
"16": "Schools & Education",
"17": "Science"
},
"hasValidator": true
},
{
"type": "Radio",
"name": "search",
"label": "Include in search results?",
"multiOptions": {
"0": "No, hide from search results.",
"1": "Yes, include in search results."
}
},
{
"type": "Radio",
"name": "auth_invite",
"label": "Let members invite others?",
"multiOptions": {
"member": "Yes, members can invite other people.",
"officer": "No, only officers can invite other people."
},
"hasValidator": true
},
{
"type": "Radio",
"name": "approval",
"label": "Approve members?",
"description": "When people try to join this group, should they be allowed to join immediately, or should they be forced to wait for approval?",
"multiOptions": [
"New members can join immediately.",
"New members must be approved."
]
},
{
"type": "Select",
"name": "auth_view",
"label": "View Privacy",
"description": "Who may see this group?",
"multiOptions": {
"everyone": "Everyone",
"registered": "Registered Members",
"member": "All Group Members"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post on this group's wall?",
"multiOptions": {
"registered": "Registered Members",
"member": "All Group Members",
"officer": "Officers and Owner Only"
},
"value": "registered",
"hasValidator": true
},
{
"type": "Select",
"name": "auth_photo",
"label": "Photo Uploads",
"description": "Who may upload photos to this group?",
"multiOptions": {
"registered": "Registered Members",
"member": "All Group Members",
"officer": "Officers and Owner Only"
},
"value": "registered",
"hasValidator": true
},
{
"type": "Select",
"name": "auth_event",
"label": "Event Creation",
"description": "Who may create events for this group?",
"multiOptions": {
"registered": "Registered Members",
"member": "All Group Members",
"officer": "Officers and Owner Only"
},
"value": "registered",
"hasValidator": true
},
{
"type": "Submit",
"name": "submit",
"label": "Create Group"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create GroupPOST/groups/create
Create a new group by posting the group creation form.
To upload the group photo, send the file in multipart / form-data
format with the photo
API request parameters.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Harry Potter Stories | group title |
description |
yes | string | This group is for all harry potter… | group content |
category_id |
yes | integer | 5 | category id |
search |
no | boolean | 1 | make group searchable (1 ) or not (0 ) |
auth_invite |
yes | string | member | invite authorization (member and officer.) |
approval |
no | boolean | 1 | make group approved (1 ) or not (0 ) |
auth_view |
yes | string | everyone | view authorization (everyone, owner_network, etc.) |
auth_comment |
yes | string | everyone | comment authorization (everyone, owner_network, etc.) |
auth_photo |
yes | string | officer | upload photo authorization (registered, member, and officer.) |
auth_event |
yes | string | member | create event authorization (registered, member, and officer.) |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"title": "Harry Potter Stories",
"description": "This group is for all harry potter stories lovers. All the Harry Potter stories will be found here.",
"category_id": 3,
"search": 1,
"auth_invite": "member",
"approval": 1,
"auth_view": "everyone",
"auth_comment": "everyone"
"auth_photo": "officer"
"auth_event": "member"
}
200
Headers
Content-Type: application/json
Body
{
"gutterMenu": [
{
"label": "Edit Group Details",
"name": "edit",
"url": "groups/edit/2",
"urlParams": {}
},
{
"label": "Delete Group",
"name": "delete",
"url": "groups/delete/2",
"urlParams": {}
},
{
"label": "Invite Members",
"name": "invite",
"url": "groups/member/invite/2",
"urlParams": {}
},
{
"label": "Share Group",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "group",
"id": 2
}
}
],
"profile_tabs": [
{
"label": "Updates",
"name": "update",
"totalItemCount": 67
},
{
"label": "Members",
"name": "members",
"totalItemCount": 187,
"url": "groups/member/list/878",
"urlParams": {}
},
{
"label": "Photos",
"name": "photos",
"totalItemCount": 45,
"url": "groups/photo/list",
"urlParams": {
"group_id": 878
}
}
],
"response": {
"group_id": 878,
"user_id": 89,
"title": "Harry Potter Stories",
"description": "This group is for all harry potter stories lovers. All the Harry Potter stories will be found here.",
"category_id": 3,
"search": 1,
"invite": 1,
"approval": 0,
"photo_id": 281,
"creation_date": "2014-11-19 10:01:14",
"modified_date": "2015-11-19 10:01:15",
"member_count": 187,
"view_count": 189,
"location": "",
"image": "http://example.com/public/group/15/0015_282c.jpg?c=ec9c",
"image_normal": "http://example.com/public/group/17/0017_cbc3.jpg?c=fad6",
"image_profile": "http://example.com/public/group/16/0016_7c5e.jpg?c=f251",
"image_icon": "http://example.com/public/group/18/0018_9c9a.jpg?c=0043",
"content_url": "http://example.com/group/1",
"owner_title": "M Michael",
"staff": [
"Owner (It's my Title)"
],
"category_title": "Schools & Education"
}
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"description": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Group Profile ¶
Group ProfileGET/groups/view
Get a group post and its gutter menu’s (edit, delete, invite, share, report) and profile tab’s (update, members, photos) with count information.
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
- gutter_menu (optional, boolean, `gutter_menu
string
(required) Default: 1 OR 0`)get gutter menu’s array. Default valus is 1.
- profile_tabs (optional, boolean, `profile_tabs
string
(required) Default: 1 OR 0`)get profile tab’s array. Default valus is 1.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"gutterMenu": [
{
"label": "Edit Group Details",
"name": "edit",
"url": "groups/edit/2",
"urlParams": {}
},
{
"label": "Delete Group",
"name": "delete",
"url": "groups/delete/2",
"urlParams": {}
},
{
"label": "Invite Members",
"name": "invite",
"url": "groups/member/invite/2",
"urlParams": {}
},
{
"label": "Share Group",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "group",
"id": 2
}
}
],
"profile_tabs": [
{
"label": "Updates",
"name": "update",
"totalItemCount": 67
},
{
"label": "Members",
"name": "members",
"totalItemCount": 187,
"url": "groups/member/list/878",
"urlParams": {}
},
{
"label": "Photos",
"name": "photos",
"totalItemCount": 45,
"url": "groups/photo/list",
"urlParams": {
"group_id": 878
}
}
],
"response": {
"group_id": 878,
"user_id": 89,
"title": "Sherlock Holmes",
"description": "Including all the Originals by Sir Arthur Conan Doyle and all those other books written in the same spirit by other writers.",
"category_id": 16,
"search": 1,
"invite": 1,
"approval": 0,
"photo_id": 281,
"creation_date": "2014-11-19 10:01:14",
"modified_date": "2015-11-19 10:01:15",
"member_count": 187,
"view_count": 189,
"location": "",
"image": "http://example.com/public/group/15/0015_282c.jpg?c=ec9c",
"image_normal": "http://example.com/public/group/17/0017_cbc3.jpg?c=fad6",
"image_profile": "http://example.com/public/group/16/0016_7c5e.jpg?c=f251",
"image_icon": "http://example.com/public/group/18/0018_9c9a.jpg?c=0043",
"content_url": "http://example.com/group/1",
"owner_title": "M Michael",
"staff": [
"Owner (It's my Title)"
],
"category_title": "Schools & Education"
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Edit Group ¶
Get Edit Group FormGET/groups/edit
Get the form for editing a group-post.
Returns the form
and formValues
as response. In form
we get the complete group form and in formValues
we get the form’s values.
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Accept: application/json
Body
{
"form": [
{
"type": "Text",
"name": "title",
"label": "Group Name",
"hasValidator": true
},
{
"type": "Textarea",
"name": "description",
"label": "Description",
"hasValidator": true
},
{
"type": "Select",
"name": "category_id",
"label": "Category",
"multiOptions": {
"1": "Animals",
"2": "Business & Finance",
"3": "Computers & Internet",
"4": "Cultures & Community",
"5": "Dating & Relationships",
"6": "Entertainment & Arts",
"7": "Family & Home",
"8": "Games",
"9": "Government & Politics",
"10": "Health & Wellness",
"11": "Hobbies & Crafts",
"12": "Music",
"13": "Recreation & Sports",
"14": "Regional",
"15": "Religion & Beliefs",
"16": "Schools & Education",
"17": "Science"
},
"hasValidator": true
},
{
"type": "Radio",
"name": "search",
"label": "Include in search results?",
"multiOptions": {
"0": "No, hide from search results.",
"1": "Yes, include in search results."
}
},
{
"type": "Radio",
"name": "auth_invite",
"label": "Let members invite others?",
"multiOptions": {
"member": "Yes, members can invite other people.",
"officer": "No, only officers can invite other people."
},
"hasValidator": true
},
{
"type": "Radio",
"name": "approval",
"label": "Approve members?",
"description": "When people try to join this group, should they be allowed to join immediately, or should they be forced to wait for approval?",
"multiOptions": [
"New members can join immediately.",
"New members must be approved."
]
},
{
"type": "Select",
"name": "auth_view",
"label": "View Privacy",
"description": "Who may see this group?",
"multiOptions": {
"everyone": "Everyone",
"registered": "Registered Members",
"member": "All Group Members"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post on this group's wall?",
"multiOptions": {
"registered": "Registered Members",
"member": "All Group Members",
"officer": "Officers and Owner Only"
},
"value": "registered",
"hasValidator": true
},
{
"type": "Select",
"name": "auth_photo",
"label": "Photo Uploads",
"description": "Who may upload photos to this group?",
"multiOptions": {
"registered": "Registered Members",
"member": "All Group Members",
"officer": "Officers and Owner Only"
},
"value": "registered",
"hasValidator": true
},
{
"type": "Select",
"name": "auth_event",
"label": "Event Creation",
"description": "Who may create events for this group?",
"multiOptions": {
"registered": "Registered Members",
"member": "All Group Members",
"officer": "Officers and Owner Only"
},
"value": "registered",
"hasValidator": true
},
{
"type": "Submit",
"name": "submit",
"label": "Edit Group"
}
],
"formValues": {
"group_id": 878,
"user_id": 89,
"title": "Sherlock Holmes",
"description": "Including all the Originals by Sir Arthur Conan Doyle and all those other books written in the same spirit by other writers.",
"category_id": 2,
"search": 1,
"invite": 1,
"approval": 0,
"photo_id": 279,
"creation_date": "2014-01-29 05:03:50",
"modified_date": "2015-02-10 07:46:55",
"member_count": 178,
"view_count": 274,
"location": "",
"auth_view": "everyone",
"auth_comment": "everyone",
"auth_invite": "member",
"auth_photo": "officer",
"auth_event": "officer"
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Edit GroupPUT/groups/edit
Edit a group-post.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Harry Potter Stories | group title |
description |
yes | string | This group is for all harry potter… | group content |
category_id |
yes | integer | 5 | category id |
search |
no | boolean | 1 | make group searchable (1 ) or not (0 ) |
auth_invite |
yes | string | member | invite authorization (member and officer.) |
approval |
no | boolean | 1 | make group approved (1 ) or not (0 ) |
auth_view |
yes | string | everyone | view authorization (everyone, owner_network, etc.) |
auth_comment |
yes | string | everyone | comment authorization (everyone, owner_network, etc.) |
auth_photo |
yes | string | officer | upload photo authorization (registered, member, and officer.) |
auth_event |
yes | string | member | create event authorization (registered, member, and officer.) |
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"title": "Harry Potter Stories",
"description": "This group is for all harry potter stories lovers. All the Harry Potter stories will be found here.",
"category_id": 3,
"search": 1,
"auth_invite": "member",
"approval": 1,
"auth_view": "everyone",
"auth_comment": "everyone"
"auth_photo": "officer"
"auth_event": "member"
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"description": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Group ¶
Delete GroupDELETE/groups/delete
Delete a group-post.
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Groups Plugin / Members ¶
These are the APIs for SocialEngine’s official Groups Plugin.
Members List ¶
Members ListGET/groups/member/list/{?search}
Get the group member listings. Group members also be browsed and searched based on keywords, waiting, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of members in response and use page
for the page number. [i.e: If you have 100 members and the first request has limit=20
and page=1
, then in that case the recent 20 members will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent members will be returned.]
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
- search
string
(optional) Example: search=michalget group members that contain this keyword in name.
- waiting
integer
(optional) Example: waiting=1get group member listings in order of membership not approved by group owner(waiting=1) or membership approved by group owner(waiting=0). Default value is 0.
- menu
boolean
(optional) Example: menu=1get member menu’s array. Default valus is 1.
- page
integer
(optional) Example: page=2return the ‘limit’ number of members of that page of member listings.
- limit
integer
(optional) Example: limit=20number of members. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"getWaitingItemCount": 7,
"members": [
{
"user_id": 189,
"username": "michael",
"displayname": "M Michael",
"photo_id": 0,
"status": "enabled",
"status_date": "2014-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2010-11-11 06:00:28",
"modified_date": "2015-06-16 10:43:28",
"lastlogin_date": "2015-06-17 05:26:45",
"update_date": null,
"member_count": 178,
"view_count": 1689,
"location": "",
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal",
"menu": null,
"staff": "editors"
}
],
"waiting": false,
"getTotalItemCount": 54,
"canEdit": 1
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Invite Members ¶
Get Members Invite FormGET/groups/member/invite
Get the member invite form.
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type":"Checkbox",
"name":"selectall",
"label":"Choose All Friends"
},
{
"type":"Multicheckbox",
"name":"users",
"label":"Members",
"multiOptions":{
"34":"Ronald Desuza"
"89":"M Michael"
"263":"James Robert"
}
},
{
"type":"Submit",
"name":"submit",
"label":"Send Invites"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Invite MembersPOST/groups/member/invite
Invite a friends to join the group by posting the invite members form.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
users |
yes | string | 123,54,235 | comma-separated IDs of friends. |
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"users": "123,54,235"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Accept Member Request ¶
Accept Member RequestPOST/groups/member/accept
Accept a member request.
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Ignore Member Request ¶
Ignore Member RequestPOST/groups/member/ignore
Ignore a member request.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 78 | member id |
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Leave Group ¶
Leave GroupPOST/groups/member/leave
Leave a group.
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Join Group ¶
Join GroupPOST/groups/member/join
Join a group.
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Group Membership Request ¶
Group Membership RequestPOST/groups/member/request
Request for the membership in group.
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Approve Membership Request ¶
Approve Membership RequestPOST/groups/member/approve
Approve a group membership request.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 78 | member id |
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Cancel Membership Request ¶
Cancel Membership RequestPOST/groups/member/request-cancel
Cancel a membership request.
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Remove Member ¶
Remove MemberPOST/groups/member/remove
Remove member from the group membership.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 78 | member id |
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit Member Staff ¶
Edit Member StaffPUT/groups/member/edit
Edit a group member staff.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 78 | member id |
title |
no | string | Owners | staff title. Default title is empty. |
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Promote Group Member ¶
Promote Group MemberPOST/groups/member/promote
Promote a group member.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 78 | member id |
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Demote Group Member ¶
Demote Group MemberPOST/groups/member/demote
Demote a group member.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 78 | member id |
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 878`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Groups Plugin / Photos ¶
These are the APIs for SocialEngine’s official Groups Plugin.
Photos List ¶
Get Photos ListGET/groups/photo/list/{?menu}
Get the group photos listings.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of photos in response and use page
for the page number. [i.e: If you have 100 photos and the first request has limit=20
and page=1
, then in that case the recent 20 photos will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent photos will be returned.]
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 58`)group id
- menu
integer
(optional) Example: menu=0get photo menu’s array. Default valus is 1.
- page
integer
(optional) Example: page=2return the ‘limit’ number of photos of that page of photo listings.
- limit
integer
(optional) Example: limit=20number of photos. Default limit is 10.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canUpload": 1,
"totalItemCount": 17,
"images": [
{
"photo_id": 153,
"album_id": 95,
"group_id": 58,
"user_id": 198,
"title": "",
"description": "",
"collection_id": 53,
"file_id": 29,
"creation_date": "2015-01-29 05:03:50",
"modified_date": "2015-01-30 06:50:04",
"view_count": 0,
"comment_count": 0,
"image": "http://example.com/public/group/1d/001d_9348.jpg",
"image_normal": "http://example.com/public/group/1f/001f_fa0f.jpg",
"image_profile": "http://example.com/public/group/1e/001e_b286.jpg",
"image_icon": "http://example.com/public/group/20/0020_cc70.jpg",
"content_url": "http://example.com/groups/photo/view/group_id/1/photo_id/3",
"user_title": "Zahid Khurshid",
"likes_count": 0,
"is_like": 0,
"menu": [
{
"label": "Edit",
"name": "edit",
"url": "groups/photo/edit/153",
"urlParams": {}
},
{
"label": "Delete",
"name": "delete",
"url": "groups/photo/delete/153",
"urlParams": {}
},
{
"label": "Share",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "group_photo",
"id": 153
}
},
{
"label": "Report",
"name": "report",
"url": "report/create/subject/group_photo_3",
"urlParams": {
"type": "group_photo",
"id": 153
}
},
{
"label": "Make Profile Photo",
"name": "make_profile_photo",
"url": "members/edit/external-photo",
"urlParams": {
"photo": "group_photo_153"
}
}
]
},
{
"photo_id": 354,
"album_id": 185,
"group_id": 58,
"user_id": 51,
"title": "",
"description": "",
"collection_id": 53,
"file_id": 37,
"creation_date": "2015-01-30 06:32:22",
"modified_date": "2015-01-30 06:32:23",
"view_count": 0,
"comment_count": 0,
"image": "http://example.com/public/group_photo/25/0025_3456.jpg",
"image_normal": "http://example.com/public/group_photo/26/0026_16a2.jpg",
"image_profile": "http://example.com/public/group_photo/25/0025_3456.jpg",
"image_icon": "http://example.com/public/group_photo/25/0025_3456.jpg",
"content_url": "http://example.com/groups/photo/view/group_id/1/photo_id/3",
"user_title": "M Michael",
"likes_count": 0,
"is_like": 0,
"menu": [
{
"label": "Edit",
"name": "edit",
"url": "groups/photo/edit/354",
"urlParams": {}
},
{
"label": "Delete",
"name": "delete",
"url": "groups/photo/delete/354",
"urlParams": {}
},
{
"label": "Share",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "group_photo",
"id": 354
}
},
{
"label": "Report",
"name": "report",
"url": "report/create/subject/group_photo_3",
"urlParams": {
"type": "group_photo",
"id": 354
}
},
{
"label": "Make Profile Photo",
"name": "make_profile_photo",
"url": "members/edit/external-photo",
"urlParams": {
"photo": "group_photo_354"
}
}
]
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Upload PhotosPOST/groups/photo/list
Upload the group photos.
To upload the group photos, send the files as an array of multipart / form-data
elements with the photo
API request parameters.
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 58`)group id
- page
integer
(optional) Example: page=2use page to get next limit of photos
- limit
integer
(optional) Example: limit=20number of photos. Default limit is 10
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Photo View ¶
Photo ViewGET/groups/photo/view/{?menu}
Get a group photo and its gutter menu’s (edit, delete, share, etc.) information.
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 947`)photo id
- menu
integer
(optional) Example: menu=0get photo menu’s array. Default valus is 1.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"photo_id": 947,
"album_id": 65,
"group_id": 57,
"user_id": 156,
"title": "",
"description": "",
"collection_id": 5,
"file_id": 41,
"creation_date": "2015-01-30 06:32:24",
"modified_date": "2015-01-30 06:32:24",
"view_count": 650,
"comment_count": 48,
"image": "http://example.com/public/group_photo/29/0029_81c7.jpg",
"image_normal": "http://example.com/public/group_photo/2a/002a_c14b.jpg",
"image_profile": "http://example.com/public/group_photo/29/0029_81c7.jpg",
"image_icon": "http://example.com/public/group_photo/29/0029_81c7.jpg",
"content_url": "http://example.com/groups/photo/view/group_id/1/photo_id/3",
"menu": [
{
"label": "Edit",
"name": "edit",
"url": "groups/photo/edit/947",
"urlParams": {}
},
{
"label": "Delete",
"name": "delete",
"url": "groups/photo/delete/947",
"urlParams": {}
},
{
"label": "Share",
"name": "share",
"url": "activity/index/share",
"urlParams": {
"type": "group_photo",
"id": 947
}
},
{
"label": "Report",
"name": "report",
"url": "report/create/subject/group_photo_947"
},
{
"label": "Make Profile Photo",
"name": "make_profile_photo",
"url": "members/edit/external-photo",
"urlParams": {
"photo": "group_photo_947"
}
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit Photo Title & Description ¶
Get FormGET/groups/photo/edit
Get edit form.
Returns the form
and formValues
as response. In form
we get the complete group photo form and in formValues
we get the form’s values.
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 523`)photo id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Accept: application/json
Body
{
"form": [
{
"type": "Text",
"name": "title",
"label": "Title",
"hasValidator": true
},
{
"type": "Textarea",
"name": "description",
"label": "Description",
"hasValidator": true
},
{
"type": "Submit",
"name": "submit",
"label": "Edit Photo"
}
],
"formValues": {
"photo_id": 523,
"album_id": 157,
"group_id": 87,
"user_id": 167,
"title": "",
"description": "",
"collection_id": 5,
"file_id": 41,
"creation_date": "2015-01-30 06:32:24",
"modified_date": "2015-01-30 06:32:24",
"view_count": 90,
"comment_count": 20
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit FormPUT/groups/photo/edit
Edit a group photo title and description-post.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Harry Potter Series-1 Photo | photo title |
description |
yes | string | This photo is from harry potter first… | photo description |
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 523`)photo id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"title": "Harry Potter Series-1 Photo",
"description": "This photo is from harry potter first series."
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"description": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Photo ¶
Delete PhotoDELETE/groups/photo/delete
Delete a group-photo.
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 873`)photo id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"photo_id": 873,
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Groups Plugin / Discussions ¶
These are the APIs for SocialEngine’s official Groups Plugin.
Discussions List ¶
Discussions ListGET/groups/topic/index/group_id/{?page}
Get the group discussion listings.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of topics in response and use page
for the page number. [i.e: If you have 100 topics and the first request has limit=20
and page=1
, then in that case the recent 20 topics will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent topics will be returned.]
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 58`)group id
- page
integer
(optional) Example: page=2return the ‘limit’ number of discussions of that page of discussion listings.
- limit
integer
(optional) Example: limit=20number of discussions. Default limit is 10.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canPost": 0,
"getTotalItemCount": 56,
"response": [
{
"topic_id": 76,
"group_id": 58,
"user_id": 1,
"title": "New Video Release",
"creation_date": "2015-06-16 08:53:38",
"modified_date": "2015-06-16 08:53:38",
"sticky": 0,
"closed": 0,
"post_count": 1,
"view_count": 1,
"lastpost_id": 11,
"lastposter_id": 1
},
{
"topic_id": 85,
"group_id": 58,
"user_id": 1,
"title": "WHAT IF HARRY POTTER NEVER EXISTED?",
"creation_date": "2015-06-16 08:53:20",
"modified_date": "2015-06-16 08:53:20",
"sticky": 0,
"closed": 0,
"post_count": 1,
"view_count": 0,
"lastpost_id": 10,
"lastposter_id": 1
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create Discussion ¶
Get Discussion Create FormGET/groups/topic/create/group_id
Get the group discussion creation form.
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 58`)group id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "title",
"label": "Title"
},
{
"type": "Textarea",
"name": "body",
"label": "Body"
},
{
"type": "Checkbox",
"name": "watch",
"label": "Send me notifications when other members reply to this topic."
},
{
"type": "Submit",
"name": "submit",
"label": "Post Reply"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create DiscussionPOST/groups/topic/create/group_id
Create a new group discussion by posting the group discussion creation form.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
no | string | Anthony Horowitz’s Official Sherlock Holmes Novel | group discussion title |
body |
no | string | Seems like this is going to be a good year for us book lovers… | group discussion body |
watch |
no | boolean | 1 | send me notifications when other members reply in this topic(watch=1) or no notification(watch=0) |
Example URI
- group_id (required, integer, `group_id
string
(required) Default: 58`)group id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"title": "Anthony Horowitz’s Official Sherlock Holmes Novel",
"body": "Seems like this is going to be a good year for us book lovers, as the Conan Doyle Estate has commissioned author Anthony Horowitz, known for his Alex Rider novels, to write a new Sherlock Holmes novel.",
"watch": 1
}
201
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Discussion Profile ¶
Discussion ProfileGET/groups/topic/view/topic_id
Get a group discussion post’s and its gutter menu’s (stop watching topic, make sticky, close, delete, etc.)
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
- gutter_menu (optional, boolean, `gutter_menu
string
(required) Default: 1 OR 0`)get gutter menu’s array. Default value is 1.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canPost": 1,
"gutterMenu": [
{
"label": "Stop Watching Topic",
"name": "stop_watch_topic",
"url": "groups/topic/watch/topic_id/23/watch/0",
"urlParams": {}
},
{
"label": "Make Sticky",
"name": "make_sticky",
"url": "groups/topic/sticky/topic_id/23/sticky/1",
"urlParams": {}
},
{
"label": "Close",
"name": "close",
"url": "groups/topic/close/topic_id/23/closed/1",
"urlParams": {}
},
{
"label": "Rename",
"name": "rename",
"url": "groups/topic/rename/topic_id/23",
"urlParams": {}
}
],
"totalItemCount": 1,
"response": [
{
"post_id": 18,
"topic_id": 23,
"group_id": 58,
"user_id": 189,
"body": "Seems like this is going to be a good year for us book lovers, as the Conan Doyle Estate has commissioned author Anthony Horowitz, known for his Alex Rider novels, to write a new Sherlock Holmes novel.",
"creation_date": "2015-06-16 08:53:38",
"modified_date": "2015-06-16 08:53:38",
"posted_by": {
"user_id": 189,
"username": "michael",
"displayname": "M Michael",
"photo_id": 0,
"status": "enabled",
"status_date": "2014-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2010-11-11 06:00:28",
"modified_date": "2015-06-16 10:43:28",
"lastlogin_date": "2015-06-17 05:26:45",
"update_date": null,
"member_count": 178,
"view_count": 1689,
"location": "",
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal",
"menu": null,
"staff": "editors"
},
"menu": [
{
"label": "Edit",
"name": "edit",
"url": "groups/post/edit",
"urlParams": {
"post_id": 11
}
},
{
"label": "Delete",
"name": "delete",
"url": "groups/post/delete",
"urlParams": {
"post_id": 11
}
}
]
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Post Discussion Reply ¶
Get Discussion Reply FormGET/groups/topic/post/topic_id
Get the discussion reply form.
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Textarea",
"name": "body",
"label": "Body"
},
{
"type": "Checkbox",
"name": "watch",
"label": "Send me notifications when other members reply to this topic."
},
{
"type": "Submit",
"name": "submit",
"label": "Post Reply"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Post Discussion ReplyPOST/groups/topic/post/topic_id
Post a reply in discussion.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
body |
no | string | I’m reading this book now and I must say… | post body |
watch |
no | boolean | 1 | send me notification or not |
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"body": "I'm reading this book now and I must say, Horowitz does a great job of capturing Doyle's "voice" in this one. A real good read so far...... ",
"watch": 1
}
201
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Make Sticky / Remove Sticky ¶
Make Sticky / Remove StickyPOST/groups/topic/sticky/topic_id/sticky/{sticky}
Make discussion sticky or remove sticky.
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
- sticky
boolean
(required) Example: sticky=1make discussion sticky (
1
) or not (0
)
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Open / Close ¶
Open / ClosePOST/groups/topic/close/topic_id/closed/{closed}
Make discussion open or close.
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
- closed
boolean
(required) Example: closed=1make discussion close (
1
) or open (0
)
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Rename Discussion ¶
Get Discussion Rename FormGET/groups/topic/rename/topic_id
Get the discussion rename form
Returns the form
and formValues
as response. In form
we get the complete rename topic form and in formValues
we get the form’s values.
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Accept: application/json
Body
{
"form": [
{
"type": "Text",
"name": "title",
"label": "Title"
},
{
"type": "Submit",
"name": "submit",
"label": "Rename Topic"
}
],
"formValues": {
"title": "Anthony Horowitz’s Official Sherlock Holmes Novel"
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Rename DiscussionPUT/groups/topic/rename/topic_id
Rename a discussion-post.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
no | string | Oxford Dictionary of Biology 6th Edition | new discussion title |
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"title": "Oxford Dictionary of Biology 6th Edition"
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: title"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Watch Topic / Stop Watching Topic ¶
Watch Topic / Stop Watching TopicPOST/groups/topic/watch/topic_id/watch/{watch}
Watch topic or stop watching topic.
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
- watch
boolean
(required) Example: watch=1watch topic (
1
) or not (0
)
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Delete Discussion ¶
Delete DiscussionDELETE/groups/topic/delete/topic_id
Delete a discussion.
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Events Plugin ¶
These are the APIs for SocialEngine’s official Events Plugin.
Browse Events ¶
Browse EventsGET/events{?search_text}
Get the events listing. Events can also be browsed and searched based on keywords, categories, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of events in response and use page
for the page number. [i.e: If you have 100 events and the first request has limit=20
and page=1
, then in that case the recent 20 events will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent events will be returned.]
Example URI
- search_text
string
(optional) Example: search=teacherget events that contain this keyword in title or description.
- category_id (optional, integer, `category_id
string
(required) Default: 13`)get all events of a particular category ID.
- order
string
(optional) Example: order=starttime ASCget event listings in the order of start time (
order=starttime ASC
) or recent created (order=creation_date DESC
) or most popular (order=member_count DESC
).- user_id (optional, integer, `user_id
string
(required) Default: 125`)user id of profile owner. Default value is logged-in user’s ID.
- page
integer
(optional) Example: page=2return the ‘limit’ number of events of that page of event listings.
- limit
integer
(optional) Example: limit=20number of events. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canCreate": 0,
"getTotalItemCount": 5,
"response": [
{
"event_id": 92,
"title": "Educational Trip to Florida",
"description": "Through this educational travel program, high school students may work to earn up to three college credits through a prestigious partner university.",
"user_id": 89,
"parent_type": "user",
"parent_id": 1,
"search": 1,
"creation_date": "2014-06-08 11:56:14",
"modified_date": "2015-06-08 11:56:14",
"starttime": "2014-10-17 20:00:00",
"endtime": "2015-06-24 20:00:00",
"host": "",
"location": "florida",
"view_count": 892,
"member_count": 17,
"approval": 1,
"invite": 0,
"photo_id": 0,
"category_id": 0,
"owner_image": null,
"owner_title": "Emma Wise",
"image": "http://example.com/application/modules/Event/externals/images/nophoto_event_thumb_profile.png",
"image_normal": "http://example.com/application/modules/Event/externals/images/nophoto_event_thumb_normal.png",
"image_profile": "http://example.com/application/modules/Event/externals/images/nophoto_event_thumb_profile.png",
"image_icon": "http://example.com/application/modules/Event/externals/images/nophoto_event_thumb_icon.png",
"content_url": "http://example.com/event/1",
"allow_to_view": 1,
"edit": 0,
"delete": 0
},
{
"event_id": 102,
"title": "Blood Donation Camp",
"description": "Donated blood is a lifeline for many people needing long-term treatments, not just in emergencies. Your blood's main components: red cells, plasma and platelets are vital for many different uses. ",
"user_id": 78,
"parent_type": "group",
"parent_id": 2,
"search": 1,
"creation_date": "2015-06-12 12:38:01",
"modified_date": "2015-06-12 12:38:01",
"starttime": "2015-06-19 20:00:00",
"endtime": "2015-06-29 20:00:00",
"host": "",
"location": "",
"view_count": 0,
"member_count": 1,
"approval": 0,
"invite": 0,
"photo_id": 0,
"category_id": 0,
"owner_image": null,
"owner_title": "Alex Uyerr",
"image": "http://example.com/application/modules/Event/externals/images/nophoto_event_thumb_profile.png",
"image_normal": "http://example.com/application/modules/Event/externals/images/nophoto_event_thumb_normal.png",
"image_profile": "http://example.com/application/modules/Event/externals/images/nophoto_event_thumb_profile.png",
"image_icon": "http://example.com/application/modules/Event/externals/images/nophoto_event_thumb_icon.png",
"content_url": "http://example.com/event/1",
"allow_to_view": 1,
"edit": 0,
"delete": 0
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
My Events ¶
My EventsGET/events/manage{?search_text}
Get the events of a member. Events can also be browsed and searched based on keywords, categories, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of events in response and use page
for the page number. [i.e: If you have 100 events and the first request has limit=20
and page=1
, then in that case the recent 20 events will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent events will be returned.]
Example URI
- search_text
string
(optional) Example: search=teacherget events that contain this keyword in title or description.
- category_id (optional, integer, `category_id
string
(required) Default: 13`)get all events of a particular category ID.
- order
string
(optional) Example: order=starttime ASCget event listings in the order of start time (
order=starttime ASC
) or recent created (order=creation_date DESC
) or most popular (order=member_count DESC
).- page
integer
(optional) Example: page=2return the ‘limit’ number of events of that page of event listings.
- limit
integer
(optional) Example: limit=20number of events. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"getTotalItemCount": 2,
"canCreate": 1,
"response": [
{
"event_id": 167,
"title": "Blood Donation Camp",
"description": "Donated blood is a lifeline for many people needing long-term treatments, not just in emergencies. Your blood's main components: red cells, plasma and platelets are vital for many different uses.",
"user_id": 78,
"parent_type": "group",
"parent_id": 2,
"search": 1,
"creation_date": "2015-01-23 06:07:49",
"modified_date": "2015-06-18 06:50:34",
"starttime": "2015-01-01 09:00:00",
"endtime": "2015-02-19 09:00:00",
"host": "",
"location": "",
"view_count": 0,
"member_count": 1,
"approval": 0,
"invite": 0,
"photo_id": 267,
"category_id": 0,
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Alex Uyerr",
"image": "http://example.com/public/event/0c/01/010b_b3aa.png?c=e67c",
"image_normal": "http://example.com/public/event/0e/01/010d_f886.png?c=6b07",
"image_profile": "http://example.com/public/event/0d/01/010c_2347.png?c=2b4d",
"image_icon": "http://example.com/public/event/0f/01/010e_af41.png?c=6fb3",
"content_url": "http://example.com/event/1",
"allow_to_view": 1,
"edit": 1,
"delete": 1,
"menu": [
{
"label": "Edit Event",
"name": "edit",
"url": "events/edit/167",
"urlParams": {}
},
{
"label": "Delete Event",
"name": "delete_event",
"url": "events/delete/167",
"urlParams": {}
}
]
},
{
"event_id": 172,
"title": "Moda Manhattan",
"description": "Moda Manhattan is one of the finest ready to wear garments sector trade shows in the United States. The show serves as a viable business interaction platform for eminent apparel designers, stylists and other top level professional experts to exchange.",
"user_id": 78,
"parent_type": "group",
"parent_id": 7,
"search": 1,
"creation_date": "2015-01-29 13:23:04",
"modified_date": "2015-06-18 06:50:44",
"starttime": "2015-01-16 09:00:00",
"endtime": "2015-01-30 09:00:00",
"host": "",
"location": "",
"view_count": 0,
"member_count": 1,
"approval": 0,
"invite": 0,
"photo_id": 271,
"category_id": 0,
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Alex Uyerr",
"image": "http://example.com/public/event/10/01/010f_d72b.png?c=4130",
"image_normal": "http://example.com/public/event/12/01/0111_43e7.png?c=94ee",
"image_profile": "http://example.com/public/event/11/01/0110_0c8c.png?c=5b1c",
"image_icon": "http://example.com/public/event/13/01/0112_657c.png?c=4d65",
"content_url": "http://example.com/event/1",
"allow_to_view": 1,
"edit": 1,
"delete": 1,
"menu": [
{
"label": "Edit Event",
"name": "edit",
"url": "events/edit/172",
"urlParams": {}
},
{
"label": "Delete Event",
"name": "delete_event",
"url": "events/delete/172",
"urlParams": {}
}
]
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Event Search Form ¶
Event Search FormGET/events/search-form
Get the events search form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "search_text",
"label": "Search Events"
},
{
"type": "Select",
"name": "category_id",
"label": "Category",
"multiOptions": {
"0": "All Categories",
"1": "Arts",
"2": "Business",
"3": "Conferences",
"4": "Festivals",
"5": "Food",
"6": "Fundraisers",
"7": "Galleries",
"8": "Health",
"9": "Just For Fun",
"10": "Kids",
"11": "Learning",
"12": "Literary",
"13": "Movies",
"14": "Museums",
"15": "Neighborhood",
"16": "Networking",
"17": "Nightlife",
"18": "On Campus",
"19": "Organizations",
"20": "Outdoors",
"21": "Pets",
"22": "Politics",
"23": "Sales",
"24": "Science",
"25": "Spirituality",
"26": "Sports",
"27": "Technology",
"28": "Theatre",
"29": "Other"
}
},
{
"type": "Select",
"name": "order",
"label": "List By",
"multiOptions": {
"starttime ASC": "Start Time",
"creation_date DESC": "Recently Created",
"member_count DESC": "Most Popular"
}
},
{
"type": "Submit",
"name": "submit",
"label": "Search"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create Event ¶
Get Event Creation FormGET/events/create
Get the event creation form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "title",
"label": "Event Name",
"hasValidator": true
},
{
"type": "Textarea",
"name": "description",
"label": "Event Description",
"hasValidator": true
},
{
"type": "Date",
"name": "starttime",
"label": "Start Time",
"hasValidator": true
},
{
"type": "Date",
"name": "endtime",
"label": "End Time",
"hasValidator": true
},
{
"type": "Text",
"name": "host",
"label": "Host"
},
{
"type": "Text",
"name": "location",
"label": "Location"
},
{
"type": "File",
"name": "photo",
"label": "Main Photo"
},
{
"type": "Select",
"name": "category_id",
"label": "Event Category",
"multiOptions": {
"0": "",
"1": "Arts",
"2": "Business",
"3": "Conferences",
"4": "Festivals",
"5": "Food",
"6": "Fundraisers",
"7": "Galleries",
"8": "Health",
"9": "Just For Fun",
"10": "Kids",
"11": "Learning",
"12": "Literary",
"13": "Movies",
"14": "Museums",
"15": "Neighborhood",
"16": "Networking",
"17": "Nightlife",
"18": "On Campus",
"19": "Organizations",
"20": "Outdoors",
"21": "Pets",
"22": "Politics",
"23": "Sales",
"24": "Science",
"25": "Spirituality",
"26": "Sports",
"27": "Technology",
"28": "Theatre",
"29": "Other"
},
"hasValidator": true
},
{
"type": "Checkbox",
"name": "search",
"label": "People can search for this event",
"value": true
},
{
"type": "Checkbox",
"name": "approval",
"label": "People must be invited to RSVP for this event"
},
{
"type": "Checkbox",
"name": "auth_invite",
"label": "Invited guests can invite other people as well",
"value": true
},
{
"type": "Select",
"name": "auth_view",
"label": "Privacy",
"description": "Who may see this event?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"member": "Event Guests Only",
"owner": "Just Me"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post comments on this event?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"member": "Event Guests Only",
"owner": "Just Me"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "Select",
"name": "auth_photo",
"label": "Photo Uploads",
"description": "Who may upload photos to this event?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"member": "Event Guests Only",
"owner": "Just Me"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "Submit",
"name": "submit",
"label": "Post Entry"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create EventPOST/events/create
Create a new event by posting the event creation form.
To upload the event photo, send the file in multipart / form-data
format with the photo
API request parameters.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Blood Donation Camp | event title |
description |
yes | string | Donated blood is a lifeline for many people needing… | event content |
starttime |
yes | string | 2015-06-12 12:42:45 | event start time |
endtime |
yes | string | 2015-10-12 12:42:45 | event end time |
host |
no | string | SS Group | hosted by |
location |
no | string | California | event location |
category_id |
yes | integer | 5 | category id |
search |
no | boolean | 1 | make event searchable (1 ) or not (0 ) |
approval |
no | boolean | 1 | make event approved (1 ) or not (0 ) |
auth_invite |
no | boolean | member | invite authorization (owner, owner_member, owner_network, etc.) |
auth_view |
yes | string | everyone | view authorization (owner, owner_member, owner_network, etc.) |
auth_comment |
yes | string | everyone | comment authorization (owner, owner_member, owner_network, etc.) |
auth_photo |
yes | string | officer | upload photo authorization (owner, owner_member, owner_network, etc.) |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"title": "Blood Donation Camp",
"description": "Donated blood is a lifeline for many people needing long-term treatments, not just in emergencies. Your blood's main components: red cells, plasma and platelets are vital for many different uses. ",
"starttime": "2015-06-12 12:42:45",
"endtime": "2015-10-12 12:42:45",
"category_id": 3,
"search": 1,
"auth_invite": 1,
"auth_view": "everyone",
"auth_comment": "everyone"
"auth_photo": "everyone"
}
200
Headers
Content-Type: application/json
Body
{
"gutterMenu": [
{
"label": "Edit Event Details",
"name": "edit",
"url": "events/edit/129",
"urlParams": {}
},
{
"label": "Invite Guests",
"name": "invite",
"url": "events/member/invite/129",
"urlParams": {}
},
{
"label": "Share This Event",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "event",
"id": 129
}
},
{
"label": "Delete Event",
"name": "delete",
"url": "events/delete/129",
"urlParams": {}
}
],
"profile_tabs": [
{
"label": "Updates",
"name": "update",
"totalItemCount": 0
},
{
"label": "Guests",
"name": "members",
"totalItemCount": 1,
"url": "events/member/list/129",
"urlParams": {}
},
{
"label": "Photos",
"name": "photos",
"totalItemCount": 1,
"url": "events/photo/list",
"urlParams": {
"event_id": 129
}
}
],
"profile_rsvp_form": [
{
"type": "Radio",
"name": "rsvp",
"multiOptions": {
"0": "Not Attending",
"1": "Maybe Attending",
"2": "Attending"
}
},
{
"type": "Submit",
"name": "submit",
"label": "Send Invites"
}
],
"profile_rsvp_value": 2,
"response": {
"event_id": 129,
"title": "Blood Donation Camp",
"description": "Donated blood is a lifeline for many people needing long-term treatments, not just in emergencies. Your blood's main components: red cells, plasma and platelets are vital for many different uses. ",
"user_id": 61,
"parent_type": "group",
"parent_id": 2,
"search": 1,
"creation_date": "2015-01-23 06:07:49",
"modified_date": "2015-06-18 06:50:34",
"starttime": "2015-01-01 09:00:00",
"endtime": "2015-02-19 09:00:00",
"host": "Goooood People",
"location": "",
"view_count": 342,
"member_count": 112,
"approval": 0,
"invite": 0,
"photo_id": 267,
"category_id": 0,
"url": "http://example.com/event/1",
"image": "http://example.com/public/event/0c/01/010b_b3aa.png?c=e67c",
"image_normal": "http://example.com/public/event/0e/01/010d_f886.png?c=6b07",
"image_profile": "http://example.com/public/event/0d/01/010c_2347.png?c=2b4d",
"image_icon": "http://example.com/public/event/0f/01/010e_af41.png?c=6fb3",
"content_url": "http://example.com/event/1",
"owner_title": "Zahid Khurshid",
"category_title": "Blood Donation",
"get_attending_count": 1,
"get_maybe_count": 0,
"get_not_attending_count": 0,
"get_awaiting_reply_count": 0
}
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"description": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Event Profile ¶
Event ProfileGET/events/view
Get a event post and its gutter menu’s (edit, invite, share, delete) and profile tab’s (update, members, photos) with count information and event RSVP form.
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 878`)event id
- gutter_menu (optional, boolean, `gutter_menu
string
(required) Default: 1 OR 0`)get gutter menu’s array. Default valus is 1.
- profile_tabs (optional, boolean, `profile_tabs
string
(required) Default: 1 OR 0`)get profile tab’s array. Default valus is 1.
- profile_rsvp (optional, boolean, `profile_rsvp
string
(required) Default: 1 OR 0`) ... get RSVP form (`profile_rsvp=1`) or not (`profile_rsvp=0`). Default valus is 0.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"gutterMenu": [
{
"label": "Edit Event Details",
"name": "edit",
"url": "events/edit/129",
"urlParams": {}
},
{
"label": "Invite Guests",
"name": "invite",
"url": "events/member/invite/129",
"urlParams": {}
},
{
"label": "Share This Event",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "event",
"id": 129
}
},
{
"label": "Delete Event",
"name": "delete",
"url": "events/delete/129",
"urlParams": {}
}
],
"profile_tabs": [
{
"label": "Updates",
"name": "update",
"totalItemCount": 0
},
{
"label": "Guests",
"name": "members",
"totalItemCount": 1,
"url": "events/member/list/129",
"urlParams": {}
},
{
"label": "Photos",
"name": "photos",
"totalItemCount": 1,
"url": "events/photo/list",
"urlParams": {
"event_id": 129
}
}
],
"profile_rsvp_form": [
{
"type": "Radio",
"name": "rsvp",
"multiOptions": {
"0": "Not Attending",
"1": "Maybe Attending",
"2": "Attending"
}
},
{
"type": "Submit",
"name": "submit",
"label": "Send Invites"
}
],
"profile_rsvp_value": 2,
"response": {
"event_id": 129,
"title": "Blood Donation Camp",
"description": "Donated blood is a lifeline for many people needing long-term treatments, not just in emergencies. Your blood's main components: red cells, plasma and platelets are vital for many different uses. ",
"user_id": 61,
"parent_type": "group",
"parent_id": 2,
"search": 1,
"creation_date": "2015-01-23 06:07:49",
"modified_date": "2015-06-18 06:50:34",
"starttime": "2015-01-01 09:00:00",
"endtime": "2015-02-19 09:00:00",
"host": "Goooood People",
"location": "",
"view_count": 342,
"member_count": 112,
"approval": 0,
"invite": 0,
"photo_id": 267,
"category_id": 0,
"url": "http://example.com/event/1",
"image": "http://example.com/public/event/0c/01/010b_b3aa.png?c=e67c",
"image_normal": "http://example.com/public/event/0e/01/010d_f886.png?c=6b07",
"image_profile": "http://example.com/public/event/0d/01/010c_2347.png?c=2b4d",
"image_icon": "http://example.com/public/event/0f/01/010e_af41.png?c=6fb3",
"content_url": "http://example.com/event/1",
"owner_title": "Zahid Khurshid",
"category_title": "Blood Donation",
"get_attending_count": 1,
"get_maybe_count": 0,
"get_not_attending_count": 0,
"get_awaiting_reply_count": 0
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Post RSVPPOST/events/view
Post a member response (attending, maybe attending, not attending) on event.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
rsvp |
yes | integer | 2 | attending the event (rsvp=2 ) or may be attending (rsvp=1 ) or not attending (‘rsvp=0’) |
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 878`)event id
- gutter_menu (optional, boolean, `gutter_menu
string
(required) Default: 1 OR 0`)get gutter menu’s array. Default valus is 1.
- profile_tabs (optional, boolean, `profile_tabs
string
(required) Default: 1 OR 0`)get profile tab’s array. Default valus is 1.
- profile_rsvp (required, boolean, `profile_tabs
string
(required) Default: 1`) ... get RSVP form or post RSVP value (`profile_rsvp=1`) or not (`profile_rsvp=0`). Default valus is 0.
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"rsvp": 2
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Edit Event ¶
Get Edit Event FormGET/events/edit
Get the form for editing a event-post.
Returns the form
and formValues
as response. In form
we get the complete event form and in formValues
we get the form’s values.
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 878`)event id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Accept: application/json
Body
{
"form": [
{
"type": "Text",
"name": "title",
"label": "Event Name",
"hasValidator": true
},
{
"type": "Textarea",
"name": "description",
"label": "Event Description",
"hasValidator": true
},
{
"type": "Date",
"name": "starttime",
"label": "Start Time",
"hasValidator": true
},
{
"type": "Date",
"name": "endtime",
"label": "End Time",
"hasValidator": true
},
{
"type": "Text",
"name": "host",
"label": "Host"
},
{
"type": "Text",
"name": "location",
"label": "Location"
},
{
"type": "File",
"name": "photo",
"label": "Main Photo"
},
{
"type": "Select",
"name": "category_id",
"label": "Event Category",
"multiOptions": {
"0": "",
"1": "Arts",
"2": "Business",
"3": "Conferences",
"4": "Festivals",
"5": "Food",
"6": "Fundraisers",
"7": "Galleries",
"8": "Health",
"9": "Just For Fun",
"10": "Kids",
"11": "Learning",
"12": "Literary",
"13": "Movies",
"14": "Museums",
"15": "Neighborhood",
"16": "Networking",
"17": "Nightlife",
"18": "On Campus",
"19": "Organizations",
"20": "Outdoors",
"21": "Pets",
"22": "Politics",
"23": "Sales",
"24": "Science",
"25": "Spirituality",
"26": "Sports",
"27": "Technology",
"28": "Theatre",
"29": "Other"
},
"hasValidator": true
},
{
"type": "Checkbox",
"name": "search",
"label": "People can search for this event",
"value": true
},
{
"type": "Checkbox",
"name": "approval",
"label": "People must be invited to RSVP for this event"
},
{
"type": "Checkbox",
"name": "auth_invite",
"label": "Invited guests can invite other people as well",
"value": true
},
{
"type": "Select",
"name": "auth_view",
"label": "Privacy",
"description": "Who may see this event?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"member": "Event Guests Only",
"owner": "Just Me"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post comments on this event?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"member": "Event Guests Only",
"owner": "Just Me"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "Select",
"name": "auth_photo",
"label": "Photo Uploads",
"description": "Who may upload photos to this event?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"member": "Event Guests Only",
"owner": "Just Me"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "Submit",
"name": "submit",
"label": "Post Entry"
}
],
"formValues": {
"event_id": 129,
"title": "Blood Donation Camp",
"description": "Donated blood is a lifeline for many people needing long-term treatments, not just in emergencies. Your blood's main components: red cells, plasma and platelets are vital for many different uses.",
"user_id": 89,
"parent_type": "group",
"parent_id": 2,
"search": 1,
"creation_date": "2015-01-23 06:07:49",
"modified_date": "2015-06-18 06:50:34",
"starttime": "2015-01-01 09:00:00",
"endtime": "2015-02-19 09:00:00",
"host": "",
"location": "",
"view_count": 289,
"member_count": 117,
"approval": 0,
"invite": 0,
"photo_id": 267,
"category_id": 0,
"auth_invite": 1,
"auth_view": "everyone",
"auth_comment": "everyone",
"auth_photo": "everyone"
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Edit EventPUT/events/edit
Edit a event-post.
To upload the event photo, send the file in multipart / form-data
format with the photo
API request parameters.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Blood Donation Camp | event title |
description |
yes | string | Donated blood is a lifeline for many people needing… | event content |
starttime |
yes | string | 2015-06-12 12:42:45 | event start time |
endtime |
yes | string | 2015-10-12 12:42:45 | event end time |
host |
no | string | SS Group | hosted by |
location |
no | string | California | event location |
category_id |
yes | integer | 5 | category id |
search |
no | boolean | 1 | make event searchable (1 ) or not (0 ) |
approval |
no | boolean | 1 | make event approved (1 ) or not (0 ) |
auth_invite |
no | boolean | member | invite authorization (owner, owner_member, owner_network, etc.) |
auth_view |
yes | string | everyone | view authorization (owner, owner_member, owner_network, etc.) |
auth_comment |
yes | string | everyone | comment authorization (owner, owner_member, owner_network, etc.) |
auth_photo |
yes | string | officer | upload photo authorization (owner, owner_member, owner_network, etc.) |
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 878`)event id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"title": "Blood Donation Camp",
"description": "Donated blood is a lifeline for many people needing long-term treatments, not just in emergencies. Your blood's main components: red cells, plasma and platelets are vital for many different uses. ",
"starttime": "2015-06-12 12:42:45",
"endtime": "2015-10-12 12:42:45",
"category_id": 3,
"search": 1,
"auth_invite": 1,
"auth_view": "everyone",
"auth_comment": "everyone"
"auth_photo": "everyone"
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"description": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Event ¶
Delete EventDELETE/events/delete
Delete a event-post.
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 878`)event id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Events Plugin / Members ¶
These are the APIs for SocialEngine’s official Events Plugin.
Members List ¶
Members ListGET/events/member/list/{?search}
Get the event member listings. Event members also be browsed and searched based on keywords, waiting, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of members in response and use page
for the page number. [i.e: If you have 100 members and the first request has limit=20
and page=1
, then in that case the recent 20 members will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent members will be returned.]
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 129`)event id
- search
string
(optional) Example: search=michalget event members that contain this keyword in name.
- waiting
integer
(optional) Example: waiting=1get event member listings in order of membership not approved by event owner(waiting=1) or membership approved by event owner(waiting=0). Default value is 0.
- menu
boolean
(optional) Example: menu=1get member menu’s array. Default valus is 1.
- page
integer
(optional) Example: page=2return the ‘limit’ number of members of that page of member listings.
- limit
integer
(optional) Example: limit=20number of members. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"getWaitingItemCount": 0,
"members": [
{
"user_id": 189,
"username": "michael",
"displayname": "M Michael",
"photo_id": 0,
"status": "enabled",
"status_date": "2014-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2010-11-11 06:00:28",
"modified_date": "2015-06-16 10:43:28",
"lastlogin_date": "2015-06-17 05:26:45",
"update_date": null,
"member_count": 178,
"view_count": 1689,
"location": "",
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal",
"is_owner": 1,
"rsvp": 2,
"menu": null
}
],
"waiting": false,
"getTotalItemCount": 1,
"canEdit": 1
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Invite Members ¶
Get Members Invite FormGET/events/member/invite
Get the member invite form.
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 129`)event id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type":"Checkbox",
"name":"selectall",
"label":"Choose All Friends"
},
{
"type":"Multicheckbox",
"name":"users",
"label":"Members",
"multiOptions":{
"34":"Ronald Desuza"
"89":"M Michael"
"263":"James Robert"
}
},
{
"type":"Submit",
"name":"submit",
"label":"Send Invites"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Invite MembersPOST/events/member/invite
Invite a friends to join the event by posting the invite members form.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
users |
yes | string | 123,54,235 | comma-separated IDs of friends. |
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 129`)event id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"users": "123,54,235"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Accept Member Request ¶
Accept Member RequestPOST/events/member/accept
Accept a member request.
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 129`)event id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Ignore Member Request ¶
Ignore Member RequestPOST/events/member/ignore
Ignore a member request.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 78 | member id |
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 129`)event id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Leave Event ¶
Leave EventPOST/events/member/leave
Leave a event.
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 129`)event id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Join Event ¶
Join EventPOST/events/member/join
Join a event.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
rsvp |
yes | integer | 2 | attending the event (rsvp=2 ) or may be attending (rsvp=1 ) or not attending (‘rsvp=0’) |
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 129`)event id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Event Membership Request ¶
Event Membership RequestPOST/events/member/request
Request for the membership in event.
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 129`)event id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Approve Membership Request ¶
Approve Membership RequestPOST/events/member/approve
Approve a event membership request.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 78 | member id |
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 129`)event id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Cancel Membership Request ¶
Cancel Membership RequestPOST/events/member/cancel
Cancel a membership request.
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 129`)event id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Remove Member ¶
Remove MemberPOST/events/member/remove
Remove member from the event membership.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
user_id |
yes | integer | 78 | member id |
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 129`)event id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Headers
Content-Type: application/json
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Events Plugin / Photos ¶
These are the APIs for SocialEngine’s official Events Plugin.
Photos List ¶
Get Photos ListGET/events/photo/list/{?menu}
Get the event photos listings.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of photos in response and use page
for the page number. [i.e: If you have 100 photos and the first request has limit=20
and page=1
, then in that case the recent 20 photos will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent photos will be returned.]
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 58`)event id
- menu
integer
(optional) Example: menu=0get photo menu’s array. Default valus is 1.
- page
integer
(optional) Example: page=2return the ‘limit’ number of photos of that page of photo listings.
- limit
integer
(optional) Example: limit=20number of photos. Default limit is 10.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canUpload": 0,
"totalItemCount": 42,
"images": [
{
"photo_id": 237,
"album_id": 92,
"event_id": 102,
"user_id": 1,
"title": "",
"description": "",
"collection_id": 91,
"file_id": 238,
"creation_date": "2015-06-10 09:31:24",
"modified_date": "2015-06-10 09:31:24",
"view_count": 0,
"comment_count": 0,
"image": "http://example.com/public/event/ee/00ee_947e.jpg",
"image_normal": "http://example.com/public/event/f0/00f0_70df.jpg",
"image_profile": "http://example.com/public/event/ef/00ef_ef57.jpg",
"image_icon": "http://example.com/public/event/f1/00f1_8aaf.jpg",
"user_title": "BigStep Technologies",
"likes_count": 0,
"is_like": 0,
"menu": [
{
"label": "Edit",
"name": "edit",
"url": "events/photo/edit",
"urlParams": {
"event_id": 102,
"photo_id": 237
}
},
{
"label": "Delete",
"name": "delete",
"url": "events/photo/delete",
"urlParams": {
"event_id": 102,
"photo_id": 237
}
},
{
"label": "Share",
"name": "share",
"url": "activity/index/share",
"urlParams": {
"type": "event_photo",
"id": 237
}
},
{
"label": "Report",
"name": "report",
"url": "report/create/subject/event_photo_237"
},
{
"label": "Make Profile Photo",
"name": "make_profile_photo",
"url": "members/edit/external-photo",
"urlParams": {
"photo": "event_photo_237"
}
}
]
},
{
"photo_id": 156,
"album_id": 94,
"event_id": 102,
"user_id": 31,
"title": "",
"description": "",
"collection_id": 9,
"file_id": 275,
"creation_date": "2015-06-18 09:47:43",
"modified_date": "2015-06-18 09:47:44",
"view_count": 0,
"comment_count": 0,
"image": "http://example.com/public/event_photo/14/01/0113_d72b.png",
"image_normal": "http://example.com/public/event_photo/15/01/0114_43e7.png",
"image_profile": "http://example.com/public/event_photo/14/01/0113_d72b.png",
"image_icon": "http://example.com/public/event_photo/14/01/0113_d72b.png",
"content_url": "http://example.com/events/photo/view/event_id/1/photo_id/1",
"user_title": "BigStep Technologies",
"likes_count": 0,
"is_like": 0,
"menu": [
{
"label": "Edit",
"name": "edit",
"url": "events/photo/edit",
"urlParams": {
"event_id": 102,
"photo_id": 156
}
},
{
"label": "Delete",
"name": "delete",
"url": "events/photo/delete",
"urlParams": {
"event_id": 102,
"photo_id": 156
}
},
{
"label": "Share",
"name": "share",
"url": "activity/index/share",
"urlParams": {
"type": "event_photo",
"id": 156
}
},
{
"label": "Report",
"name": "report",
"url": "report/create/subject/event_photo_156"
},
{
"label": "Make Profile Photo",
"name": "make_profile_photo",
"url": "members/edit/external-photo",
"urlParams": {
"photo": "event_photo_237"
}
}
]
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Upload PhotosPOST/events/photo/list
Upload the event photos.
To upload the event photos, send the files as an array of multipart / form-data
elements with the photo
API request parameters.
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 58`)get the list of photos
- page
integer
(optional) Example: page=2use page to get next limit of photos
- limit
integer
(optional) Example: limit=20number of photos. Default limit is 10
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Photo View ¶
Photo ViewGET/events/photo/view/{?menu}
Get a event photo and its gutter menu’s (edit, delete, share, etc.) information.
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 947`)photo id
- menu
integer
(optional) Example: menu=0get photo menu’s array. Default valus is 1.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"photo_id": 947,
"album_id": 89,
"event_id": 106,
"user_id": 1,
"title": "",
"description": "",
"collection_id": 9,
"file_id": 275,
"creation_date": "2015-06-18 09:47:43",
"modified_date": "2015-06-18 09:47:44",
"view_count": 0,
"comment_count": 0,
"image": "http://example.com/public/event_photo/14/01/0113_d72b.png",
"image_normal": "http://example.com/public/event_photo/15/01/0114_43e7.png",
"image_profile": "http://example.com/public/event_photo/14/01/0113_d72b.png",
"image_icon": "http://example.com/public/event_photo/14/01/0113_d72b.png",
"content_url": "http://example.com/events/photo/view/event_id/1/photo_id/1",
"menu": [
{
"label": "Edit",
"name": "edit",
"url": "events/photo/edit",
"urlParams": {
"event_id": 106,
"photo_id": 947
}
},
{
"label": "Delete",
"name": "delete",
"url": "events/photo/delete",
"urlParams": {
"event_id": 106,
"photo_id": 947
}
},
{
"label": "Share",
"name": "share",
"url": "activity/index/share",
"urlParams": {
"type": "event_photo",
"id": 947
}
},
{
"label": "Report",
"name": "report",
"url": "report/create/subject/event_photo_947"
},
{
"label": "Make Profile Photo",
"name": "make_profile_photo",
"url": "members/edit/external-photo",
"urlParams": {
"photo": "event_photo_947"
}
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit Photo Title & Description ¶
Get FormGET/events/photo/edit
Get edit form.
Returns the form
and formValues
as response. In form
we get the complete event photo form and in formValues
we get the form’s values.
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 523`)photo id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Accept: application/json
Body
{
"form": [
{
"type": "Text",
"name": "title",
"label": "Title",
"hasValidator": true
},
{
"type": "Textarea",
"name": "description",
"label": "Description",
"hasValidator": true
},
{
"type": "Submit",
"name": "submit",
"label": "Submit"
}
],
"formValues": {
"photo_id": 523,
"album_id": 96,
"event_id": 106,
"user_id": 1,
"title": "",
"description": "",
"collection_id": 9,
"file_id": 275,
"creation_date": "2015-06-18 09:47:43",
"modified_date": "2015-06-18 09:47:44",
"view_count": 0,
"comment_count": 0
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit FormPUT/events/photo/edit
Edit a event photo title and description-post.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Harry Potter Series-1 Photo | photo title |
description |
yes | string | This photo is from harry potter first… | photo description |
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 523`)photo id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"title": "Harry Potter Series-1 Photo",
"description": "This photo is from harry potter first series."
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"description": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Photo ¶
Delete PhotoDELETE/events/photo/delete
Delete a event-photo.
Example URI
- photo_id (required, integer, `photo_id
string
(required) Default: 873`)photo id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Events Plugin / Discussion ¶
These are the APIs for SocialEngine’s official Events Plugin.
Discussions List ¶
Discussions ListGET/events/topic/index/event_id/{?page}
Get the event discussion listings.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of discussions in response and use page
for the page number. [i.e: If you have 100 discussions and the first request has limit=20
and page=1
, then in that case the recent 20 discussions will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent discussions will be returned.]
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 58`)event id
- page
integer
(optional) Example: page=2return the ‘limit’ number of discussions of that page of discussion listings.
- limit
integer
(optional) Example: limit=20number of discussions. Default limit is 10.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canPost": 0,
"getTotalItemCount": 56,
"response": [
{
"topic_id": 76,
"event_id": 58,
"user_id": 1,
"title": "New Video Release",
"creation_date": "2015-06-16 08:53:38",
"modified_date": "2015-06-16 08:53:38",
"sticky": 0,
"closed": 0,
"post_count": 1,
"view_count": 1,
"lastpost_id": 11,
"lastposter_id": 1
},
{
"topic_id": 85,
"event_id": 58,
"user_id": 1,
"title": "WHAT IF HARRY POTTER NEVER EXISTED?",
"creation_date": "2015-06-16 08:53:20",
"modified_date": "2015-06-16 08:53:20",
"sticky": 0,
"closed": 0,
"post_count": 1,
"view_count": 0,
"lastpost_id": 10,
"lastposter_id": 1
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create Discussion ¶
Get Discussion Create FormGET/events/topic/create/event_id
Get the event discussion creation form.
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 58`)event id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "title",
"label": "Title"
},
{
"type": "Textarea",
"name": "body",
"label": "Body"
},
{
"type": "Checkbox",
"name": "watch",
"label": "Send me notifications when other members reply to this topic."
},
{
"type": "Submit",
"name": "submit",
"label": "Post Reply"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create DiscussionPOST/events/topic/create/event_id
Create a new event discussion by posting the event discussion creation form.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
no | string | Anthony Horowitz’s Official Sherlock Holmes Novel | discussion title |
body |
no | string | Seems like this is going to be a good year for us book lovers… | discussion body |
watch |
no | boolean | 1 | send me notifications when other members reply in this topic(watch=1) or no notification(watch=0) |
Example URI
- event_id (required, integer, `event_id
string
(required) Default: 58`)event id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"title": "Anthony Horowitz’s Official Sherlock Holmes Novel",
"body": "Seems like this is going to be a good year for us book lovers, as the Conan Doyle Estate has commissioned author Anthony Horowitz, known for his Alex Rider novels, to write a new Sherlock Holmes novel.",
"watch": 1
}
201
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Discussion Profile ¶
Discussion ProfileGET/events/topic/view/topic_id
Get a event discussion post’s and its gutter menu’s (stop watching topic, make sticky, close, delete, etc.)
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
- gutter_menu (optional, boolean, `gutter_menu
string
(required) Default: 1 OR 0`)get gutter menu’s array. Default value is 1.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canPost": 1,
"gutterMenu": [
{
"label": "Stop Watching Topic",
"name": "stop_watch_topic",
"url": "events/topic/watch/topic_id/23/watch/0",
"urlParams": {}
},
{
"label": "Make Sticky",
"name": "make_sticky",
"url": "events/topic/sticky/topic_id/23/sticky/1",
"urlParams": {}
},
{
"label": "Close",
"name": "close",
"url": "events/topic/close/topic_id/23/close/1",
"urlParams": {}
},
{
"label": "Rename",
"name": "rename",
"url": "events/topic/rename/topic_id/23",
"urlParams": {}
}
],
"totalItemCount": 1,
"response": [
{
"post_id": 18,
"topic_id": 23,
"event_id": 58,
"user_id": 189,
"body": "Seems like this is going to be a good year for us book lovers, as the Conan Doyle Estate has commissioned author Anthony Horowitz, known for his Alex Rider novels, to write a new Sherlock Holmes novel.",
"creation_date": "2015-06-16 08:53:38",
"modified_date": "2015-06-16 08:53:38",
"posted_by": {
"user_id": 189,
"username": "michael",
"displayname": "M Michael",
"photo_id": 0,
"status": "enabled",
"status_date": "2014-06-12 05:02:34",
"locale": "fil_PH",
"language": "en_US",
"timezone": "Asia/Dubai",
"search": 0,
"show_profileviewers": 1,
"level_id": 1,
"enabled": 1,
"verified": 1,
"approved": 1,
"creation_date": "2010-11-11 06:00:28",
"modified_date": "2015-06-16 10:43:28",
"lastlogin_date": "2015-06-17 05:26:45",
"update_date": null,
"member_count": 178,
"view_count": 1689,
"location": "",
"image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url": "http://example.com/profile/michal",
"menu": null
},
"menu": [
{
"label": "Edit",
"name": "edit",
"url": "events/post/edit",
"urlParams": {
"post_id": 11
}
},
{
"label": "Delete",
"name": "delete",
"url": "events/post/delete",
"urlParams": {
"post_id": 11
}
}
]
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Post Discussion Reply ¶
Get Discussion Reply FormGET/events/topic/post/topic_id
Get the discussion reply form.
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Textarea",
"name": "body",
"label": "Body"
},
{
"type": "Checkbox",
"name": "watch",
"label": "Send me notifications when other members reply to this topic."
},
{
"type": "Submit",
"name": "submit",
"label": "Post Reply"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Post Discussion ReplyPOST/events/topic/post/topic_id
Post a reply in discussion.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
body |
no | string | I’m reading this book now and I must say… | post body |
watch |
no | boolean | 1 | send me notifications when other members reply to this topic(watch=1) or no notification(watch=0) |
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"body": "I'm reading this book now and I must say, Horowitz does a great job of capturing Doyle's "voice" in this one. A real good read so far...... ",
"watch": 1
}
201
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Make Sticky / Remove Sticky ¶
Make Sticky / Remove StickyPOST/events/topic/sticky/topic_id/sticky/{sticky}
Make discussion sticky or remove sticky.
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
- sticky
boolean
(required) Example: sticky=1make discussion sticky (
1
) or not (0
)
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Open / Close ¶
Open / ClosePOST/events/topic/close/topic_id/closed/{closed}
Make discussion open or close.
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
- closed
boolean
(required) Example: closed=1make discussion close (
1
) or open (0
)
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Rename Discussion ¶
Get Discussion Rename FormGET/events/topic/rename/topic_id
Get the discussion rename form
Returns the form
and formValues
as response. In form
we get the complete rename discussion form and in formValues
we get the form’s values.
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Accept: application/json
Body
{
"form": [
{
"type": "Text",
"name": "title",
"label": "Title"
},
{
"type": "Submit",
"name": "submit",
"label": "Rename Topic"
}
],
"formValues": {
"title": "Anthony Horowitz’s Official Sherlock Holmes Novel"
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Rename DiscussionPUT/events/topic/rename/topic_id
Rename a discussion-post.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
no | string | Oxford Dictionary of Biology 6th Edition | new discussion title |
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"title": "Oxford Dictionary of Biology 6th Edition"
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: title"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Watch Topic / Stop Watching Topic ¶
Watch Topic / Stop Watching TopicPOST/events/topic/watch/topic_id/watch/{watch}
Watch topic or stop watching topic.
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
- watch
boolean
(required) Example: watch=1watch topic (
1
) or not (0
)
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Delete Discussion ¶
Delete DiscussionDELETE/events/topic/delete/topic_id
Delete a discussion.
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 14`)discussion id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Video Sharing Plugin ¶
These are the APIs for SocialEngine’s official Video Sharing Plugin.
Browse Videos ¶
Browse VideosGET/videos{?search}
Get the videos listing. Videos can also be browsed and searched based on keywords, categories, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of videos in response and use page
for the page number. [i.e: If you have 100 videos and the first request has limit=20
and page=1
, then in that case the recent 20 videos will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent videos will be returned.]
Example URI
- search
string
(optional) Example: search=blget videos that contain this keyword in title or description.
- orderby
string
(optional) Example: orderby=creation_dateget video listings in the order of descending creation date (
creation_date
) or descending number of views (view_count
) or descending order of rating (rating
).- category
integer
(optional) Example: category=13get all videos of a particular category ID.
- user_id (optional, integer, `user_id
string
(required) Default: 125`)user id of profile owner. Default value is logged-in user’s ID.
- page
integer
(optional) Example: page=2return the ‘limit’ number of videos of that page of video listings.
- limit
integer
(optional) Example: limit=20number of videos. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canCreate": 1,
"totalItemCount": 76,
"response": [
{
"video_id": 58,
"title": "How To Use AF-On And Back Button Autofocus",
"description": "Check out my website and sign up for my e-mail newsletter: http://www.backcountrygallery.com Try a better way to focus your DSLR! Using back button autofocus is a faster, easier, smarter way to get great AF results from your DSLR.",
"search": 1,
"owner_type": "user",
"owner_id": 11,
"parent_type": null,
"parent_id": null,
"creation_date": "2015-04-15 11:08:35",
"modified_date": "2015-04-15 11:08:39",
"view_count": 130,
"comment_count": 30,
"type": 1,
"code": "LHu3_CXEdJY",
"photo_id": 166,
"rating": 0,
"category_id": 2,
"status": 1,
"file_id": 0,
"duration": 903,
"rotation": 180,
"location": "",
"image": "http://example.com/public/video/a6/00a6_f28f.jpg",
"image_normal": "http://example.com/public/video/a6/00a6_f28f.jpg",
"image_profile": "http://example.com/public/video/a6/00a6_f28f.jpg",
"image_icon": "http://example.com/public/video/a6/00a6_f28f.jpg",
"content_url": "http://example.com/videos/2/1/happy-new-year",
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Alex Uyerr",
"allow_to_view": 1,
"like_count": 76,
"rating_count": 0,
"video_url": "www.youtube.com/embed/LHu3_CXEdJY?wmode=opaque&autoplay=1"
},
{
"video_id": 74,
"title": "'Inception' Trailer 2 HD",
"description": "For more info on 'Inception' visit: http://www.hollywood.com ",
"search": 1,
"owner_type": "",
"owner_id": 41,
"parent_type": null,
"parent_id": null,
"creation_date": "2015-04-15 10:59:07",
"modified_date": "2015-04-15 10:59:07",
"view_count": 183,
"comment_count": 28,
"type": 1,
"code": "LHu3_CXEdJY",
"photo_id": 165,
"rating": 5,
"category_id": 0,
"status": 1,
"file_id": 0,
"duration": 903,
"rotation": 0,
"location": "",
"image": "http://example.com/public/video/a5/00a5_f28f.jpg",
"image_normal": "http://example.com/public/video/a5/00a5_f28f.jpg",
"image_profile": "http://example.com/public/video/a5/00a5_f28f.jpg",
"image_icon": "http://example.com/public/video/a5/00a5_f28f.jpg",
"content_url": "http://example.com/videos/2/1/happy-new-year",
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Emma Wise",
"allow_to_view": 1,
"like_count": 92,
"rating_count": 1,
"video_url": "www.youtube.com/embed/LHu3_CXEdJY?wmode=opaque&autoplay=1"
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
My Videos ¶
My VideosGET/videos/manage
Get the videos of a member. Videos can also be browsed and searched based on keywords, categories, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of videos in response and use page
for the page number. [i.e: If you have 100 videos and the first request has limit=20
and page=1
, then in that case the recent 20 videos will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent videos will be returned.]
Example URI
- search
string
(optional) Example: search=blget videos that contain this keyword in title or description.
- orderby
string
(optional) Example: orderby=creation_dateget video listings in the order of descending creation date (
creation_date
) or descending number of views (view_count
) or descending order of rating (rating
).- category
integer
(optional) Example: category=13get all videos of a particular category ID.
- page
integer
(optional) Example: page=2return the ‘limit’ number of videos of that page of video listings.
- limit
integer
(optional) Example: limit=20number of videos. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"totalItemCount": 6,
"canCreate": 1,
"quota": 20,
"response": [
{
"video_id": 85,
"title": "How To Use AF-On And Back Button Autofocus",
"description": "Check out my website and sign up for my e-mail newsletter: http://www.backcountrygallery.com Try a better way to focus your DSLR! Using back button autofocus is a faster, easier, smarter way to get great AF results from your DSLR.",
"search": 1,
"owner_type": "user",
"owner_id": 29,
"parent_type": null,
"parent_id": null,
"creation_date": "2015-04-15 11:08:35",
"modified_date": "2015-04-15 11:08:39",
"view_count": 128,
"comment_count": 89,
"type": 1,
"code": "LHu3_CXEdJY",
"photo_id": 166,
"rating": 0,
"category_id": 2,
"status": 1,
"file_id": 0,
"duration": 903,
"rotation": 180,
"location": "",
"image": "http://example.com/public/video/a6/00a6_f28f.jpg?c=7c95",
"image_normal": "http://example.com/public/video/a6/00a6_f28f.jpg?c=7c95",
"image_profile": "http://example.com/public/video/a6/00a6_f28f.jpg?c=7c95",
"image_icon": "http://example.com/public/video/a6/00a6_f28f.jpg?c=7c95",
"content_url": "http://example.com/videos/2/1/happy-new-year",
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Zahid Khurshid",
"allow_to_view": 1,
"like_count": 189,
"rating_count": 4,
"video_url": "www.youtube.com/embed/LHu3_CXEdJY?wmode=opaque&autoplay=1",
"menu": [
{
"label": "Edit Video",
"name": "edit",
"url": "videos/edit/85",
"urlParams": {}
},
{
"label": "Delete Video",
"name": "delete",
"url": "videos/delete/85",
"urlParams": {}
}
]
},
{
"video_id": 145,
"title": "Akcent - Angel",
"description": "",
"search": 1,
"owner_type": "",
"owner_id": 29,
"parent_type": null,
"parent_id": null,
"creation_date": "2015-04-15 10:59:07",
"modified_date": "2015-04-15 10:59:07",
"view_count": 138,
"comment_count": 78,
"type": 1,
"code": "LHu3_CXEdJY",
"photo_id": 165,
"rating": 5,
"category_id": 0,
"status": 1,
"file_id": 0,
"duration": 903,
"rotation": 0,
"location": "",
"image": "http://example.com/public/video/a5/00a5_f28f.jpg?c=7c95",
"image_normal": "http://example.com/public/video/a5/00a5_f28f.jpg?c=7c95",
"image_profile": "http://example.com/public/video/a5/00a5_f28f.jpg?c=7c95",
"image_icon": "http://example.com/public/video/a5/00a5_f28f.jpg?c=7c95",
"content_url": "http://example.com/videos/2/1/happy-new-year",
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Zahid Khurshid",
"allow_to_view": 1,
"like_count": 145,
"rating_count": 1,
"video_url": "www.youtube.com/embed/LHu3_CXEdJY?wmode=opaque&autoplay=1",
"menu": [
{
"label": "Edit Video",
"name": "edit",
"url": "videos/edit/145",
"urlParams": {}
},
{
"label": "Delete Video",
"name": "delete",
"url": "videos/delete/145",
"urlParams": {}
}
]
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Video Search Form ¶
Video Search FormGET/videos/search-form
Get the videos search form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "search",
"label": "Search"
},
{
"type": "Select",
"name": "orderby",
"label": "Browse By",
"multiOptions": {
"creation_date": "Most Recent",
"view_count": "Most Viewed",
"rating": "Highest Rated"
}
},
{
"type": "Select",
"name": "category",
"label": "Category",
"multiOptions": [
"All Categories",
"Autos & Vehicles",
"Comedy",
"Education",
"Entertainment",
"Film & Animation",
"Gaming",
"Howto & Style",
"Music",
"News & Politics",
"Nonprofits & Activism",
"People & Blogs",
"Pets & Animals",
"Science & Technology",
"Sports",
"Travel & Events"
]
},
{
"type": "Submit",
"name": "submit",
"label": "Search"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create Video ¶
Get Video Creation FormGET/videos/create
Get the video creation form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "title",
"label": "Video Title",
"maxlength": 100,
"hasValidator": true
},
{
"type": "Text",
"name": "tags",
"label": "Tags (Keywords)",
"description": "Separate tags with commas."
},
{
"type": "Textarea",
"name": "description",
"label": "Video Description",
"hasValidator": true
},
{
"type": "Select",
"name": "category_id",
"label": "Category",
"multiOptions": [
"",
"Autos & Vehicles",
"Comedy",
"Education",
"Entertainment",
"Film & Animation",
"Gaming",
"Howto & Style",
"Music",
"News & Politics",
"Nonprofits & Activism",
"People & Blogs",
"Pets & Animals",
"Science & Technology",
"Sports",
"Travel & Events"
],
"hasValidator": true
},
{
"type": "Checkbox",
"name": "search",
"label": "Show this video entry in search results"
},
{
"type": "Text",
"name": "location",
"label": "Location",
"description": "Eg: Fairview Park, Berkeley, CA"
},
{
"type": "Select",
"name": "auth_view",
"label": "Privacy",
"description": "Who may see this video?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post comments on this video?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "Select",
"name": "rotation",
"label": "Video Rotation",
"multiOptions": {
"0": "",
"90": "90°",
"180": "180°",
"270": "270°"
}
},
{
"type": "Select",
"name": "type",
"label": "Video Source",
"multiOptions": {
"1": "YouTube",
"2": "Vimeo",
"3": "My Device"
},
"hasValidator": true
},
{
"type": "Text",
"name": "url",
"label": "Video Link (URL)",
"description": "Paste the web address of the video here.",
"maxlength": 50
},
{
"type": "File",
"name": "filedata",
"label": "Add Video"
},
{
"type": "Submit",
"name": "submit",
"label": "Post Video"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create VideoPOST/videos/create
Create a new video by posting the video creation form.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | How To Use AF-On And Back Button | video title |
tags |
no | string | banking, operations | video tags (comma separated) |
description |
yes | string | Check out my website and sign up for my e-mail… | video content |
category_id |
yes | integer | 2 | category id |
search |
no | boolean | 1 | make video searchable (1 ) or not (0 ) |
location |
no | string | California | location |
auth_view |
yes | string | everyone | view authorization (everyone, owner_network, etc.) |
auth_comment |
yes | string | everyone | comment authorization (everyone, owner_network, etc.) |
rotation |
no | integer | 180 | video rotation 90, 180 and 270 degree. |
type |
yes | integer | 2 | upload video from YouTube (1 ) or Vimeo (2 ) or from device (3 ) |
url |
no | string | https://www.youtube.com/watch?v=SbPsiau32WI | video url for YouTube and Vimeo. |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"title": "How To Use AF-On And Back Button Autofocus",
"tags": "entertainment",
"description": "Check out my website and sign up for my e-mail newsletter: http://www.backcountrygallery.com Try a better way to focus your DSLR! Using back button autofocus is a faster, easier, smarter way to get great AF results from your DSLR.",
"category_id": 3,
"search": 1,
"auth_view": "everyone",
"auth_comment": "everyone"
"type": 1,
"url": https://www.youtube.com/watch?v=SbPsiau32WI
}
200
Headers
Content-Type: application/json
Body
{
"gutterMenu": [
{
"label": "Post New Video",
"name": "create",
"url": "videos/create"
},
{
"label": "Edit Video",
"name": "edit",
"url": "videos/edit/236",
"urlParams": {}
},
{
"label": "Delete Video",
"name": "delete",
"url": "videos/delete/236",
"urlParams": {}
},
{
"label": "Share",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "video",
"id": 236
}
}
],
"response": {
"video_id": 236,
"title": "How To Use AF-On And Back Button Autofocus",
"description": "Check out my website and sign up for my e-mail newsletter: http://www.backcountrygallery.com Try a better way to focus your DSLR! Using back button autofocus is a faster, easier, smarter way to get great AF results from your DSLR.",
"search": 1,
"owner_type": "",
"owner_id": 1,
"parent_type": null,
"parent_id": null,
"creation_date": "2015-04-15 06:36:21",
"modified_date": "2015-04-15 06:37:00",
"view_count": 43,
"comment_count": 10,
"type": 3,
"code": "3gp",
"photo_id": 164,
"rating": 0,
"category_id": 2,
"status": 1,
"file_id": 163,
"duration": 139,
"rotation": 270,
"location": "",
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Alex Uyerr",
"rating_count": 2,
"is_like": 1,
"like_count": 112,
"message_view": false,
"tags": null,
"can_edit": 1,
"can_delete": 1,
"can_embed": true,
"rated": false,
"videoEmbedded": "",
"category": "Comedy",
"video_url": "http://example.com/public/video/a3/00a3_2820.mp4"
}
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"description": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Video Profile ¶
Video ProfileGET/videos/view
Get a video post and its gutter menu’s (create, edit, delete, share, etc) information.
Example URI
- video_id (required, integer, `video_id
string
(required) Default: 25`)video id
- gutter_menu (optional, boolean, `gutter_menu
string
(required) Default: 1 OR 0`)get gutter menu’s array. Default valus is 1.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"gutterMenu": [
{
"label": "Post New Video",
"name": "create",
"url": "videos/create"
},
{
"label": "Edit Video",
"name": "edit",
"url": "videos/edit/236",
"urlParams": {}
},
{
"label": "Delete Video",
"name": "delete",
"url": "videos/delete/236",
"urlParams": {}
},
{
"label": "Share",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "video",
"id": 236
}
}
],
"response": {
"video_id": 236,
"title": "How To Use AF-On And Back Button Autofocus",
"description": "Check out my website and sign up for my e-mail newsletter: http://www.backcountrygallery.com Try a better way to focus your DSLR! Using back button autofocus is a faster, easier, smarter way to get great AF results from your DSLR.",
"search": 1,
"owner_type": "",
"owner_id": 1,
"parent_type": null,
"parent_id": null,
"creation_date": "2015-04-15 06:36:21",
"modified_date": "2015-04-15 06:37:00",
"view_count": 43,
"comment_count": 10,
"type": 3,
"code": "3gp",
"photo_id": 164,
"rating": 0,
"category_id": 2,
"status": 1,
"file_id": 163,
"duration": 139,
"rotation": 270,
"location": "",
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Alex Uyerr",
"rating_count": 2,
"is_like": 1,
"like_count": 112,
"message_view": false,
"tags": null,
"can_edit": 1,
"can_delete": 1,
"can_embed": true,
"rated": false,
"videoEmbedded": "",
"category": "Comedy",
"video_url": "http://example.com/public/video/a3/00a3_2820.mp4"
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Edit Video ¶
Get Edit Video FormGET/videos/edit
Get the form for editing a video-post.
Returns the form
and formValues
as response. In form
we get the complete video form and in formValues
we get the form’s values.
Example URI
- video_id (required, integer, `video_id
string
(required) Default: 124`)video id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"form": [
{
"type": "Text",
"name": "title",
"label": "Video Title",
"maxlength": 100,
"hasValidator": true
},
{
"type": "Text",
"name": "tags",
"label": "Tags (Keywords)",
"description": "Separate tags with commas."
},
{
"type": "Textarea",
"name": "description",
"label": "Video Description",
"hasValidator": true
},
{
"type": "Select",
"name": "category_id",
"label": "Category",
"multiOptions": [
"",
"Autos & Vehicles",
"Comedy",
"Education",
"Entertainment",
"Film & Animation",
"Gaming",
"Howto & Style",
"Music",
"News & Politics",
"Nonprofits & Activism",
"People & Blogs",
"Pets & Animals",
"Science & Technology",
"Sports",
"Travel & Events"
],
"hasValidator": true
},
{
"type": "Checkbox",
"name": "search",
"label": "Show this video entry in search results"
},
{
"type": "Text",
"name": "location",
"label": "Location",
"description": "Eg: Fairview Park, Berkeley, CA"
},
{
"type": "Select",
"name": "auth_view",
"label": "Privacy",
"description": "Who may see this video?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post comments on this video?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "Submit",
"name": "submit",
"label": "Save Video"
}
],
"formValues": {
"video_id": 6,
"title": "Uploaded From Computer",
"description": "Uploaded From Computer",
"search": 1,
"owner_type": "",
"owner_id": 1,
"parent_type": null,
"parent_id": null,
"creation_date": "2015-04-15 06:36:21",
"modified_date": "2015-04-15 06:37:00",
"view_count": 3,
"comment_count": 0,
"type": 3,
"code": "3gp",
"photo_id": 164,
"rating": 0,
"category_id": 2,
"status": 1,
"file_id": 163,
"duration": 139,
"rotation": 270,
"location": "",
"auth_view": "everyone",
"auth_comment": "everyone",
"tags": ""
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit VideoPUT/videos/edit
Edit a video-post.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | How To Use AF-On And Back Button | video title |
tags |
no | string | banking, operations | video tags (comma separated) |
description |
yes | string | Check out my website and sign up for my e-mail… | video content |
category_id |
yes | integer | 2 | category id |
search |
no | boolean | 1 | make video searchable (1 ) or not (0 ) |
location |
no | string | California | location |
auth_view |
yes | string | everyone | view authorization (everyone, owner_network, etc.) |
auth_comment |
yes | string | everyone | comment authorization (everyone, owner_network, etc.) |
Example URI
- video_id (required, integer, `video_id
string
(required) Default: 124`)video id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"title": "How To Use AF-On And Back Button Autofocus",
"tags": "entertainment",
"description": "Check out my website and sign up for my e-mail newsletter: http://www.backcountrygallery.com Try a better way to focus your DSLR! Using back button autofocus is a faster, easier, smarter way to get great AF results from your DSLR.",
"category_id": 3,
"search": 1,
"auth_view": "everyone",
"auth_comment": "everyone"
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"description": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Rate to Video ¶
Rate to VideoPOST/videos/rate
Rate to video.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
rating |
yes | integer | 5 | rating allow 1 to 5. |
Example URI
- video_id (required, integer, `video_id
string
(required) Default: 124`)video id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"rating": 5
}
200
Headers
Content-Type: application/json
Body
{
"rating_count": 1
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Video ¶
Delete VideoDELETE/videos/delete
Delete a video-post.
Example URI
- video_id (required, integer, `video_id
string
(required) Default: 124`)video id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Music Sharing Plugin ¶
These are the APIs for SocialEngine’s official Music Sharing Plugin.
Browse Playlists ¶
Browse PlaylistsGET/music{?search}
Get the playlist listings. Playlists can also be browsed and searched based on keywords, show, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of music in response and use page
for the page number. [i.e: If you have 100 music and the first request has limit=20
and page=1
, then in that case the recent 20 music will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent music will be returned.]
Example URI
- search
string
(optional) Example: search=californiaget playlists that contain this keyword in title or description.
- show
integer
(optional) Example: show=2get playlist of all users (
1
) or only of the member’s friends (2
).- sort
string
(optional) Example: sort=recentget playlist listings in the order of most recent (
recent
) or most popular (popular
).- user_id (optional, integer, `user_id
string
(required) Default: 125`)user id of profile owner. Default value is logged-in user’s ID.
- page
integer
(optional) Example: page=2return the ‘limit’ number of music of that page of music listings.
- limit
integer
(optional) Example: limit=20number of music. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Body
{
"canCreate": 0,
"response": [
{
"playlist_id": 5,
"title": "My Favorite Songs",
"description": "",
"photo_id": 0,
"owner_type": "user",
"owner_id": 27,
"search": 1,
"profile": 0,
"special": null,
"creation_date": "2015-05-19 05:56:21",
"modified_date": "2015-05-19 05:56:21",
"view_count": 125,
"comment_count": 36,
"play_count": 0,
"image": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_normal": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_profile": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_icon": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"content_url": "http://example.com/music/28/my-music",
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Zahid Khurshid",
"playlist_songs": [
{
"song_id": 10,
"playlist_id": 5,
"file_id": 186,
"title": "Aao Na",
"play_count": 13,
"order": 0,
"filePath": "http://example.com/public/music_song/ba/00ba_229f.mp3"
},
{
"song_id": 11,
"playlist_id": 5,
"file_id": 187,
"title": "Awari",
"play_count": 5,
"order": 1,
"filePath": "http://example.com/public/music_song/bb/00bb_a08e.mp3"
},
{
"song_id": 12,
"playlist_id": 5,
"file_id": 188,
"title": "Aaj Dil Shayrana",
"play_count": 12,
"order": 2,
"filePath": "http://example.com/public/music_song/bc/00bc_82c8.mp3"
}
]
},
{
"playlist_id": 4,
"title": "My Playlist",
"description": "My Playlist",
"photo_id": 0,
"owner_type": "user",
"owner_id": 29,
"search": 1,
"profile": 0,
"special": null,
"creation_date": "2015-04-20 11:42:49",
"modified_date": "2015-04-20 11:42:49",
"view_count": 27,
"comment_count": 10,
"play_count": 2,
"image": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_normal": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_profile": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_icon": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"content_url": "http://example.com/music/28/my-music",
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Zahid Khurshid",
"playlist_songs": [
{
"song_id": 8,
"playlist_id": 4,
"file_id": 180,
"title": "Dukki Tikki",
"play_count": 1,
"order": 0,
"filePath": "http://example.com/public/music_song/b4/00b4_e6ba.mp3"
},
{
"song_id": 9,
"playlist_id": 4,
"file_id": 181,
"title": "Aaj Phir",
"play_count": 1,
"order": 1,
"filePath": "http://example.com/public/music_song/b5/00b5_805d.mp3"
}
]
}
],
"totalItemCount": 37
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
My Playlists ¶
My PlaylistsGET/music/manage{?search}
Get the playlist of a member. Playlists can also be browsed and searched based on keywords, show, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of music in response and use page
for the page number. [i.e: If you have 100 music and the first request has limit=20
and page=1
, then in that case the recent 20 music will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent music will be returned.]
Example URI
- search
string
(optional) Example: search=californiaget playlists that contain this keyword in title or description.
- show
integer
(optional) Example: show=2get playlist of all users (
1
) or only of the member’s friends (2
).- sort
string
(optional) Example: sort=recentget playlist listings in the order of most recent (
recent
) or most popular (popular
).- page
integer
(optional) Example: page=2return the ‘limit’ number of music of that page of music listings.
- limit
integer
(optional) Example: limit=20number of music. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"canCreate": 1,
"response": [
{
"playlist_id": 4,
"title": "My Favorite Songs",
"description": "",
"photo_id": 0,
"owner_type": "user",
"owner_id": 1,
"search": 1,
"profile": 0,
"special": null,
"creation_date": "2015-04-20 11:42:49",
"modified_date": "2015-04-20 11:42:49",
"view_count": 2,
"comment_count": 0,
"play_count": 2,
"image": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_normal": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_profile": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_icon": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"content_url": "http://example.com/music/28/my-music",
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Zahid Khurshid",
"menu": [
{
"label": "Delete Playlist",
"name": "delete",
"url": "music/playlist/delete/4",
"urlParams": {}
}
],
"playlist_songs": [
{
"song_id": 8,
"playlist_id": 4,
"file_id": 180,
"title": "Dukki Tikki",
"play_count": 1,
"order": 0,
"filePath": "http://example.com/public/music_song/b4/00b4_e6ba.mp3"
},
{
"song_id": 9,
"playlist_id": 4,
"file_id": 181,
"title": "Aaj Phir",
"play_count": 1,
"order": 1,
"filePath": "http://example.com/public/music_song/b5/00b5_805d.mp3"
}
]
},
{
"playlist_id": 2,
"title": "My Playlist",
"description": "",
"photo_id": 169,
"owner_type": "user",
"owner_id": 1,
"search": 1,
"profile": 0,
"special": null,
"creation_date": "2015-04-20 06:03:31",
"modified_date": "2015-04-20 06:03:32",
"view_count": 0,
"comment_count": 0,
"play_count": 14,
"image": "http://example.com/public/music_playlist/a9/00a9_8dfb.jpeg",
"image_normal": "http://example.com/public/music_playlist/ab/00ab_831c.jpeg",
"image_profile": "http://example.com/public/music_playlist/aa/00aa_f6fe.jpeg",
"image_icon": "http://example.com/public/music_playlist/ac/00ac_3feb.jpeg",
"content_url": "http://example.com/music/28/my-music",
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Zahid Khurshid",
"menu": [
{
"label": "Delete Playlist",
"name": "delete",
"url": "music/playlist/delete/2",
"urlParams": {}
}
],
"playlist_songs": [
{
"song_id": 4,
"playlist_id": 2,
"file_id": 168,
"title": "aaj phir kya bhai",
"play_count": 3,
"order": 1,
"filePath": "http://example.com/public/music_song/a8/00a8_805d.mp3"
}
]
}
],
"totalItemCount": 3
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Playlist Search Form ¶
Playlist Search FormGET/music/search-form
Get the playlists search form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "search",
"label": "Search Music"
},
{
"type": "Select",
"name": "show",
"label": "Show",
"multiOptions": {
"1": "Everyone's Playlists",
"2": "Only My Friends' Playlists"
}
},
{
"type": "Select",
"name": "sort",
"label": "Browse By",
"multiOptions": {
"recent": "Most Recent",
"popular": "Most Popular"
}
},
{
"type": "Submit",
"name": "submit",
"label": "Search"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create Playlist ¶
Get Playlist Creation FormGET/music/create
Get the playlist creation form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "title",
"label": "Playlist Name",
"maxlength": 63,
"hasValidator": true
},
{
"type": "Textarea",
"name": "description",
"label": "Playlist Description",
"maxlength": 300,
"hasValidator": true
},
{
"type": "Checkbox",
"name": "search",
"label": "Show this playlist in search results"
},
{
"type": "Select",
"name": "auth_view",
"label": "Privacy",
"description": "Who may see this playlist?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post comments on this playlist?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "File",
"name": "photo",
"label": "Playlist Artwork"
},
{
"type": "File",
"name": "songs",
"label": "Add Music"
},
{
"type": "Submit",
"name": "submit",
"label": "Save Music to Playlist"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create PlaylistPOST/music/create
Create a new playlist by posting the playlist creation form.
To upload the photo of music, send the file in multipart / form-data
format with the photo
API request parameters.
To upload the songs file, send the files as an array of multipart / form-data
elements with the songs
API request parameters.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | My Favorite Songs | playlist title |
description |
yes | string | My Favorite Songs | playlist content |
search |
no | boolean | 1 | make playlist searchable (1 ) or not (0 ) |
auth_view |
yes | string | everyone | view authorization (everyone, owner_network, etc.) |
auth_comment |
yes | string | everyone | comment authorization (everyone, owner_network, etc.) |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"title": "My Favorite Songs",
"description": "",
"auth_view": "everyone",
"auth_comment": "everyone"
}
201
400
Headers
Content-Type: application/json
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"description": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Playlist Profile ¶
Playlist ProfileGET/music/playlist/view
Get a playlist post and its gutter menu’s (delete, share, report, etc) information and playlist song’s array.
Example URI
- playlist_id (required, integer, `playlist_id
string
(required) Default: 20`)playlist id
- gutter_menu (optional, boolean, `gutter_menu
string
(required) Default: 1 OR 0`)get gutter menu’s array. Default valus is 1.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"playlist_id": 52,
"title": "My Favorite Songs - Best Ever",
"description": "",
"photo_id": 0,
"owner_type": "user",
"owner_id": 3,
"search": 1,
"profile": 0,
"special": null,
"creation_date": "2015-05-19 05:56:21",
"modified_date": "2015-05-19 05:56:21",
"view_count": 65,
"comment_count": 17,
"play_count": 34,
"image": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_normal": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_profile": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_icon": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"is_like": 0,
"like_count": 0,
"owner_title": "Zahid Khurshid",
"playlist_songs": [
{
"song_id": 10,
"playlist_id": 5,
"file_id": 186,
"title": "Aao Na",
"play_count": 0,
"order": 0,
"filePath": "http://example.com/public/music_song/ba/00ba_229f.mp3"
},
{
"song_id": 11,
"playlist_id": 5,
"file_id": 187,
"title": "Awari",
"play_count": 0,
"order": 1,
"filePath": "http://example.com/public/music_song/bb/00bb_a08e.mp3"
},
{
"song_id": 12,
"playlist_id": 5,
"file_id": 188,
"title": "Aaj Dil Shayrana",
"play_count": 0,
"order": 2,
"filePath": "http://example.com/public/music_song/bc/00bc_82c8.mp3"
}
],
"gutterMenu": [
{
"label": "Delete Playlist",
"name": "delete",
"url": "music/playlist/delete/5",
"urlParams": {}
},
{
"label": "Share",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "music_playlist",
"id": 5
}
},
{
"label": "Report",
"name": "report",
"url": "report/create/subject/music_playlist_5",
"urlParams": {
"type": "music_playlist",
"id": 5
}
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Edit Playlist ¶
Get Edit Playlist FormGET/music/playlist/edit
Get the form for editing a playlist-post.
Returns the form
and formValues
as response. In form
we get the complete playlist form and in formValues
we get the form’s values.
Example URI
- playlist_id (required, integer, `playlist_id
string
(required) Default: 20`)playlist id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"form": [
{
"type": "Text",
"name": "title",
"label": "Playlist Name",
"maxlength": 63,
"hasValidator": true
},
{
"type": "Textarea",
"name": "description",
"label": "Playlist Description",
"maxlength": 300,
"hasValidator": true
},
{
"type": "Checkbox",
"name": "search",
"label": "Show this playlist in search results"
},
{
"type": "Select",
"name": "auth_view",
"label": "Privacy",
"description": "Who may see this playlist?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post comments on this playlist?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone",
"hasValidator": true
},
{
"type": "File",
"name": "photo",
"label": "Playlist Artwork"
},
{
"type": "File",
"name": "songs",
"label": "Add Music"
},
{
"type": "Submit",
"name": "submit",
"label": "Save Music to Playlist"
}
],
"formValues": {
"playlist_id": 45,
"title": "My Favorite Songs",
"description": "",
"photo_id": 0,
"owner_type": "user",
"owner_id": 3,
"search": 1,
"profile": 0,
"special": null,
"creation_date": "2015-05-19 05:56:21",
"modified_date": "2015-05-19 05:56:21",
"view_count": 74,
"comment_count": 23,
"play_count": 91
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit PlaylistPUT/music/playlist/edit
Edit a playlist-post.
To upload the photo of music, send the file in multipart / form-data
format with the photo
API request parameters.
To upload the songs file, send the files as an array of multipart / form-data
elements with the songs
API request parameters.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | My Favorite Songs | playlist title |
description |
yes | string | My Favorite Songs | playlist content |
search |
no | boolean | 1 | make playlist searchable (1 ) or not (0 ) |
auth_view |
yes | string | everyone | view authorization (everyone, owner_network, etc.) |
auth_comment |
yes | string | everyone | comment authorization (everyone, owner_network, etc.) |
Example URI
- playlist_id (required, integer, `playlist_id
string
(required) Default: 20`)playlist id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"title": "My Favorite Songs",
"description": "",
"auth_view": "everyone",
"auth_comment": "everyone"
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"description": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Playlist ¶
Delete PlaylistDELETE/music/playlist/delete
Delete a playlist-post.
Example URI
- playlist_id (required, integer, `playlist_id
string
(required) Default: 20`)playlist id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Rename Song TitlePOST/music/playlist/delete
Rename playlist song title.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Like a Rolling Stone | song title |
Example URI
- song_id (required, integer, `song_id
string
(required) Default: 20`)song id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"title": "Like a Rolling Stone"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Delete Song ¶
Delete SongDELETE/music/song/delete
Delete playlist song-post
Example URI
- song_id (required, integer, `song_id
string
(required) Default: 20`)song id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Increase Song Play Count ¶
Increase Song Play CountPOST/music/song/tally
Increase a song play count.
Example URI
- song_id (required, integer, `song_id
string
(required) Default: 20`)song id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"song_id": 12,
"playlist_id": 5,
"file_id": 188,
"title": "Like a Rolling Stone",
"play_count": 52,
"order": 0
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Move Song To Other Playlist ¶
Get FormGET/music/song/append
Get move song form
Example URI
- song_id (required, integer, `song_id
string
(required) Default: 20`)song id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Select",
"name": "playlist_id",
"label": "Choose Playlist",
"multiOptions": {
"0": "Create New Playlist",
"42": "My Playlist",
"74": "Test Playlist"
}
},
{
"type": "Text",
"name": "title",
"label": "Playlist Name"
},
{
"type": "Submit",
"name": "submit",
"label": "Add Song"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Move SongPUT/music/song/append
Move song to selected playlist. If not select any playlist then new playlist will be create with entered title name and song will be move to this newly created playlist.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
playlist_id |
no | integer | 0 | playlist id |
title |
yes | string | My Favorite Playlist | playlist title |
Example URI
- song_id (required, integer, `song_id
string
(required) Default: 20`)song id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"playlist_id": 0,
"title": "My Favorite Playlist"
}
200
Headers
Content-Type: application/json
Body
{
"playlist_id": 56,
"title": "My Favorite Playlist",
"description": "",
"photo_id": 0,
"owner_type": "user",
"owner_id": 1,
"search": 1,
"profile": 0,
"special": null,
"creation_date": "2015-06-19 06:52:42",
"modified_date": "2015-06-19 06:52:42",
"view_count": 0,
"comment_count": 0,
"play_count": 0,
"image": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_normal": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_profile": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"image_icon": "http://example.com/application/modules/Music/externals/images/nophoto_playlist_main.png",
"content_url": "http://example.com/music/28/my-music",
"owner_image": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_normal": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_profile": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"owner_image_icon": "http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"owner_title": "Zahid Khurshid",
"playlist_songs": [
{
"song_id": 13,
"playlist_id": 6,
"file_id": 188,
"title": "Aaj Dil Shayrana",
"play_count": 0,
"order": 0,
"filePath": "http://example.com/public/music_song/bc/00bc_82c8.mp3?c=f0f5"
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Polls Plugin ¶
These are the APIs for SocialEngine’s official Polls Plugin.
Browse Polls ¶
Browse PollsGET/polls{?search}
Get the polls listing. Polls can also be browsed and searched based on keywords, show, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of polls in response and use page
for the page number. [i.e: If you have 100 polls and the first request has limit=20
and page=1
, then in that case the recent 20 polls will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent polls will be returned.]
Example URI
- search
string
(optional) Example: search=californiaget polls that contain this keyword in title or description.
- show
integer
(optional) Example: show=2get polls of all users (
1
) or only of the member’s friends (2
).- closed
integer
(optional) Example: closed=1get open (closed=0) or closed (closed=1) poll listings.
- order
string
(optional) Example: order=recentget poll listings in the order of most recent (
recent
) or most popular (popular
).- user_id (optional, integer, `user_id
string
(required) Default: 125`)user id of profile owner. Default value is logged-in user’s ID.
- page
integer
(optional) Example: page=2return the ‘limit’ number of polls of that page of poll listings.
- limit
integer
(optional) Example: limit=20number of polls. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"canCreate": 1,
"totalItemCount": 2,
"response": [
{
"poll_id": 7,
"user_id": 1,
"is_closed": 0,
"title": "IT Hubs in California?",
"description": "IT Hubs in California?",
"creation_date": "2015-04-21 07:41:33",
"view_count": 10,
"comment_count": 8,
"vote_count": 1,
"search": 1,
"closed": 0,
"owner_image": "http://example.com/public/user/30/0030_636f.jpg",
"owner_title": "Bill Walsh",
"allow_to_view": 1
},
{
"poll_id": 3,
"user_id": 1,
"is_closed": 0,
"title": "How to save Earth?",
"description": "How to save Earth? to make it more green.",
"creation_date": "2015-04-21 05:35:39",
"view_count": 0,
"comment_count": 0,
"vote_count": 189,
"search": 11,
"closed": 0,
"owner_image": "http://example.com/public/user/30/0030_636f.jpg",
"owner_title": "Maggy Tyler",
"allow_to_view": 1
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Manage Polls ¶
Manage PollsGET/polls/manage
Get the polls of a member. Polls can also be browsed and searched based on keywords, show, etc.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of polls in response and use page
for the page number. [i.e: If you have 100 polls and the first request has limit=20
and page=1
, then in that case the recent 20 polls will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent polls will be returned.]
Example URI
- search
string
(optional) Example: search=californiaget polls that contain this keyword in title or description.
- show
integer
(optional) Example: show=2get polls of all users (
1
) or only of the member’s friends (2
).- closed
integer
(optional) Example: closed=1get open (closed=0) or closed (closed=1) poll listings.
- order
string
(optional) Example: order=recentget poll listings in the order of most recent (
recent
) or most popular (popular
).- page
integer
(optional) Example: page=2return the ‘limit’ number of polls of that page of poll listings.
- limit
integer
(optional) Example: limit=20number of polls. Default limit is 20.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"totalItemCount": 4,
"response": [
{
"poll_id": 7,
"user_id": 1,
"is_closed": 0,
"title": "IT Hubs in California?",
"description": "IT Hubs in California?",
"creation_date": "2015-04-21 07:41:33",
"view_count": 40,
"comment_count": 10,
"vote_count": 1,
"search": 1,
"closed": 0,
"owner_image": "http://example.com/public/user/30/0030_636f.jpg",
"owner_title": "Bill Walsh",
"allow_to_view": 1,
"menu": [
{
"label": "Edit Privacy",
"name": "edit_privacy",
"url": "polls/edit/7",
"urlParams": {}
},
{
"label": "Close Poll",
"name": "close_poll",
"url": "polls/close/7",
"urlParams": {
"closed": 0
}
},
{
"label": "Delete Poll",
"name": "delete_poll",
"url": "polls/delete/7",
"urlParams": {}
}
]
},
{
"poll_id": 3,
"user_id": 1,
"is_closed": 0,
"title": "How to save Earth?",
"description": "How to save Earth? to make it more green.",
"creation_date": "2015-04-21 05:35:39",
"view_count": 460,
"comment_count": 53,
"vote_count": 1234,
"search": 1,
"closed": 0,
"owner_image": "http://example.com/public/user/30/0030_636f.jpg",
"owner_title": "Maggy Tyler",
"allow_to_view": 1,
"menu": [
{
"label": "Edit Privacy",
"name": "edit_privacy",
"url": "polls/edit/3",
"urlParams": {}
},
{
"label": "Close Poll",
"name": "close_poll",
"url": "polls/close/3",
"urlParams": {
"closed": 0
}
},
{
"label": "Delete Poll",
"name": "delete_poll",
"url": "polls/delete/3",
"urlParams": {}
}
]
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Poll Search Form ¶
Poll Search FormGET/polls/search-form
Get the poll search form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "search",
"label": "Search Polls"
},
{
"type": "Select",
"name": "show",
"label": "Show",
"multiOptions": {
"1": "Everyone's Polls",
"2": "Only My Friends' Polls"
}
},
{
"type": "Select",
"name": "closed",
"label": "Status",
"multiOptions": {
"0": "Only Open Polls",
"1": "Only Closed Polls",
"": "All Polls"
}
},
{
"type": "Select",
"name": "order",
"label": "Browse By",
"multiOptions": {
"recent": "Most Recent",
"popular": "Most Popular"
}
}
]
Create Poll ¶
Get Poll Creation FormGET/polls/create
Get the poll creation form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "title",
"label": "Poll Title",
"maxlength": 63,
"hasValidator": true
},
{
"type": "Textarea",
"name": "description",
"label": "Description",
"hasValidator": true
},
{
"type": "Text",
"name": "options_1",
"label": "Possible Answers"
},
{
"type": "Text",
"name": "options_2",
"label": ""
},
{
"type": "Text",
"name": "options_3",
"label": ""
},
{
"type": "Text",
"name": "options_4",
"label": ""
}
{
"type": "Select",
"name": "auth_view",
"label": "Privacy",
"description": "Who may see this poll?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone"
},
{
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post comments on this poll?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone"
},
{
"type": "Checkbox",
"name": "search",
"label": "Show this poll in search results"
},
{
"type": "Submit",
"name": "submit",
"label": "Create Poll"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create PollPOST/polls/create
Create a new poll by posting the poll creation form.
In the Poll create form, you will get multiple poll answers option like options_1
, options_2
, option_3
etc, The number of possible poll answers options set by administrator. But poll owner must provide at least two poll answers option. [i.e: options_1
and options_2
]. It’s mandatory.
So after showing options_1
and options_2
, you may show the Add More
link and after click on it show next poll answers option accordingly as show on poll create form in browser.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | How to save Earth? | poll title |
description |
no | string | How to save Earth? to make it more green. | poll content |
options_1 |
yes | string | Plant Trees | first option |
options_2 |
yes | string | Save Trees | second option |
options_3 |
no | string | Save Water | third option |
auth_view |
yes | string | everyone | view authorization (everyone, owner_network, etc.) |
auth_comment |
yes | string | everyone | comment authorization (everyone, owner_network, etc.) |
search |
no | boolean | 1 | make poll searchable (1 ) or not (0 ) |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"title": "Best Foods?",
"description": "Best Foods",
"options_1": "Indian Food",
"options_2": "Chinese food",
"auth_view": "everyone",
"auth_comment": "everyone",
"search": "1"
}
200
Headers
Content-Type: application/json
Body
{
"gutterMenu": [
{
"label": "Share",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "poll",
"id": 370
}
}
],
"response": {
"poll_id": 370,
"user_id": 1,
"is_closed": 0,
"title": "Best Foods?",
"description": "Best Foods?",
"creation_date": "2015-04-21 07:41:33",
"view_count": 890,
"comment_count": 86,
"vote_count": 100,
"search": 1,
"closed": 0,
"owner_image": "http://example.com/public/user/30/0030_636f.jpg",
"owner_title": "Bill Walsh",
"options": [
{
"poll_option_id": 134,
"poll_id": 370,
"poll_option": "Indian Food",
"votes": 40,
"percentage": 40
},
{
"poll_option_id": 135,
"poll_id": 370,
"poll_option": "Chinese food",
"votes": 20,
"percentage": 20
},
{
"poll_option_id": 136,
"poll_id": 370,
"poll_option": "Thai Food",
"votes": 40,
"percentage": 40
}
],
"hasVoted": 16,
"showPieChart": "0",
"canVote": 1,
"canChangeVote": "1"
}
}
400
Body
{
"status_code":400,
"error":true,
"error_code":"validation_fail",
"message":{
"title":"Please complete this field - it is required.",
"options_1":"Please complete this field - it is required."
"options_2":"Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Poll Profile ¶
Poll ProfileGET/polls/view/{poll_id}
Get a poll post and its gutter menu’s (share, report, etc.) information.
Example URI
- poll_id
integer
(required) Example: 370poll id
- gutter_menu (optional, boolean, `gutter_menu
string
(required) Default: 1 OR 0`)get gutter menu’s array. Default valus is 1.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"gutterMenu": [
{
"label": "Share",
"name": "share",
"url": "activity/share",
"urlParams": {
"type": "poll",
"id": 370
}
}
],
"response": {
"poll_id": 370,
"user_id": 1,
"is_closed": 0,
"title": "Best Foods?",
"description": "Best Foods?",
"creation_date": "2015-04-21 07:41:33",
"view_count": 890,
"comment_count": 86,
"vote_count": 100,
"search": 1,
"closed": 0,
"owner_image": "http://example.com/public/user/30/0030_636f.jpg",
"owner_title": "Bill Walsh",
"options": [
{
"poll_option_id": 134,
"poll_id": 370,
"poll_option": "Indian Food",
"votes": 40,
"percentage": 40
},
{
"poll_option_id": 135,
"poll_id": 370,
"poll_option": "Chinese food",
"votes": 20,
"percentage": 20
},
{
"poll_option_id": 136,
"poll_id": 370,
"poll_option": "Thai Food",
"votes": 40,
"percentage": 40
}
],
"hasVoted": 16,
"showPieChart": "0",
"canVote": 1,
"canChangeVote": "1"
}
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: poll_id"
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Edit Poll ¶
Get Edit Poll FormGET/polls/edit/{poll_id}
Get the form for editing a poll-post.
Returns the form
and formValues
as response. In form
we get the complete poll form and in formValues
we get the form’s values.
Example URI
- poll_id
integer
(required) Example: 1340poll id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"form": [
{
"type": "Select",
"name": "auth_view",
"label": "Privacy",
"description": "Who may see this poll?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone"
},
{
"type": "Select",
"name": "auth_comment",
"label": "Comment Privacy",
"description": "Who may post comments on this poll?",
"multiOptions": {
"everyone": "Everyone",
"owner_network": "Friends and Networks",
"owner_member_member": "Friends of Friends",
"owner_member": "Friends Only",
"owner": "Just Me"
},
"value": "everyone"
},
{
"type": "Checkbox",
"name": "search",
"label": "Show this poll in search results"
},
{
"type": "Submit",
"name": "submit",
"label": "Create Poll"
}
],
"formValues": {
"poll_id": 73,
"user_id": 145,
"is_closed": 0,
"title": "Best Foods?",
"description": "Best Foods",
"creation_date": "2015-04-21 07:41:33",
"view_count": 540,
"comment_count": 84,
"vote_count": 1,
"search": 1,
"closed": 0,
"auth_view": "everyone",
"auth_comment": "everyone"
}
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: poll_id"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit PollPUT/polls/edit
Edit a poll-post.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
poll_id |
yes | integer | 754 | poll id |
auth_view |
yes | string | everyone | view authorization (everyone, owner_network, etc.) |
auth_comment |
yes | string | everyone | comment authorization (everyone, owner_network, etc.) |
search |
no | boolean | 1 | make search searchable (1 ) or not (0 ) |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"poll_id": 754,
"auth_view": "everyone",
"auth_comment": "everyone",
"search": "1"
}
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: poll_id"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Vote on Poll ¶
Vote on PollPOST/polls/vote/{poll_id}
vote on poll.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
option_id |
yes | integer | 31 | selected poll option id |
Example URI
- poll_id
integer
(required) Example: 47poll id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"option_id": 31
}
200
Headers
Content-Type: application/json
Body
[
{
"poll_option_id": 152,
"poll_id": 7,
"poll_option": "Germany",
"votes": 0,
"percentage": 0
},
{
"poll_option_id": 153,
"poll_id": 7,
"poll_option": "China",
"votes": 1,
"percentage": 100
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Poll ¶
Delete PollDELETE/polls/delete/{poll_id}
Delete a poll-post.
Example URI
- poll_id
integer
(required) Example: 48poll id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: poll_id"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Forums Plugin ¶
These are the APIs for SocialEngine’s official Forums Plugin.
Forum Listings ¶
Forum ListingsGET/forums
Get the forum listings.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
[
{
"category_id": 1,
"title": "General",
"description": "",
"creation_date": "2014-11-11 06:05:05",
"modified_date": "2014-11-11 06:05:05",
"order": 1,
"forum_count": 3,
"forums": [
{
"forum_id": 1,
"category_id": 1,
"title": "News and Announcements",
"description": "",
"creation_date": "2010-02-01 14:59:01",
"modified_date": "2015-05-06 10:04:27",
"order": 1,
"file_id": 0,
"view_count": 5,
"topic_count": 1,
"post_count": 2,
"lastpost_id": 24,
"lastposter_id": 3,
"slug": "news-and-announcements",
"image": "http://example.com/application/modules/Forum/externals/images/forum.png",
"allow_to_view": 1
},
{
"forum_id": 2,
"category_id": 1,
"title": "Support",
"description": "",
"creation_date": "2010-02-01 15:09:01",
"modified_date": "2010-02-01 17:59:01",
"order": 2,
"file_id": 0,
"view_count": 0,
"topic_count": 0,
"post_count": 0,
"lastpost_id": 0,
"lastposter_id": 0,
"slug": "support",
"image": "http://example.com/application/modules/Forum/externals/images/forum.png",
"allow_to_view": 1
},
{
"forum_id": 3,
"category_id": 1,
"title": "Suggestions",
"description": "",
"creation_date": "2010-02-01 15:09:01",
"modified_date": "2015-04-18 11:58:35",
"order": 3,
"file_id": 0,
"view_count": 33,
"topic_count": 3,
"post_count": 12,
"lastpost_id": 22,
"lastposter_id": 1,
"slug": "suggestions",
"image": "http://example.com/application/modules/Forum/externals/images/forum.png",
"allow_to_view": 1
}
]
},
{
"category_id": 2,
"title": "Off-Topic",
"description": "",
"creation_date": "2014-11-11 06:05:05",
"modified_date": "2014-11-11 06:05:05",
"order": 2,
"forum_count": 2,
"forums": [
{
"forum_id": 4,
"category_id": 2,
"title": "Off-Topic Discussions",
"description": "",
"creation_date": "2010-02-01 15:09:01",
"modified_date": "2015-04-18 10:50:45",
"order": 1,
"file_id": 0,
"view_count": 2,
"topic_count": 1,
"post_count": 2,
"lastpost_id": 20,
"lastposter_id": 1,
"slug": "off-topic-discussions",
"image": "http://example.com/application/modules/Forum/externals/images/forum.png",
"allow_to_view": 1
},
{
"forum_id": 5,
"category_id": 2,
"title": "Introduce Yourself",
"description": "",
"creation_date": "2010-02-01 15:09:01",
"modified_date": "2010-02-01 17:59:01",
"order": 2,
"file_id": 0,
"view_count": 0,
"topic_count": 0,
"post_count": 0,
"lastpost_id": 0,
"lastposter_id": 0,
"slug": "introduce-yourself",
"image": "http://example.com/application/modules/Forum/externals/images/forum.png",
"allow_to_view": 1
}
]
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Browse Forum Topics ¶
Browse Forum TopicsGET/forums/{forum_id}/{slug}
Get the browse forum topics listing.
Example URI
- forum_id
integer
(required) Example: 1forum id
- slug
string
(required) Example: news-and-announcementsforum slug
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"can_post":1,
"totalItemCount":1,
"response":[
{
"topic_id":5,
"forum_id":1,
"user_id":1,
"title":"Best of California..",
"description":"
<p>Best of California..</p>",
"creation_date":"2015-05-06 10:03:32",
"modified_date":"2015-05-06 10:04:27",
"sticky":0,
"closed":0,
"post_count":1,
"view_count":3,
"lastpost_id":24,
"lastposter_id":3,
"slug":"best_of_california",
"last_posted_by":{
"user_id":3,
"username":"jhonl",
"displayname":"John L",
"photo_id":0,
"status":null,
"status_date":null,
"locale":"English",
"language":"English",
"timezone":"US/Pacific",
"search":1,
"show_profileviewers":1,
"level_id":4,
"enabled":1,
"verified":1,
"approved":1,
"creation_date":"2014-12-30 06:15:12",
"modified_date":"2015-06-20 11:14:51",
"lastlogin_date":"2015-06-20 10:03:48",
"update_date":null,
"member_count":1,
"view_count":10,
"location":"",
"image":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url":"http://example.com/profile/michal"
},
"allow_to_view":1
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Get Member Forum Posts ¶
Get Member Forum PostsGET/members/profile/forum-posts
Get the member forum posts.
In case of pagination, we need to use 2 parameters limit
and page
. Use limit
to set the number of forums in response and use page
for the page number. [i.e: If you have 100 forums and the first request has limit=20
and page=1
, then in that case the recent 20 forums will be returned in response, and if limit=20
and page=2
is sent in request, then the next 20 recent forums will be returned.]
Example URI
- user_id (optional, integer, `user_id
string
(required) Default: 125`)user id of profile owner. Default value is logged-in user’s ID.
- page
integer
(optional) Example: page=2return the ‘limit’ number of forum posts of that page of forum posts listings.
- limit
integer
(optional) Example: limit=10number of forum posts. Default limit is 10.
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"0": {
"post": {
"post_id": 28,
"topic_id": 7,
"forum_id": 1,
"user_id": 3,
"body": "<p>Save Earth</p>",
"creation_date": "2015-07-22 06:54:35",
"modified_date": "2015-07-22 06:54:35",
"file_id": 0,
"edit_id": 0
},
"topic": {
"topic_id": 7,
"forum_id": 1,
"user_id": 3,
"title": "Save Earth",
"description": "<p>Save Earth</p>",
"creation_date": "2015-07-22 06:54:35",
"modified_date": "2015-07-22 06:54:35",
"sticky": 0,
"closed": 0,
"post_count": 1,
"view_count": 0,
"lastpost_id": 28,
"lastposter_id": 3
},
"forum": {
"forum_id": 1,
"category_id": 1,
"title": "News and Announcements",
"description": "",
"creation_date": "2010-02-01 14:59:01",
"modified_date": "2015-07-22 06:54:35",
"order": 1,
"file_id": 0,
"view_count": 27,
"topic_count": 2,
"post_count": 4,
"lastpost_id": 28,
"lastposter_id": 3
}
},
"totalItemCount": 1
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Create Forum Topic ¶
Get Forum Topic Creation FormGET/forums/{forum_id}/{slug}/topic-create
Get the forum topic creation form.
Example URI
- forum_id
integer
(required) Example: 1forum id
- slug
string
(required) Example: news-and-announcementsforum slug
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Text",
"name": "title",
"label": "Title",
"hasValidator": true
},
{
"type": "Textarea",
"name": "body",
"label": "Body",
"hasValidator": true
},
{
"type": "Checkbox",
"name": "watch",
"label": "Send me notifications when other members reply to this topic."
},
{
"type": "File",
"name": "photo",
"label": "Add Photo"
},
{
"type": "Submit",
"name": "submit",
"label": "Post Topic"
}
]
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Create Forum TopicPOST/forums/{slug}/topic-create
Create a new forum topic by posting the forum topic creation form.
To upload the forum topic photo, send the file in multipart / form-data
format with the photo
API request parameters.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Best of California | forum topic title |
body |
yes | string | Best of California | forum topic content |
watch |
no | boolean | 1 | send me notifications when other members post’s in this topic(watch=1) or no notification(watch=0) |
Example URI
- forum_id (required, integer, `forum_id
string
(required) Default: 1`)forum id
- slug
string
(required) Example: slug=news-and-announcementsforum slug
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"title": "Best of California",
"body": "Best of California",
"watch": 1
}
200
Headers
Content-Type: application/json
Body
{
"gutterMenu":[
{
"label":"",
"name":"post_reply",
"url":"forums/topic/6/best-of-california/post-create",
"urlParams":{
"topic_id":6,
"slug":"best-of-california"
}
},
{
"label":"",
"name":"stop_watch_topic",
"url":"forums/topic/6/best-of-california/watch",
"urlParams":{
"topic_id":6,
"slug":"best-of-california",
"watch":0
}
},
{
"label":"",
"name":"make_sticky",
"url":"forums/topic/6/best-of-california/sticky",
"urlParams":{
"topic_id":6,
"slug":"best-of-california",
"sticky":1
}
},
{
"label":"",
"name":"close",
"url":"forums/topic/6/best-of-california/close",
"urlParams":{
"topic_id":6,
"slug":"best-of-california",
"close":1
}
},
{
"label":"",
"name":"rename",
"url":"forums/topic/6/best-of-california/rename",
"urlParams":{
"topic_id":6,
"slug":"best-of-california"
}
},
{
"label":"",
"name":"move",
"url":"forums/topic/6/best-of-california/move",
"urlParams":{
"topic_id":6,
"slug":"best-of-california"
}
},
{
"label":"",
"name":"delete",
"url":"forums/topic/6/best-of-california/delete",
"urlParams":{
"topic_id":6,
"slug":"best-of-california"
}
}
],
"totalItemCount":2,
"response":[
{
"post_id":25,
"topic_id":6,
"forum_id":1,
"user_id":1,
"body":"Best of California",
"creation_date":"2015-07-06 11:09:13",
"modified_date":"2015-07-06 11:09:13",
"file_id":0,
"edit_id":0,
"posted_by":{
"user_id":1,
"username":"alenx",
"displayname":"Alen X",
"photo_id":0,
"status":"",
"status_date":"2015-06-12 05:02:34",
"locale":"fil_PH",
"language":"en_US",
"timezone":"Asia/Dubai",
"search":0,
"show_profileviewers":1,
"level_id":1,
"enabled":1,
"verified":1,
"approved":1,
"creation_date":"2014-11-11 06:00:28",
"modified_date":"2015-07-06 11:22:21",
"lastlogin_date":"2015-07-06 10:12:12",
"update_date":null,
"member_count":1,
"view_count":16,
"location":"",
"image":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url":"http://example.com/profile/michal",
"post_count":13,
"is_moderator":true
},
"menu":[
{
"label":"",
"name":"quote",
"url":"forums/topic/6/best-of-california/post-create",
"urlParams":{
"quote_id":25,
"topic_id":6
}
},
{
"label":"",
"name":"edit",
"url":"forums/post/25/edit",
"urlParams":{
"post_id":25
}
},
{
"label":"",
"name":"delete",
"url":"forums/post/25/delete",
"urlParams":{
"post_id":25
}
}
]
},
{
"post_id":26,
"topic_id":6,
"forum_id":1,
"user_id":1,
"body":"
<p>Yes.. I Agree</p>",
"creation_date":"2015-07-06 11:22:21",
"modified_date":"2015-07-06 11:22:21",
"file_id":0,
"edit_id":0,
"posted_by":{
"user_id":1,
"username":"alenx",
"displayname":"Alen X",
"photo_id":0,
"status":"",
"status_date":"2015-06-12 05:02:34",
"locale":"fil_PH",
"language":"en_US",
"timezone":"Asia/Dubai",
"search":0,
"show_profileviewers":1,
"level_id":1,
"enabled":1,
"verified":1,
"approved":1,
"creation_date":"2014-11-11 06:00:28",
"modified_date":"2015-07-06 11:22:21",
"lastlogin_date":"2015-07-06 10:12:12",
"update_date":null,
"member_count":1,
"view_count":16,
"location":"",
"image":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url":"http://example.com/profile/michal",
"post_count":13,
"is_moderator":true
},
"menu":[
{
"label":"",
"name":"quote",
"url":"forums/topic/6/best-of-california/post-create",
"urlParams":{
"quote_id":26,
"topic_id":6
}
},
{
"label":"",
"name":"edit",
"url":"forums/post/26/edit",
"urlParams":{
"post_id":26
}
},
{
"label":"",
"name":"delete",
"url":"forums/post/26/delete",
"urlParams":{
"post_id":26
}
}
]
}
]
}
400
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"title": "Please complete this field - it is required.",
"body": "Please complete this field - it is required."
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Forum Topic Profile ¶
Forum Topic ProfileGET/forums/topic/{topic_id}/{slug}
Get a forum topic post and its gutter menu’s (stop watching topic, make sticky, close, delete, etc.)
Example URI
- topic_id
integer
(required) Example: 6forum topic id
- slug
string
(required) Example: best_of_californiaforum topic slug
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"gutterMenu":[
{
"label":"",
"name":"post_reply",
"url":"forums/topic/6/best-of-california/post-create",
"urlParams":{
"topic_id":6,
"slug":"best-of-california"
}
},
{
"label":"",
"name":"stop_watch_topic",
"url":"forums/topic/6/best-of-california/watch",
"urlParams":{
"topic_id":6,
"slug":"best-of-california",
"watch":0
}
},
{
"label":"",
"name":"make_sticky",
"url":"forums/topic/6/best-of-california/sticky",
"urlParams":{
"topic_id":6,
"slug":"best-of-california",
"sticky":1
}
},
{
"label":"",
"name":"close",
"url":"forums/topic/6/best-of-california/close",
"urlParams":{
"topic_id":6,
"slug":"best-of-california",
"close":1
}
},
{
"label":"",
"name":"rename",
"url":"forums/topic/6/best-of-california/rename",
"urlParams":{
"topic_id":6,
"slug":"best-of-california"
}
},
{
"label":"",
"name":"move",
"url":"forums/topic/6/best-of-california/move",
"urlParams":{
"topic_id":6,
"slug":"best-of-california"
}
},
{
"label":"",
"name":"delete",
"url":"forums/topic/6/best-of-california/delete",
"urlParams":{
"topic_id":6,
"slug":"best-of-california"
}
}
],
"totalItemCount":2,
"response":[
{
"post_id":25,
"topic_id":6,
"forum_id":1,
"user_id":1,
"body":"Best of California",
"creation_date":"2015-07-06 11:09:13",
"modified_date":"2015-07-06 11:09:13",
"file_id":0,
"edit_id":0,
"posted_by":{
"user_id":1,
"username":"alenx",
"displayname":"Alen X",
"photo_id":0,
"status":"",
"status_date":"2015-06-12 05:02:34",
"locale":"fil_PH",
"language":"en_US",
"timezone":"Asia/Dubai",
"search":0,
"show_profileviewers":1,
"level_id":1,
"enabled":1,
"verified":1,
"approved":1,
"creation_date":"2014-11-11 06:00:28",
"modified_date":"2015-07-06 11:22:21",
"lastlogin_date":"2015-07-06 10:12:12",
"update_date":null,
"member_count":1,
"view_count":16,
"location":"",
"image":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url":"http://example.com/profile/michal",
"post_count":13,
"is_moderator":true
},
"menu":[
{
"label":"",
"name":"quote",
"url":"forums/topic/6/best-of-california/post-create",
"urlParams":{
"quote_id":25,
"topic_id":6
}
},
{
"label":"",
"name":"edit",
"url":"forums/post/25/edit",
"urlParams":{
"post_id":25
}
},
{
"label":"",
"name":"delete",
"url":"forums/post/25/delete",
"urlParams":{
"post_id":25
}
}
]
},
{
"post_id":26,
"topic_id":6,
"forum_id":1,
"user_id":1,
"body":"
<p>Yes.. I Agree</p>",
"creation_date":"2015-07-06 11:22:21",
"modified_date":"2015-07-06 11:22:21",
"file_id":0,
"edit_id":0,
"posted_by":{
"user_id":1,
"username":"alenx",
"displayname":"Alen X",
"photo_id":0,
"status":"",
"status_date":"2015-06-12 05:02:34",
"locale":"fil_PH",
"language":"en_US",
"timezone":"Asia/Dubai",
"search":0,
"show_profileviewers":1,
"level_id":1,
"enabled":1,
"verified":1,
"approved":1,
"creation_date":"2014-11-11 06:00:28",
"modified_date":"2015-07-06 11:22:21",
"lastlogin_date":"2015-07-06 10:12:12",
"update_date":null,
"member_count":1,
"view_count":16,
"location":"",
"image":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url":"http://example.com/profile/michal",
"post_count":13,
"is_moderator":true
},
"menu":[
{
"label":"",
"name":"quote",
"url":"forums/topic/6/best-of-california/post-create",
"urlParams":{
"quote_id":26,
"topic_id":6
}
},
{
"label":"",
"name":"edit",
"url":"forums/post/26/edit",
"urlParams":{
"post_id":26
}
},
{
"label":"",
"name":"delete",
"url":"forums/post/26/delete",
"urlParams":{
"post_id":26
}
}
]
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Forum Topic ¶
Delete Forum TopicDELETE/forums/topic/{topic_id}/{slug}/delete
Delete a forum topic-post.
Example URI
- topic_id
integer
(required) Example: 6forum topic id
- slug
string
(required) Example: best_of_californiaforum topic slug
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Make Sticky / Remove Sticky ¶
Make Sticky / Remove StickyPOST/forums/topic/{topic_id}/{slug}/sticky
Make forum topic sticky or remove sticky.
Example URI
- topic_id
integer
(required) Example: 6forum topic id
- slug
string
(required) Example: best_of_californiaforum topic slug
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Open / Close ¶
Open / ClosePOST/forums/topic/{topic_id}/{slug}/close
Make forum topic open or close.
Example URI
- topic_id
integer
(required) Example: 6forum topic id
- slug
string
(required) Example: best_of_californiaforum topic slug
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Watch Topic / Stop Watching Topic ¶
Watch Topic / Stop Watching TopicPOST/forums/topic/{topic_id}/{slug}/watch
Watch forum topic or stop watching forum topic.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
watch |
no | boolean | 0 | watch topic (1 ) or not (0 ). Default value is 1. |
Example URI
- topic_id
integer
(required) Example: 6forum topic id
- slug
string
(required) Example: best_of_californiaforum topic slug
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"watch": 1
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Rename Forum Topic ¶
Get Forum Topic Rename FormGET/forums/topic/{topic_id}/{slug}/rename
Get the forum topic rename form
Returns the form
and formValues
as response. In form
we get the complete rename topic form and in formValues
we get the form’s values.
Example URI
- topic_id
integer
(required) Example: 6forum topic id
- slug
string
(required) Example: best_of_californiaforum topic slug
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"form": [
{
"type": "Text",
"name": "title",
"label": ""
},
{
"type": "Submit",
"name": "submit",
"label": ""
}
],
"formValues": {
"title": "Best of California"
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Rename Forum TopicPUT/forums/topic/{slug}/rename
Rename a forum topic-post.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
title |
yes | string | Best of California | forum topic title |
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 6`)forum topic id
- slug
string
(required) Example: slug=best_of_californiaforum topic slug
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"title": "Best of California"
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Move Topic to Forum ¶
Get FormGET/forums/topic/{topic_id}/{slug}/move
Get the form of move topic to forum.
Returns the form
and formValues
as response. In form
we get the complete move topic form and in formValues
we get the form’s values.
Example URI
- topic_id
integer
(required) Example: 6forum topic id
- slug
string
(required) Example: best_of_californiaforum topic slug
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"form": [
{
"type": "Select",
"name": "forum_id",
"label": "",
"multiOptions": {
"1": "News and Announcements",
"2": "Support",
"3": "Suggestions",
"4": "Off-Topic Discussions",
"5": "Introduce Yourself"
}
},
{
"type": "Submit",
"name": "submit",
"label": ""
}
],
"formValues": {
"forum_id": 1
}
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Move Topic to ForumPOST/forums/topic/{slug}/move
Move topic to forum by posting the form.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
forum_id |
yes | integer | 3 | forum id |
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 6`)forum topic id
- slug
string
(required) Example: slug=best_of_californiaforum topic slug
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"forum_id": 3
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Topic Post's Reply ¶
Get Topic Post's FormGET/forums/topic/{topic_id}/{slug}/post-create
Get the topic post’s reply form.
Example URI
- topic_id
integer
(required) Example: 6forum topic id
- slug
string
(required) Example: best_of_californiaforum topic slug
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"response": [
{
"type": "Textarea",
"name": "body",
"label": ""
},
{
"type": "Checkbox",
"name": "watch",
"label": ""
},
{
"type": "File",
"name": "photo",
"label": ""
},
{
"type": "Submit",
"name": "submit",
"label": ""
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Topic Post's ReplyPOST/forums/topic/{slug}/post-create
Post’s reply by posting the topic post’s form.
To upload the forum topic photo, send the file in multipart / form-data
format with the photo
API request parameters.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
body |
yes | string | Yes… got it!! | reply content |
watch |
no | boolean | 1 | watch topic (watch=1) or not (watch=0). Default value is 1. |
Example URI
- topic_id (required, integer, `topic_id
string
(required) Default: 6`)forum topic id
- slug
string
(required) Example: slug=best_of_californiaforum topic slug
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"body": "Yes.. got it!!",
"watch": 1
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit Topic Post's Reply ¶
Get Topic Post's FormGET/forums/post/{post_id}/edit
Get the forum topic post’s form.
Returns the form
and formValues
as response. In form
we get the complete forum post form and in formValues
we get the form’s values.
Example URI
- post_id
integer
(required) Example: 27topic post id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
{
"formValues": {
"post_id": 27,
"topic_id": 6,
"forum_id": 1,
"user_id": 1,
"body": "Yes.. got it!!",
"creation_date": "2015-07-06 12:09:45",
"modified_date": "2015-07-06 12:09:45",
"file_id": 348,
"edit_id": 0
},
"form": [
{
"type": "Textarea",
"name": "body",
"label": ""
},
{
"type": "Checkbox",
"name": "photo_delete",
"label": ""
},
{
"type": "Submit",
"name": "submit",
"label": ""
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Edit Topic Post's ReplyPUT/forums/post/edit
Edit a forum topic post’s.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
body |
no | string | Best of California | post content |
photo_delete |
no | boolean | 1 | delete posted photo (1 ) or not delete (0 ) |
Example URI
- post_id (required, integer, `post_id
string
(required) Default: 27`)topic post id
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"body": "Best of California",
"photo_delete": 1,
}
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Delete Post ¶
Delete PostDELETE/forums/post/{post_id}/delete
Delete a forum topic post.
Example URI
- post_id
integer
(required) Example: 26topic post id
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
204
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
404
Body
{
"status_code": 404,
"error": true,
"error_code": "no_record",
"message": "No record found"
}
Miscellaneous ¶
These are miscellaneous APIs for various things like enabled modules, global search, share, report, get user information array, etc.
Get Enable Modules ¶
Get Enable ModulesGET/get-enabled-modules
Get the list of enable modules.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
[
"blog",
"classified",
"group",
"event",
"album",
"forum",
"poll",
"video",
"music",
"advancedactivity",
"sitetagcheckin"
]
Content Report ¶
Get Content Report FormGET/report/create
Get the content report form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
200
Headers
Content-Type: application/json
Body
[
{
"type": "Select",
"name": "category",
"label": "Type",
"multiOptions": {
"": "(select)",
"spam": "Spam",
"abuse": "Abuse",
"inappropriate": "Inappropriate Content",
"licensed": "Licensed Material",
"other": "Other"
},
"hasValidator": true
},
{
"type": "Textarea",
"name": "description",
"label": "Description",
"hasValidator": true
},
{
"type": "Submit",
"name": "submit",
"label": "Submit Report"
}
]
Content ReportPOST/report/create
Report of a content by posting the content report form.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
type |
no | string | blog | item type |
id |
no | integer | 24 | item id |
category |
yes | string | abuse | category |
description |
yes | string | not good content!! | report description |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
oauth_token: 276ed9327d0478c2606adea438f4fd15
oauth_secret: ffaff6754b5d4ca5f2fc4cc2a3a75478
Body
{
"type": "blog",
"id": 24,
"category": "abuse",
"description": "not good content!!",
}
204
400
Headers
Content-Type: application/json
Body
{
"status_code": 400,
"error": true,
"error_code": "validation_fail",
"message": {
"category": "Please complete this field - it is required.",
"description": "Please complete this field - it is required."
}
}
Global Search ¶
Get Global Search FormGET/search
Get the global search form.
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
{
"form": [
{
"type": "Text",
"name": "query"
},
{
"type": "Select",
"name": "type",
"multiOptions": {
"album": "",
"album_photo": "",
"blog": "",
"classified": "",
"classified_album": "",
"core_link": "",
"event": "",
"forum": "",
"forum_category": "",
"forum_post": "",
"forum_topic": "",
"group": "",
"group_photo": "",
"group_post": "",
"group_topic": "",
"music_playlist": "",
"music_playlist_song": "",
"poll": "",
"user": "",
"video": ""
}
},
{
"type": "Submit",
"name": "submit",
"label": ""
}
]
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Global SearchPOST/search
Global search by posting the global search form.
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
query |
no | string | my photos | search text |
type |
no | string | album | search type |
Example URI
valid
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
Body
{
"query": "my photos",
"type": "album"
}
401
Body
{
"status_code": 401,
"error": true,
"error_code": "unauthorized",
"message": "User does not have access to this resource."
}
Get Users Information ¶
Get Users InformationGET/members/index/get-lists
Get the user information, respective to the user ids
Parameter | Required | Type | Example | Description |
---|---|---|---|---|
userIds |
yes | string | 12,52,43 | user ids |
Example URI
Headers
Accept: application/json
oauth_consumer_key: e6a5845684bf49df63d9eef489acfee1
oauth_consumer_secret: 42b9eef48e96c65f9ca29d07712d39fb
200
Headers
Content-Type: application/json
Body
[
{
"image":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url":"http://example.com/profile/michal",
},
{
"user_id":3,
"username":"test2",
"displayname":"Test 2",
"photo_id":0,
"status":null,
"status_date":null,
"locale":"English",
"language":"English",
"timezone":"US/Pacific",
"search":1,
"show_profileviewers":1,
"level_id":4,
"enabled":1,
"verified":1,
"approved":1,
"creation_date":"2014-12-30 06:15:12",
"modified_date":"2015-06-20 11:14:51",
"lastlogin_date":"2015-06-20 10:03:48",
"update_date":null,
"member_count":1,
"view_count":10,
"location":"",
"image":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_normal":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_profile":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_profile.png",
"image_icon":"http://example.com/application/modules/User/externals/images/nophoto_user_thumb_icon.png",
"content_url":"http://example.com/profile/michal",
}
]
400
Body
{
"status_code": 400,
"error": true,
"error_code": "parameter_missing",
"message": "Missing Parameters: userIds"
}