GET update
Get data of one update object.
Parameters
Parameters | Detail |
---|---|
with optional |
Returns sub-object or count of sub-objects relating to the update. If sub-object is requested, response will return the first 20 records Accepted value: "comment_count", "coumments" |
format optional |
Specifies returned data format Accepted value: "json", "xml" |
Resource Information
Authentication
: See Access Permission for GET update
HTTP Methods
: GET
Request URL Format
: https://{api_domain}/api3/update/{id}
Access Permission
Access to update data varies base on system setting. See Authentication for detail 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/update//9B061C43-4E80-498C-B41E-4482C21632F7?with=comment_count,comments
{ "update": { "id": "9B061C43-4E80-498C-B41E-4482C21632F7", "message": "Test Update to be commented on", "date_created": "2013-04-18 14:51:41.270", "video_link": null, "member": { "id": "8FA49B96-3693-4282-8919-014618D7B3B8", "screen_name": "Lillian Smith", "first_name": "Lillian", "last_name": "Smith", "job_title": "", "address": "", "phone": "", "mobile_phone": "", "external_user_id": null, "skills": "", "work_history": "", "photo_url": "", "date_created": "2013-03-07 17:10:13.627", "date_modified": "2013-04-16 15:42:16.430" }, "comments": [ { "id": "9D4C13A3-BBA7-43D9-A450-24C66816511B", "comment": "Here is my comment", "date_created": "2013-04-18 14:51:53.783", "update_id": "9B061C43-4E80-498C-B41E-4482C21632F7", "member": { "id": "866144B1-E302-42EF-AF80-75DE988885AE", "email": "jdoe@brightidea.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": null, "skills": "Selling Software", "work_history": "Worked at sales.com", "photo_url": "https://example.brightideatest.com/api3/file/02F11D0E-BA74-4A7D-B1BE-4F7F651B2507?format=binary&thumb_size=100", "date_created": "2013-03-07 19:09:54.563", "date_modified": "2013-04-18 13:14:21.067", "active": true, "photo_file_id": "02F11D0E-BA74-4A7D-B1BE-4F7F651B2507" } } ], "comment_count": 1 } }
LIST update
Get data on a list of update 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 |
---|---|
id optional |
Filter return by update ID Sample value: "11111111-1111-1111-1111-111111111111" |
date_created optional |
Filter return by update created date. Response contains all ideas created within the 24 hours of the specified date Sample value: "12/06/2009" |
member_id optional |
Filter return by ID of update creator Sample value: "11111111-1111-1111-1111-111111111111" |
campaign_id optional |
Filter return by ID of a campaign 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". Accepted attributes: "id", "date_created" |
with optional |
Returns sub-object or count of sub-objects relating to the member. If sub-object is requested, response will return the first 20 records Accepted value: "comment_count" |
format optional |
Specifies returned data format Accepted value: "json", "xml" |
Resource Information
Authentication
: See Access Permission for LIST update
HTTP Methods
: GET
Request URL Format
: https://{api_domain}/api3/update
Access Permission
Access to update data varies base on system setting. See Authentication for detail 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/update?campaign_id=0A140858-AD8A-4F97-9926-D80AD156A130&with=comment_count
{ "update_list": [ { "id": "6E9A73CC-03DA-463D-9BD9-322FB7875772", "message": "Update 2 in Sample Campaign", "date_created": "2013-04-19 13:40:42.240", "video_link": null, "member": { "id": "8FA49B96-3693-4282-8919-014618D7B3B8", "screen_name": "Lillian Smith", "first_name": "Lillian", "last_name": "Smith", "job_title": "", "address": "", "phone": "", "mobile_phone": "", "external_user_id": null, "skills": "", "work_history": "", "photo_url": "", "date_created": "2013-03-07 17:10:13.627", "date_modified": "2013-04-16 15:42:16.430" }, "campaign": { "id": "0A140858-AD8A-4F97-9926-D80AD156A130", "name": "Sample Campaign", "description": "Sample Campaign Description", "date_created": "2013-03-07 17:10:38.107" }, "attachment": { "id": "DC31D645-A0B2-444E-9187-34048CFB16CE", "reference_id": "6E9A73CC-03DA-463D-9BD9-322FB7875772", "extension": "jpg", "original_filename": "gold.jpg", "grouping": "Update Photo", "url": "https://example.brightideatest.com/api3/file/DC31D645-A0B2-444E-9187-34048CFB16CE?format=binary", "type": "image/jpeg" }, "comment_count": 0 }, { "id": "BEBB11DB-08DE-4905-9FB5-868A111231E0", "message": "Update 1 in the Sample Campaign ", "date_created": "2013-04-19 13:08:19.407", "video_link": null, "member": { "id": "866144B1-E302-42EF-AF80-75DE988885AE", "email": "jdoe@brightidea.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": null, "skills": "Selling Software", "work_history": "Worked at sales.com", "photo_url": "https://example.brightideatest.com/api3/file/02F11D0E-BA74-4A7D-B1BE-4F7F651B2507?format=binary&thumb_size=100", "date_created": "2013-03-07 19:09:54.563", "date_modified": "2013-04-18 13:14:21.067", "active": true, "photo_file_id": "02F11D0E-BA74-4A7D-B1BE-4F7F651B2507" }, "campaign": { "id": "0A140858-AD8A-4F97-9926-D80AD156A130", "name": "Sample Campaign", "description": "Sample Campaign Description", "date_created": "2013-03-07 17:10:38.107" }, "comment_count": 1 } ], "stats": { "total": "2", "page_count": 1, "current_page": 1 } }
CREATE update
Create a idea object.
Requester must have access to the environment in order to create an update in it.
Parameters
Parameters | Detail |
---|---|
message required |
This is the text of the update. Minimum 1 character, maximum 140 characters. String will be truncated if length exceeds maximum Sample value: "This is a test update" |
campaign_id optional |
This is the ID of the campaign where the message should be created under Sample value: "11111111-1111-1111-1111-111111111111" |
attachment optional |
This is the image attachment of the update. Request accepts file object. Maximum 7 MB. Accepted format: jpg, jpeg, gif, png, bmp |
video_link optional |
This is the link to YouTube video. Sample Value: "http://www.youtube.com/user/versabc?v=9FOZEbEpyA8" |
format optional |
Specifies returned data format Accepted value: "json", "xml" |
Resource Information
Authentication
: Required. See Authentication for detail on authentication.
HTTP Methods
: POST
Request URL Format
: https://{api_domain}/api3/update
Access Permission
Requester must have access to the environment in order to create an update in it. See Authentication for detail on authentication.
Errors
- Missing required parameter
Example Request
- Method: POST
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
- URL:
https://example.brightidea.com/api3/update
Form data:
- message=This%20is%20an%20Enterprise%20update%201
{ "update": { "id": "21AA9B19-80A4-4EE3-9A45-5CDCD0F55EB2", "message": "This is an Enterprise update 1", "date_created": "2013-04-19 15:54:51.587", "video_link": null } }
DELETE update
Delete a update object. Requester must be an Admin.
Parameters
Parameters | Detail |
---|---|
format optional |
Specifies returned data format Accepted value: "json", "xml" |
Resource Information
Authentication
: Required. See Authentication for detail on authentication.
HTTP Methods
: DELETE
Request URL Format
: https://{api_domain}/api3/update/{id}
Access Permission
Requester must be an Admin.
Errors
- Invalid GUID received
- Admin permission required.
Example Request
- Method: DELETE
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
URL:
https://example.brightidea.com/api3/update/21AA9B19-80A4-4EE3-9A45-5CDCD0F55EB2
{ "message": "success", "code": 200 }
FAQ
Question: I understand passing the "with=comments" parameter on GET update request can get me the first 20 records of the updateComment sub-object. But how do I get the rest.
Answer: Make request to the updateComment function passing update_id
will get you comments of the given update. Refine result by passing page_size
, page
, order_by
parameters.
Question: LIST update only return 100 objects maximum per request. How do I retrieve more results.
Answer: LIST update response is automatically paginated. You can specify which page of the result a request should return. For example, if you requested for 100 idea 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 end.
Question: How to I create a comment or hifive on an update.
Answer: Use CREATE updateComment API to create comment for an update. Use CREATE updateHifive API to create hifive for an update