GET comment
Get data of one comment object.
Parameters
Parameters | Detail |
---|---|
format optional |
Specifies returned data format Accepted value: "json", "xml" |
Resource Information
Authentication
: See Access Permission
HTTP Methods
: GET
Request URL Format
: https://{api_domain}/api3/comment
Access Permission
Access to data varies based on system settings and requester roles. See Oauth 2.0 for details on authentication.
Private WebStorms: Requester must authenticate to get data.
Public WebStorms: No authentication required to get data.
Errors
- Invalid object ID or you don't have access to this object
Example Request
- Method: GET
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
URL:
https://example.brightidea.com/api3/comment/8083607B-635E-459B-BF5D-44FA93AD2600
{ "comment": { "id": "8083607B-635E-459B-BF5D-44FA93AD2600", "date_created": "2013-05-01 17:20:39.460", "text": "test from sharepoint", "member": { "id": "0D5E31E8-42E9-496F-B14A-47BB0EEBF0FD", "email": "jdoe@example.com", "screen_name": "John Doe", "first_name": "John", "last_name": "Doe", "job_title": "Sales", "address": "123 fake street", "phone": "(123) 456-789", "mobile_phone": "(987) 654-3210", "external_user_id": "", "skills": "Selling Software", "work_history": "Worked at sales.com", "date_created": "2012-04-27 14:57:14.710", "active": true }, "idea": { "id": "CAA46BF2-15D7-4A7D-BF99-8383705CA0A7", "date_created": "2013-04-17 14:35:21.450", "date_modified": "2013-05-22 15:24:09.977", "title": "Test Idea Title", "description": "Test Idea Description.", "visible": true, "anonymous": false, "idea_code": "D432", "campaign": { "id": "1F93FD4F-F06D-456A-AFE9-825CE9B591F2", "name": "Going Green Challenge", "description": "This campaign is for Going Green Challenge ", "date_created": "2012-04-25 10:26:03.557" } }, "attachment": { "id": "6443995A-685D-4B81-9C54-40179D840D0C", "reference_id": "1B3E0D23-3C13-429E-ADA7-58770EDC3302", "extension": "jpg", "original_filename": "example.jpg", "grouping": "COMMENT", "url": "https://example.brightideatest.com/api3/file/6443995A-685D-4B81-9C54-40179D840D0C?format=binary", "type": "image/jpeg" } } }
LIST comment
Get data on a list of comment objects. Objects are order by created date descending by default.
On retrieving large set of data, requester should use pagination parameters such as page
and page_size
to manage multiple requests.
Parameters
Parameters | Detail |
---|---|
idea_id optional |
Filter return by idea ID Sample value: "11111111-1111-1111-1111-111111111111" |
text optional |
Filter return by comment text Sample value: "This is a great comment" |
date_created optional |
Filter return by comment created date. Response contains all comments created within the 24 hours of the specified date Sample value: "12/06/2009" |
member_id optional |
Filter return by ID of comment submitter Sample value: "11111111-1111-1111-1111-111111111111" |
page_size optional |
Specifies number of records returns per page. Default: 20. Minimum: 1. Maximum: 100 Sample value: 50 |
page optional |
Specifies which page of records to return. Default: 1. Minimum: 1. Maximum: {page_count} Sample value: 5 |
order optional |
A SQL style string that specifies the order the records should return in Sample value: "date_created ASC, idea_code DESC" Accepted attributes: "idea_id", "member_id", "parent_id", "date_created" |
format optional |
Specifies returned data format Accepted value: "json", "xml" |
Resource Information
Authentication
: See Access Permission
HTTP Methods
: GET
Request URL Format
: https://{api_domain}/api3/comment
Access Permission
Access to data varies base on system setting and requester roles. See Oauth 2.0 for details on authentication.
Private WebStorms: Requester must authenticate to get data.
Public WebStorms: No authentication required to get data.
Requster Role: Some response attributes are accessible base on the requester's role.
- Hidden comment count: hidden comments are included in count for Admin only
Errors
- Invalid object ID or you don't have access to this object
Example Request
- Method: GET
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
URL:
https://example.brightidea.com/api3/comment?page_size=2&page=4&order=date_created
{ "comment_list": [ { "id": "06C42FE0-9AFE-4680-9110-15F1E348C2BA", "date_created": "2013-05-20 13:49:53.507", "text": "This is a test comment", "replies": [], "member": { "id": "F7C06FC4-634B-4F64-9AF6-643602BB9B93", "email": "jdoe@example.com", "screen_name": "John Doe", "first_name": "John", "last_name": "Doe", "job_title": "Sales", "address": "123 fake street", "phone": "(123) 456-789", "mobile_phone": "(987) 654-3210", "external_user_id": "", "skills": "Selling Software", "work_history": "Worked at sales.com", "photo_url": "https://example.brightideatest.com/api3/file/CCBCC6A7-98C9-48E1-92F3-0C05AAC78863?format=binary&thumb_size=100", "date_created": "2011-10-19 18:36:16.603", "date_modified": "2012-03-17 20:34:38.420", "active": true, "photo_file_id": "1EC9065D-82FA-4C55-9B7F-48FEE94E6C31", "department": "Sales" }, "idea": { "id": "61C2E6C7-09A5-4F63-8969-4E09AB786BAA", "date_created": "2013-05-20 13:49:04.077", "date_modified": "2013-05-20 13:58:06.190", "title": "Test Idea Title", "description": "Test Idea Description.", "visible": true, "anonymous": false, "idea_code": "D3258", "campaign": { "id": "31AA7A65-AA33-4FB5-97F4-8063AD06ADD6", "name": "Going Green Challenge", "description": "This webstorm is for Going Green Challenge", "date_created": "2011-06-03 21:08:53.370" } }, "attachment": { "id": "6443995A-685D-4B81-9C54-40179D840D0C", "reference_id": "1B3E0D23-3C13-429E-ADA7-58770EDC3302", "extension": "jpg", "original_filename": "example.jpg", "grouping": "COMMENT", "url": "https://example.brightideatest.com/api3/file/6443995A-685D-4B81-9C54-40179D840D0C?format=binary", "type": "image/jpeg" } }, { "id": "AB7C9D04-6257-4648-A19D-7184D69D3D46", "date_created": "2013-05-20 13:34:46.067", "text": "Another Test Comment", "replies": [], "member": { "id": "F7C06FC4-634B-4F64-9AF6-643602BB9B93", "email": "mpower@example.com", "screen_name": "Max Power", "first_name": "Max", "last_name": "Power", "job_title": "Safety Inspector", "address": "742 Evergreen Terrace, Springfield, IL", "phone": "(123)456-7890", "mobile_phone": "(987)654-3210", "external_user_id": "0072", "skills": "Boxer, Mascot, Astronaut, Baby proofer, Truck driver, Hippie, Plow Driver, Food Critic", "work_history": "Conceptual Artist, Mayor, Country Western Manager, Garbage Commissioner, Mountain Climber", "photo_url": "https://example.brightideatest.com/api3/file/CCBCC6A7-98C9-48E1-92F3-0C05AAC78863?format=binary&thumb_size=100", "date_created": "2011-10-19 18:36:16.603", "date_modified": "2012-03-17 20:34:38.420", "active": true, "photo_file_id": "1EC9065D-82FA-4C55-9B7F-48FEE94E6C31", "department": "Safety" }, "idea": { "id": "FD76F6A1-7FA9-4F58-8C73-33A0809E9D68", "date_created": "2012-01-19 16:55:01.260", "date_modified": "2013-05-20 13:34:48.550", "title": "Sample Idea Title", "description": "<p>Sample Idea Description.</p>", "visible": true, "anonymous": false, "idea_code": "D486", "campaign": { "id": "31AA7A65-AA33-4FB5-97F4-8063AD06ADD6", "name": "Going Green Challenge", "description": "This webstorm is for Going Green Challenge", "date_created": "2011-06-03 21:08:53.370" } } } ], "stats": { "total": "21738", "page_count": 1087, "current_page": 4 } }
CREATE comment
Create a comment object.
Requester must have access to the Campaign in order to create an comment in it.
Parameters
Parameters | Detail |
---|---|
comment required |
This is the title of the comment. Minimum 1 character, maximum 100 characters. String will be truncated if length exceeds maximum Sample value: "Test comment text" |
idea_id required |
This is the ID of the idea Sample value: "11111111-1111-1111-1111-111111111111" |
comment_id optional |
This is the ID of the parent comment Sample value: "11111111-1111-1111-1111-111111111111" |
attachment optional |
This is the attachment of the comment. Multiple files can be attached to comment. Request accepts file object. Maximum 7 MB. Accepted format: jpg, gif, bmp, png, jpeg, doc, docx, xls, xlsx, ppt, pptx, pdf, avi, wmv, mov, flv, csv, zip |
Resource Information
Authentication
: Required. See Oauth 2.0 for details on authentication.
HTTP Methods
: POST
Request URL Format
: https://{api_domain}/api3/comment
Access Permission
Requester must have access to the Campaign in order to create a comment in it. See Oauth 2.0 for details on authentication.
Errors
- Idea ID is required for creating comment
- You don't have permission for this campaign
- {parameter} must be more than {minimum_length} characters
- {parameter} must be less than {maximum_length} characters
- Invalid {parameter} received
- Missing required parameter
Example Request
- Method: POST
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
- URL:
https://example.brightidea.com/api3/comment
Form data:
- comment=This is a test comment
- idea_id=627E43D5-5137-4B33-8C0E-85F6CC70CB4B
{ "comment": { "id": "2DF4666E-DF74-4706-B000-CA4E41779B7C", "date_created": "2013-05-20 15:46:58.640", "text": "This is a test comment", "member": { "id": "1F11CEBB-1BED-419D-9615-AFBDDF5AEA02", "email": "jdoe@example.com", "screen_name": "John Doe", "first_name": "John", "last_name": "Doe", "job_title": "Sales", "address": "Mercer India Private Limited 5th - 9th Floor Building 14A Sector 24 - 25 DLF Cyber City Gurgaon 12", "phone": "(123) 456-789", "mobile_phone": "(987) 654-3210", "external_user_id": "12345", "skills": "Selling Software", "work_history": "Worked at sales.com", "photo_url": "https://example.brightideatest.com/api3/file/CCBCC6A7-98C9-48E1-92F3-0C05AAC78863?format=binary&thumb_size=100", "date_created": "2011-05-03 13:40:46.750", "date_modified": "2013-04-01 18:05:08.587", "active": true, "photo_file_id": "F82636BA-F658-4268-8184-ABA4D6685AA0", "department": "23" }, "idea": { "id": "627E43D5-5137-4B33-8C0E-85F6CC70CB4B", "date_created": "2013-05-01 16:03:51.953", "date_modified": "2013-05-20 15:46:58.787", "title": "Test Idea Title", "description": "Test Idea Description.", "visible": true, "anonymous": false, "idea_code": "D439", "campaign": { "id": "B2E840AE-2FE5-47A8-9CE3-C496E241F400", "name": "Going Green Challenge", "description": "This webstorm is for Going Green Challenge", "date_created": "2013-05-01 15:51:32.263" } } } }
UPDATE comment
Update a comment.
Function updates only value of parameters passed through request. To empty out an attribute, pass parameter with blank value.
Parameters
Parameters | Detail |
---|---|
comment required |
This is the text of the comment. Minimum 1 character, maximum 100 characters. String will be truncated if length exceeds maximum Sample value: "This is a sample comment" |
Resource Information
Authentication
: Required. See Oauth 2.0 for details on authentication.
HTTP Methods
: PUT
Request URL Format
: https://{api_domain}/api3/comment/{id}
Access Permission
Authentication is required for UPDATE comment. See Oauth 2.0 for details on authentication.
Requester's ability to update an comment is dependent on campaign comment setting.
Errors
- You don't have permission for this campaign
- {parameter} must be more than {minimum_length} characters
- {parameter} must be less than {maximum_length} characters
- Invalid {parameter} received
- Missing required parameter
Example Request
- Method: PUT
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
- URL:
https://example.brightidea.com/api3/comment/2666DAB1-1125-4393-8AF7-753FBEFBA148
Form data:
- comment=This is a sample comment
{ "comment": { "id": "2DF4666E-DF74-4706-B000-CA4E41779B7C", "date_created": "2013-05-20 15:46:58.640", "text": "This is a sample comment", "member": { "id": "1F11CEBB-1BED-419D-9615-AFBDDF5AEA02", "email": "jdoe@example.com", "screen_name": "John Doe", "first_name": "John", "last_name": "Doe", "job_title": "Sales", "address": "Mercer India Private Limited 5th - 9th Floor Building 14A Sector 24 - 25 DLF Cyber City Gurgaon 12", "phone": "(123) 456-789", "mobile_phone": "(987) 654-3210", "external_user_id": "12345", "skills": "Selling Software", "work_history": "Worked at sales.com", "photo_url": "https://example.brightideatest.com/api3/file/CCBCC6A7-98C9-48E1-92F3-0C05AAC78863?format=binary&thumb_size=100", "date_created": "2011-05-03 13:40:46.750", "date_modified": "2013-04-01 18:05:08.587", "active": true, "photo_file_id": "F82636BA-F658-4268-8184-ABA4D6685AA0", "department": "23" }, "idea": { "id": "627E43D5-5137-4B33-8C0E-85F6CC70CB4B", "date_created": "2013-05-01 16:03:51.953", "date_modified": "2013-05-20 15:46:58.787", "title": "Test Idea Title", "description": "Test Idea Description.", "visible": true, "anonymous": false, "idea_code": "D439", "campaign": { "id": "B2E840AE-2FE5-47A8-9CE3-C496E241F400", "name": "Going Green Challenge", "description": "This webstorm is for Going Green Challenge", "date_created": "2013-05-01 15:51:32.263" } } } }
DELETE comment
Delete a comment object. Requester must be an Admin.
Parameters
Parameters | Detail |
---|---|
format optional |
Specifies returned data format Accepted value: "json", "xml" |
Resource Information
Authentication
: RequiredHTTP Methods
: DELETERequest URL Format
: https://{api_domain}/api3/comment/{id}
Access Permission
Requester must be an Admin.
Errors
- Invalid GUID received
Example Request
- Method: DELETE
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
URL:
https://example.brightidea.com/api3/comment/8B3E8DFF-83B3-403D-BB69-28223F418676
{ "message": "success", "code": 200 }
FAQ
Question: LIST comment only return 100 objects maximum per request. How do I retrieve more results.
Answer: LIST comment response is automatically paginated. If you got 100 comment objects in the initial request, pass "page_size=100&page=2" to get the next 100. page_count
is returned with every LIST request so your application can figure out when it hits the last page.