Architecture Recommendations
There are a few different ways to build Content Gateway integrations:
- Using system APIs
- Using web scrapers
Strategy 1: Use System APIs
System APIs offer a structured, programmatic way to retrieve data directly from the source system. This is the most robust approach for building Content Gateway integrations.
For this approach, you need to follow 3 steps:
- Conduct source system API discovery (including API endpoints and authentication).
- Create a server that can host Content Gateway APIs. You can middleware tools or host your own server.
- Return content using source system APIs every time your Gateway APIs are invoked.
Strategy 2: Use Web Scrapers
Web scraping can be used when source systems APIs are unavailable, though it comes with significant challenges.
For this approach, you need to follow 3 steps:
- Build a web scraper to crawl and retrieve content from source systems. You may need to use external libraries such as Beautiful Soup or Selenium depending on your purpose.
- Create a server that can host Content Gateway APIs. You can middleware tools or host your own server.
- Return content by scraping content from source systems every time your Gateway APIs are invoked.
Comparison of approaches
While you can build gateway integrations either using source system APIs or web scrapers. We highly recommend using source system APIs, since scrapers can easily break and are unreliable.
Here is a detailed comparison of the 2 approaches: