Written by: Daniel Haurey on 01/04/18

ConnectWise Logo

[Foreword]

The purpose of this article is to highlight the simplicity with which a software developer can extend their custom application by leveraging web services from the Connectwise Manage Professional Services Automation (PSA) software, via the extensive suite of Connectwise APIs.  The basic principles described herein will apply to extending nearly any custom software application by consuming nearly any relevant API.  Since most current developers are already acutely aware of and intimately familiar with consuming API’s, the intended audience for this article is the Managed Services Provider (MSP) community at large.  Whether the MSP is already using Connectwise Manage, using another PSA or using another line of business software, the concepts described here are applicable to all. Many MSPs have a software development branch, which opens a whole new world of integration possibilities. If nothing else, this article will extoll the benefits of supercharging custom applications by linking them to Connectwise data and services.

For the non-MSP readers among us, Connectwise Manage is a powerful and comprehensive PSA software suite. It is the leading PSA among MSPs worldwide, and like many other modern applications, Connectwise Manage offers a broad range of Application Programming Interfaces (APIs) that allow developers to interconnect their custom software applications with data from Connectwise.

[Quick intro to Web Services]

As a non-developer, yet someone inside the technology industry fold, most MSP professionals have, at minimum, at least heard the terms REST and SOAP.  Both are versions of web services, both expose data from one application to another and both ultimately lead to the same end – integration of disparate applications and data.  SOAP stands for Simple Object Access Protocol and REST for Representational State Transfer. While there are innumerable differences, for the purpose of this article the chief among them is that SOAP is an actual messaging protocol unto itself that leverages Hypertext Transfer Protocol (HTTP) and eXtensible Markup Language (XML) and provides connecting applications with information about the structure of the API, while the architecture of REST is a bit simpler. REST simply rides along the HTTP protocol and passes hypertext that defines a format of the message, rules for interaction and the data itself.  One of the benefits of RESTful services is that they are generally platform agnostic.  A developer can easily connect and consume a RESTful web service with their preferred technology: .NET, PHP, Java, and many others.  Connectwise provides both REST and SOAP versions of their API, although as new iterations and features are designed and released, I likely safe to assume that they will be REST services. Too technical? Not to worry – that’s as deep as we’ll get into SOAP and REST.

[Now to integrate Connectwise data with our app]

Back to the Connectwise API and your app.  Before using the API’s Connectwise requires that each developer be registered Connectwise Developer, which is free at https://register.developer.connectwise.com/.  There’s a few developer partner level options, but for the time being let’s just pick “Partner”. If you’re not a current Connectwise Manage user, they offer sandbox environments (https://developer.connectwise.com/Getting_Started) against which you can test your sample API calls. Connectwise does need to approve you before you can have access to their APIs, but you do not have to be a Connectwise Manage license holder.  Once you’re approved, it’s on to authenticating.

Authentication is pretty crucial in APIs.  Without it, the data on your server will be unprotected and publicly available.  The Connectwise RESTful API offers three authentication options: API Keys – Member Authentication, Integrator Login – Impersonation, and Member ID and Password – Cookie Authentication.  The first, API Keys, is the recommended method. Listed in the documentation for each API method is a cool little utility that will help you calculate your API Key, which ends up being just a base64-encoded string of characters that you will include with every request to the REST API.

Time to go get some data from Connectwise and bring it into our custom application.  In the interest of not straying from the intention and audience of this article, we will not cover how to connect to and consume REST or other APIs – that’s an entirely different article unto itself (perhaps coming soon!). Suffice it to say that your developer knows how to connect and consume data from APIs in general.

In our business case example, imagine we’re an MSP who has built a custom Marketing application.  As a Connectwise user with all of our customer data therein, we want to bring some data from Connectwise Manage over into our Marketing app to save us from the pitfalls of double and/or manual entry.  Now that we’re registered developers with Connectwise, we can modify our Marketing app to  programmatically connect to the Connectwise REST API, issue the GET verb to the appropriate URL
( https://{yourConnectwiseSite}/v4_6_release/apis/3.0/company/companies to get a dataset containing all company names, for example).  Voilà! Now we’ve got a copy of the Connectwise company data in our marketing app and can integrate it with all the data in the app itself.  Connectwise has organized their APIs into logical groups (Company, Expense, Finance, Marketing, Procurement, Project, Sales, Schedule, Service, System, and Time), so finding and consuming the data you need is as easy as choosing the right API and firing off a RESTful request.

Our simple example is just one of many possible cases for integrating data from the Connectwise REST API into your custom application. As a developer of 25 years, I have written apps that have consumed data from a great number of APIs.  Without question, the Connectwise API is the most robust, easy to use and responsive (typically those are three mutually exclusive properties when describing APIs) with which I’ve ever had the pleasure to work.

Paul Bender is Vice President of Application Development at Exigent Technologies, a ConnectWise PSA customer since 2005.