A common use case is securely sharing your API docs in DreamFactory with other users who aren't DreamFactory admins. You might need to share specific API endpoints with partners, customers, or other developers. This short tutorial demonstrates how to set up role-based access control to specific API endpoints and easily share a secure link to DreamFactory's live Swagger API docs. Let's get started!Step One: Set up a role.
John Gilfillan, Software Engineer from Miracle Electronics, created Nurse Call or Care Call systems for Hospitals and Rest Homes. They wanted a REST API that could interact with their software, as well as to give users the ability to make changes to the system remotely. They run a software application called "Angel" on a P.C. which monitors call points located at the bedside of each Hospital patient or in the home of a Rest Home occupant.
DreamFactory’s power lies in the automatic generation of API endpoints and its standardization. There are times however, where you need something a little more custom, and that’s why we have scripting engines included. Let’s look at a specific use case for custom scripting that we have users ask about a lot.
Andrew Jenkins, engineer at Split Rock Software and DreamFactory Community member developed an app called Ice Report. He was looking for a prebuilt system to make information in a database easy to access and handle users in secure way and found DreamFactory. DreamFactory allowed him to build a basic user system with a minimal interface, as well as allow users to submit data for others to view in a quick and easy way. “I’m a strong believer in “fast prototyping”. I implement small achievable concepts and build from there. So far, have built two apps.”
DreamFactory has long supported scripting as a way of allowing users to extend the handling capabilities of existing APIs (i.e. performing actions pre- and post-processing like modifying the request or response), or adding new APIs altogether via scripted services. This has proven to be a very popular feature of DreamFactory, but until release 2.3 it was missing a very big "nice to have", that being a way to save or queue the scripts to be run at a later time and not take the hit of processing the script at the time of the API call. Thus the advent of queued scripting.
So you’ve installed DreamFactory and connected to your database, maybe you’ve tried a few API calls in API docs but what’s next? Certainly not writing the server-side code since DreamFactory graciously autogenerated your API endpoints. How about a REST client, perhaps we’ll start with a simple GET? Yeah! That sounds like a safe bet! Simply put a GET request is a request for a representation of a resource, resource being the URL and the representation being the data. GET is considered safe since it won’t change the state of the resource.
In the early part of 2016, we introduced a feature called DataMesh, also known as Virtual Relationships, or Virtual Foreign Keys. The idea behind this feature is to allow users to set up “virtual foreign keys” to relate data across tables in the same SQL database where foreign keys did not exist or were not desired, or across different SQL databases altogether. We even allowed relating a SQL database table to a MongoDB collection, opening up a whole new way for a client to retrieve all the data it needed, molded in a way that was easily consumable.