Integrations and APIs - Database Synchronization APIs


CivicReady
®

Creating and Managing Groups via API

Overview

With Group Management API you can easily create and manage groups and perform actions such as "add", "modify", "purge", and "delete" groups.

Processing Rules  XML Format
Name - The name of the group.
Name can contain up to 42 characters
<name>Group Name</name>
Category - One of the 18 available categories in the regroup system.
Enter the number for the desired Category.

1  - General
2  - Classifieds
3  - Class Year
4  - School Status
5  - Field of Study
6  - Residence
7  - Greek Association
8  - Club
9  - Course
10 - Sport
11 - Careers
12 - Emergency Alerts
13 - Schools/Colleges
14 - Branch Campuses
15 - Institutes & centers
16 - Offices & services
17 - Notifications
18 - Publications
<category>12</category>
Type - One of the available Group Types.
Enter the number for the desired Group Type.

1 - Open Discussion
2 - Announcement-Only
3 - Moderated
<type>2</type>
Privacy - One of the 3 available Group Privacy Types.
Enter the number for the desired Group Privacy Type.

1 - Public
2 - Private
3 - Secret
<privacy>3</privacy>
Description - User defined description of what the group is for.
The description can be 50 characters or less.
<description>This is a group created via API on x-x-20XX</description>
Action - One of the 3 available actions to manage groups.
Enter the action you wish to perform.

Purge
Delete
Modify
<action>delete</action>
Groups Import API You have to post xml data to this url, Content-Type must be 'application/xml' and submit method must be POST to make this work.
  Root tag must be named "groups" and type must be array. If the groups tag and type is missing api will not process the request.
  https://regroup.com/api/v2/groups?api_key=NetworkAPIKEY
There must be at least one group tag under groups tag and there is no max limit on number of group tags.
Data will be processed according to Network Set csv rules.
<?xml version="1.0" encoding="UTF-8"?>
<groups type="array">
<group>
<name>API Test group 1</name>
<category>12</category>
<type>3</type>
<privacy>2</privacy>
<description>This is test group created via API</description>
<unrestrictEmails>1</unrestrictEmails>
</group>
<group>
<name>API Test group 2</name>
<category>1</category>
<type>3</type>
<privacy>3</privacy>
<description>This is test group 2</description>
<unrestrictEmails>0</unrestrictEmails>
</group>
</groups>
Manage Groups via API API Request URL: https://regroup.com/api/v2/groups?api_key=NetworkAPIKEY

In this case the XML data will have an extra tag <action></action> under the group tag. The value of action tag can be "modify","purge","delete"
Purge group via API
action - purge will remove all non admin members of the group.

action and name tags are mandatory for this request.
<?xml version="1.0" encoding="UTF-8"?>
<groups type="array">
  <group>
    <action>purge</action>
    <name>API Test group 1</name>
  </group>
</groups>
Delete group via API
action - delete will delete the group.

action and name tags are mandatory for this request.
<?xml version="1.0" encoding="UTF-8"?>
<groups type="array">
  <group>
    <action>delete</action>
    <name>API Test group 1</name>
  </group>
</groups>
Modify group API
action - modify will modify the group's information.( category, type, privacy, description etc).

action and name tags are mandatory for this request.

(this is a default action if any data chages without the need to add an action tag)
<?xml version="1.0" encoding="UTF-8"?>
<groups type="array">
  <group>
    <action>modify</action>
    <name>API Test group 2</name>
    <category>12</category>
    <type>3</type>
    <privacy>1</privacy>
    <description>This is test group created via API that has been modified</description>
    <unrestrictEmails>1</unrestrictEmails>
    <digestEmails>1</digestEmails>
    <csvProcessing>1</csvProcessing>
  </group>
</groups>
Set email digest preferences for a group via API



digestEmails
1 = daily
2 = weekly
3 = monthly
<?xml version="1.0" encoding="UTF-8"?>
<groups type="array">
 <group>
   <name>API Test group 1</name>
   <category>1</category>
   <type>3</type>
   <privacy>3</privacy>
   <description>This is test group 1</description>
   <unrestrictEmails>1</unrestrictEmails>
   <digestEmails>1</digestEmails>
 </group>
</groups>
Set Un-Restrict emails - Email in to group.

0 - allow only members of the group to send emails into the group
1 - allow public to send emails into the group
2 - restrict emails into the group
<unrestrictEmails>1</unrestrictEmails>
Set the CSV Processing for a group

1 - normal processing ( Group members will not be replaced via csv and group is set as static )
2 - active roster processing ( Replace the users in our group with only what we send you in the .csv. )
3 - purge processing ( Replace the users and user's information in the group with only what we send you in the .csv. )
<?xml version="1.0" encoding="UTF-8"?>
<groups type="array">
<group>
<name>API Test group</name>
<category>1</category>
<type>3</type>
<privacy>3</privacy>
<description>This is test group 1</description>
<unrestrictEmails>1</unrestrictEmails>
<csvProcessing>1</csvProcessing>
</group>
</groups>
Relate a group to a specific campus. <?xml version="1.0" encoding="UTF-8"?>
<groups type="array">
<group>
<name>API Test group</name>
<category>1</category>
<type>3</type>
<privacy>3</privacy>
<description>This is test group 1</description>
<campusName>API Created campus 1</campusName>
</group>
</groups>
Set a group as Default

New processed users are added automatically to the group.
<?xml version="1.0" encoding="UTF-8"?>
<groups type="array">
<group>
<name>API Test group</name>
<category>1</category>
<type>3</type>
<privacy>3</privacy>
<description>This is test group 1</description>
<defaultGroup>1</defaultGroup>
</group>
</groups>

For more information on how you can add this new feature to your network please contact CivicReady Support. 

?



I'd Like to Request an Enhancement

0 out of 0 found this helpful

Updated:
Follow