GET group
Get data of one group object. Requester must be an Admin. See Authentication for detail on authentication.
Parameters
Parameters | Detail |
---|---|
with optional |
Returns sub-object or count of sub-objects relating to the group. If sub-object is requested, response will return the first 20 records Accepted value: "members", "member_count" |
format optional |
Specifies returned data format Accepted value: "json", "xml" |
Resource Information
Authentication
: Required. See Authentication for detail on authentication.
HTTP Methods
: GET
Request URL Format
: https://{api_domain}/api3/group/{id}
Access Permission
Requester must be an Admin. See Authentication for detail on authentication.
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/group/BD0333C8-6FB8-4DE4-815F-C15F7C5DB76B?with=members
{ "group": { "id": "BD0333C8-6FB8-4DE4-815F-C15F7C5DB76B", "group_name": "Test Group 1", "date_created": "2013-03-12 15:46:40.020", "members": [ { "id": "B8145EFC-EF21-4F59-8CAA-69978822B24A", "email": "bruse.johnson@example.com", "screen_name": "Bruse sockeroft", "first_name": "Bruse", "last_name": "Johnson", "job_title": "Projest Leader", "address": "9 Sample Plaza Test State", "phone": "564-259-23052", "mobile_phone": "895-098-98552", "external_user_id": "05678", "skills": "Music Produstion", "work_history": "Dir. of Produst Development", "photo_url": null, "date_created": "2013-03-07 18:20:08.643", "date_modified": "2013-04-16 18:42:13.300", "active": true } ] } }
LIST group
Get data on a list of group objects. Objects are order by created date descending by default. Requester must be an Admin. See Authentication for detail on authentication.
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 group ID Sample value: "11111111-1111-1111-1111-111111111111" |
group_name optional |
Filter return by group name Sample value: "Test Group" |
date_created optional |
Filter return by group created date. Response contains all groups created within the 24 hours of the specified date Sample value: "12/06/2009" |
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, group_name DESC". Accepted attributes: "group_name", "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: "member_count" |
format optional |
Specifies returned data format Accepted value: "json", "xml" |
Resource Information
Authentication
: Required. See Authentication for detail on authentication.
HTTP Methods
: GET
Request URL Format
: https://{api_domain}/api3/group
Access Permission
Requester must be an Admin. See Authentication for detail on authentication.
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/group?date_created=03/12/2013&page=1&page_size=2
{ "group_list": [ { "id": "BD0333C8-6FB8-4DE4-815F-C15F7C5DB76B", "group_name": "AAA Group", "date_created": "2013-03-12 15:46:40.057" }, { "id": "7B77065A-488B-4330-B5D0-96E371243585", "group_name": "BBB Group", "date_created": "2013-03-12 15:46:39.763" } ], "stats": { "total": "40", "page_count": 20, "current_page": 1 } }
CREATE group
Create a group object. Requester must be an Admin. See Authentication for detail on authentication.
Parameters
Parameters | Detail |
---|---|
group_name required |
This is the name of the group. Minimum 1 character, maximum 100 characters. String will be truncated if length exceeds maximum Sample value: "CCC Group" |
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/group
Access Permission
Requester must be an Admin. See Authentication for detail on authentication.
Errors
- Group Name limit must be between 1 to 100 characters
- Group name exists
Example Request
- Method: POST
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
- URL:
https://example.brightidea.com/api3/group
Form data:
- group_name=CCC Group
{ "group": { "id": "8B3E8DFF-83B3-403D-BB69-28223F418676", "group_name": "CCC Group", "date_created": "2013-04-17 12:17:30.910" } }
UPDATE group
Update a group object. Requester must be an Admin. See Authentication for detail on authentication.
Parameters
Parameters | Detail |
---|---|
group_name optional |
This is the name of the group. Minimum 1 character, maximum 100 characters. String will be truncated if length exceeds maximum Sample value: "CCC Group" |
add_members[] optional |
Add a member into the group. Value can be either an email address or existing member ID. If non-existing member email addresses is passed in add_members parameter, function will create the member object. Parameter can accept multiple values. Sample Value add_members[]=11111111-1111-1111-1111-111111111111, add_members[]=mpower@example.com |
remove_members[] optional |
Remove a members from the group. Value must be existing member ID. Parameter accepts multiple members. Parameter format: remove_members[]=11111111-1111-1111-1111-111111111111, remove_members[]=22222222-2222-2222-2222-222222222222... |
format optional |
Specifies returned data format Accepted value: "json", "xml" |
Resource Information
Authentication
: Required. See Authentication for detail on authentication.
HTTP Methods
: PUT
Request URL Format
: https://{api_domain}/api3/group/{id}
Access Permission
Requester must be an Admin. See Authentication for detail on authentication.
Each request allows maximum 100 add and remove member in combine.
Errors
- Invalid group id
- Add or remove member limit exceeded
Example Request
- Method: PUT
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
- URL:
https://example.brightidea.com/api3/group/BD0333C8-6FB8-4DE4-815F-C15F7C5DB76B
Form data:
- group_name=AAA Group Updated
- add_members[]=3D4D99DF-4C26-48F7-A7DC-B762C699373F
- add_members[]=mpower@example.com
- remove_members[]=7767A545-EBEB-4B57-81CB-160D014633AE
{ "id": "BD0333C8-6FB8-4DE4-815F-C15F7C5DB76B", "group_name": "AAA Group Updated", "member_created": [ { "id": "D22381B3-6EB6-41D5-896E-26E6871E1903", "email": "mpower@example.com", "screen_name": "mpower", "first_name": "", "last_name": "", "job_title": "", "address": "", "phone": "", "mobile_phone": "", "external_user_id": null, "skills": "", "work_history": "", "photo_url": null, "date_created": null, "date_modified": null } ], "member_removed": [ "7767A545-EBEB-4B57-81CB-160D014633AE" ], "member_added": [ "3D4D99DF-4C26-48F7-A7DC-B762C699373F", "D22381B3-6EB6-41D5-896E-26E6871E1903" ], "failed": [], "date_created": "2013-03-12 15:46:40.057" }
DELETE group
Delete a group object. Requester must be an Admin. See Authentication for detail on authentication.
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
: DELETERequest URL Format
: https://{api_domain}/api3/group/{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/group/8B3E8DFF-83B3-403D-BB69-28223F418676
{ "message": "success", "code": 200 }
FAQ
Question: I understand passing the "with=members" parameter on GET group request gives me the first 20 records of the members in the group. But how do I get the rest.
Answer: Make request to the LIST member function passing group_id
filter will get you members assign to the given group. Refine result by passing page_size
, page
, order_by
parameters.
Question: LIST group only return 100 objects maximum per request. How do I retrieve more results.
Answer: LIST group 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.