Dropsource is a “Bring Your Own Backend” platform, designed to connect to web services via REST API. You can use certain data types locally within your app, including simple values and basic objects (for standard Android/Java and iOS/Swift types) – but for structured data you will need to connect your app to an external API. Similarly, if your app uses any data that is stored on a server, you will need an API to connect to it. Your app can cache API data locally to maintain functionality if device connectivity drops.
If you have an API ready or under development, check out a few requirements for using it in Dropsource.
You can use APIs to connect to your own data or to a third party service, such as Twitter, Facebook, GitHub, etc. If you’re using a third party service, you will need to document the endpoints you plan to use in Dropsource with a Swagger (OpenAPI) specification – check out the wizard below for guidance.
If you don’t have a particular data source in mind but want to try out Dropsource API connectivity, use one of the library APIs – currently you can choose from Google Places, Slack, Buzzfeed, Open Weather Map, and the To Do List demo app API.
Connecting your Data to Dropsource
If you are unsure how to create an API, or how to connect an API to Dropsource, use the wizard to get started:
You will need an API that returns JSON to connect external data to your Dropsource app. If you use a relational database (e.g. MySql, PostgreSQL, Oracle), a NoSQL database (e.g. MongoDB, Couchbase), a BaaS solution (e.g. Firebase, AWS), or even raw files, you can serve that data to your app via an API. Many BaaS providers offer the ability to build a REST API from these data solutions.
We’ve found the Serverless Framework (with AWS API Gateway and Lambda) to be an effective solution, particularly since it supports several languages including Node.js, Python, Java, and Scala. However there are many great frameworks for most of today’s popular languages:
- Sails (Node.js)
- has the ability to generate REST API routes for you
- LoopBack (Node.js)
- can also generate REST endpoints based on the models you define
- Express (Node.js)
- this popular framework works best for APIs when combined with other packages
- Spring (Java)
- Rails (Ruby)
- check out this guide to building a JSON REST API on Rails: Using Rails for API-only Applications
- Laravel (PHP)
- Django REST Framework (Python)
- this has a popular Swagger generator plugin
- ASP.net WebAPI (C#)
- we have had successful Dropsource users working with this framework
We also recommend using Postman to test your endpoints and prepare your specification.
Check out the API Tools section for guides to setting up and documenting your API without any coding, using platforms including Bubble and Backendless. The Dropsource team is always exploring the feasibility of connecting to different services so we’ll be adding guidance on more platforms over the coming weeks and months.
- The Swagger Editor, for authoring your specification
- Stoplight.io, to generate your specification and optionally try it out using mock data
- SwaggerHub, a suite of official tools for designing and building your API / specification
- Available Swagger commercial and open source integrations
- Swagger codegen utility for various languages (languages here)
- Swagger 101 tutorial
- Our API tools guidance, including tips on authoring your specification