There are some basic best practices when it comes to building Connectors for third Party APIs. Here at Cyclr we swear by these ground rules.
1. Read the documentation
The first step in building a Connector is to always read the documentation. You need to understand how the API works and how it needs to interact with Cyclr.
Focus especially on how authentication works for the API, and consider the methods you need to build, their schema and response structure.
2. Obtain Credentials
Check that you have all the necessary credentials. It is important to check that you have working credentials for testing purposes.
3. Test the endpoints
It’s best practice to test all your methods in an API testing tool, such as Postman.
This allows you to check exactly how the API behaves before you begin accessing it using Cyclr. Once you have tested your methods, you can start building and testing endpoints to check the response from the API.
4. Create the Connector and test authentication in Cyclr
Once the Connector is authenticated and tested, you can migrate it to Cyclr.
Create a new Connector and check that you’re able to authenticate it with the same credentials as you did in the testing environment.
5. Add Connector Level parameters
Parameters can be defined for each individual method, but any which are shared between all methods (e.g. the paging parameters, or MergeFields that are used across all methods) can be defined once at Connector level instead.
6. Create methods in Cyclr
When you start creating your methods in Cyclr, cross reference these methods with the documentation. Check and make sure you have created all of the necessary method level parameters as well as mapped all the necessary request and response fields, along with any scripts that the methods require to run.
7. Create Triggers for the ‘Get’ Methods
Once you have created your methods, check the output of your List Methods and create Triggers for Get Methods which require an ID parameter.
8. Check the Method parameters and Methods where possible
Once you have created triggers for your methods, check the parameters for your methods. Does the API allow filtering by a created_date or updated_date, for example? If so, make sure to add list new and list updated methods.
9. Test the methods in a Cycle
Create a test cycle for your Connector with each of your methods in a category and check the functionality. If you have created triggers, check that the lookups within your Get methods are working as expected.
10. Clean up the the Connector
Go through your Connector and each of the methods. Check the response and request structure of each of your methods and make sure to tidy up your Connector.