Remote Synthesis
Search my blog:
Viewing By Entry / Main
Nov 30, 2006

Breeze, er, Connect XML API Integration Component

I had the need to test some integration of the reporting features that Breeze 5 makes available via its XML Integration API, so I built a set of components component that accesses many of the specifically reporting functions that the API makes available. It also handles log in and maintaining your session across requests. I am not sure what is included in the Connect re-branding release, but I assume this API will still exist, so it should still apply (I may have the opportunity to check this out soon). The nice thing is that I was able to add support for multiple sorts and filters depending on how they were documented within the spec for each function using simple sort and filter objects. To download the code, click the download link on this post (I will also add this to my projects page soon).This is by no means a complete wrapper for the API functionality, though adding new functions was pretty easy. Currently it supports 27 different functions that are supported by Breeze 5 (I specifically ignored Breeze 4 only functions) that generally relate to getting reporting information out of Breeze. The API functions for creating, editing or removing accounts and meetings are not built at this time. However, if you examine the code, you will see that much of the grunt work of calling functions within the API has been already built, so adding new functions is just a matter of building a parameters structure and passing that to the pre-built functions for creating the XML and sending the request.

If anyone finds this code useful, please let me know. I am willing to continue to develop it to support those additional functions, or to update it specifically for Connect support when I get a hold of the spec if there is interest within the community. Also, let me know of any bugs that you encounter. In my tests, everything seemed to work fine with the account I was testing with, but many of the functions returned empty result sets as was expected since some of this data didn't exist in my test account.

Oh, so you might wonder how you might actually use these components. Well here is an example of calling the sco info function and then one to get a list of attendees to a meeting that answered the survey:

<cfset breezeAPI = createObject("component","breezeAPI").init("http://admin.breezecentral.com/api/xml","youremail@yoururl.com","password") /> <cfdump var="#breezeAPI.scoInfo(sco_id='123456789')#"> <P>
<!--- create a filter to only show those who did not answer survey - for specifics on how filters work, please read the Breeze XML API docs for each function ---> <cfset filter = breezeAPI.getFilter().addItem("answered-survey","0") /> <cfdump var="#breezeAPI.reportMeetingAttendance(sco_id='123456789',filter=filter)#">

In general I think using the code is pretty self-explanatory if you are familiar with the Breeze XML API, however, without the API docs this isn't the easiest thing to understand, though some of you more familiar with the internals of Breeze may find it a little more straightforward than I. If there is general community interest, I may post this to RIAForge as well...let me know.

Download the attachment.

Comments
Brian Klaas
Excellent work, Brian! I had built out the user account managent functionality within our system, but the next step was to build out functionality to access the reporting features of the Breeze/Connect API. You've taken care of most of that for me! =) I asked some of the Connect team at MAX about changes to the API and they had stated that they were minimal -- nothing new really introduced. We'll see if that bears out when the API docs are released in a few weeks.


sami
Hello Brian, i tried to test it with CFMX 6.1 - but i'm getting " The argument ARGSXML passed to function doAction() is not of type xml." when i call the init-method with <cfinvoke component="breeze.breezeAPI" method="init" returnvariable="initRet"> <cfinvokeargument name="url" value="bla"/> <cfinvokeargument name="username" value="bla"/> <cfinvokeargument name="password" value="bla"/> </cfinvoke> I think that this normaly have to work the same way for 6.1 or 7 - Maybe you have some clues. thx. Sami


Eric
I am very interesting in working on this...and keeping this going. We have a project coming up that requires this integration.


Brian Rinaldi
Eric, what are you looking to have implemented? I did receive a Connect API documentation PDf but never got around to confirming compatibility. If you would like to add some additional functions from the API, I would be more than happy to consider adding them into the project.


Eric
Contact me at me email address here....we are just wanting to create breeze users and schedule a meeting. Pretty simple I think...and this just splatted back on my radar. Ugly.


Write your comment



(it will not be displayed)