API Implementer’s Guide Event Services May 10, 2010
Church Community Builder, Inc. 12265 Oracle Boulevard, Suite 105 Colorado Springs, CO 80921 866.242.1199 www.churchcommunitybuilder.com
Table of Contents Introduction ...........................................................................................1 Event Services .......................................................................................1 Event Profile Contents ......................................................................................................1 Event Profiles ...................................................................................................................2
Where to Start .......................................................................................4 Accessing the Services ....................................................................................................5 Login & Password ............................................................................................................5
!
Introduction This implementer’s guide provides information about the Church Community Builder (CCB) Application Programming Interface (API) Event services. This document will specify the necessary values for requests and responses to and from the CCB API, and will provide sample code for accessing the API.
Event Services The CCB Event Services allows you to have access to your membership information. This information can be used as you wish on your website, or in other application in use across your church. Access to the Event Services is free for the asking for all CCB customers. However, you still need to have a login and password assigned from your CCB application. All CCB API services are protected by HTTP Basic Authentication. If your application can not provide credentials through Basic Authentication, then it will not be able to communicate with the CCB API. All service calls to the CCB API require a parameter named ‘srv’ that contains the name of the service that is being called. All CCB API services accept an optional parameter named ‘describe_api’ with a value of ‘1’. This will cause the service to return the values that it accepts as parameters and the format of the service response.
Event Profile Contents Any services that return a Event profile will return records of the same format. A sample of the Event profile format follows: <event id="1411"> Every 15th <description>Fellowship over fries and shakes This is a note for the leaders to see. Please take attendance. <start_datetime>2010-01-15 19:00:00 <start_date>Jan 15, 2010 <start_time>7:00 PM <end_datetime>2010-01-15 21:00:00 <end_date>Jan 15, 2010 <end_time>9:00 PM America/Denver Every month on the 15th until Jan 15, 2011 from 7:00 PM-9:00 PM CCB Guys Master Admin (719) 439-7964 Five Guys Burger and Fries <street_address>7252 North Academy Boulevard Colorado Springs <state>CO
Church Community Builder, Inc. Proprietary & Confidential (updated 5/10/10)!
Page 1 of 5
! 80920 7252 North Academy Boulevard Colorado Springs, CO 80920 25 <event_type id="1">Open to All Five Guys Event Registration <description>Anyone who wants to participate in the fellowship at Five Guys needs to register here first. http://dev/w_form_response.php?form_id=21 Unity Hall 1 <description> <status id="3">Approved Location <user_defined_fields> <user_defined_field> Resource Size <selection id="5">Medium <event_grouping id="3">Adult Care Groups Master Admin <modifier id="1">Master Admin 2010-01-06 15:46:29 <modified>2010-05-04 17:40:38
Event Profiles The Event Profiles service allows you to pass in a given date and have all events created or modified since that date returned to you. If a date is not provided, all events in the system will be returned.
Church Community Builder, Inc. Proprietary & Confidential (updated 5/10/10)!
Page 2 of 5
! Service Name event_profiles
Required Parameters None
Optional Parameters modified_since
Sample Request curl 'http://localhost/api.php?srv=event_profiles&modified_since=2010-04-01' -u user:pwd
Sample Response <request> <parameters> <argument name="srv" value="event_profiles" /> <argument name="modified_since" value="2010-04-01" /> <service>event_profiles <service_action>execute public <events count="1"> <event id="1411"> Every 15th <description>Fellowship over fries and shakes This is a note for the leaders to see. Please take attendance. <start_datetime>2010-01-15 19:00:00 <start_date>Jan 15, 2010 <start_time>7:00 PM <end_datetime>2010-01-15 21:00:00 <end_date>Jan 15, 2010 <end_time>9:00 PM America/Denver Every month on the 15th until Jan 15, 2011 from 7:00 PM-9:00 PM CCB Guys Master Admin (719) 439-7964 Five Guys Burger and Fries <street_address>7252 North Academy Boulevard Colorado Springs
Church Community Builder, Inc. Proprietary & Confidential (updated 5/10/10)!
Page 3 of 5
! <state>CO 80920 7252 North Academy Boulevard Colorado Springs, CO 80920 25 <event_type id="1">Open to All Five Guys Event Registration <description>Anyone who wants to participate in the fellowship at Five Guys needs to register here first. http://dev/w_form_response.php?form_id=21 Unity Hall 1 <description> <status id="3">Approved Location <user_defined_fields> <user_defined_field> Resource Size <selection id="5">Medium <event_grouping id="3">Adult Care Groups Master Admin <modifier id="1">Master Admin 2010-01-06 15:46:29 <modified>2010-05-04 17:40:38
Where to Start The Event Services API is available on your existing CCB account. All event services are read-only and cannot damage any of your existing data. After creating and assigning API accounts, use that information to create applications that communicate with your API.
Church Community Builder, Inc. Proprietary & Confidential (updated 5/10/10)!
Page 4 of 5
!
Accessing the Services The CCB API services can be accessed via the https (port 443) protocol. For the security of customer data, CCB has chosen to encrypt all transmissions of data, instead of using the standard http (port 80) port. The address to be used for accessing the services is displayed in the API Admin section of the CCB application.
Login & Password Logins and passwords are created and assigned through the API Admin section within the CCB application. Logins are assigned access to each service individually so that control can be kept on what services are available if, for instance, the service login is for an external web development company. This login and password is not the same as the CCB User Community account and will not allow a user access to the CCB application.
Church Community Builder, Inc. Proprietary & Confidential (updated 5/10/10)!
Page 5 of 5